NMSettingProxy: libnm Reference Manual

## NMSettingProxy NMSettingProxy — Describes proxy URL, script and other related properties |

## Functions

NMSetting * | nm_setting_proxy_new ()
NMSettingProxyMethod | nm_setting_proxy_get_method ()
gboolean | nm_setting_proxy_get_browser_only ()
const char * | nm_setting_proxy_get_pac_url ()
const char * | nm_setting_proxy_get_pac_script ()

## Properties

gboolean | browser-only | Read / Write
gint | method | Read / Write / Construct
gchar * | pac-script | Read / Write
gchar * | pac-url | Read / Write

## Types and Values

enum | NMSettingProxyMethod
#define | NM_SETTING_PROXY_SETTING_NAME
#define | NM_SETTING_PROXY_METHOD
#define | NM_SETTING_PROXY_BROWSER_ONLY
#define | NM_SETTING_PROXY_PAC_URL
#define | NM_SETTING_PROXY_PAC_SCRIPT
| NMSettingProxy

## Object Hierarchy

        GEnum
        ╰── NMSettingProxyMethod
        GObject
        ╰── NMSetting
            ╰── NMSettingProxy

## Description

The NMSettingProxy object is a NMSetting subclass that describes properties related to Proxy settings like PAC URL, PAC script etc.

NetworkManager support 2 values for the “method” property for proxy. If "auto" is specified then WPAD takes place and the appropriate details are pushed into PacRunner or user can override this URL with a new PAC URL or a PAC script. If "none" is selected then no proxy configuration is given to PacRunner to fulfill client queries.

## Functions

### nm_setting_proxy_new ()

    NMSetting *
    nm_setting_proxy_new (void);

Creates a new NMSettingProxy object.

#### Returns

the new empty NMSettingProxy object

Since: 1.6

### nm_setting_proxy_get_method ()

    NMSettingProxyMethod
    nm_setting_proxy_get_method (NMSettingProxy *setting);

Returns the proxy configuration method. By default the value is `NM_SETTING_PROXY_METHOD_NONE`. `NM_SETTING_PROXY_METHOD_NONE` should be selected for a connection intended for direct network access.

#### Parameters

setting | the NMSettingProxy |

#### Returns

the proxy configuration method

Since: 1.6

### nm_setting_proxy_get_browser_only ()

    gboolean
    nm_setting_proxy_get_browser_only (NMSettingProxy *setting);

#### Parameters

setting | the NMSettingProxy |

#### Returns

`TRUE` if this proxy configuration is only for browser clients/schemes, `FALSE` otherwise.

Since: 1.6

### nm_setting_proxy_get_pac_url ()

    const char *
    nm_setting_proxy_get_pac_url (NMSettingProxy *setting);

#### Parameters

setting | the NMSettingProxy |

#### Returns

the PAC URL for obtaining PAC file

Since: 1.6

### nm_setting_proxy_get_pac_script ()

    const char *
    nm_setting_proxy_get_pac_script (NMSettingProxy *setting);

#### Parameters

setting | the NMSettingProxy |

#### Returns

the PAC script

Since: 1.6

## Types and Values

### enum NMSettingProxyMethod

The Proxy method.

#### Members

NM_SETTING_PROXY_METHOD_NONE | No Proxy for the Connection |
NM_SETTING_PROXY_METHOD_AUTO | DHCP obtained Proxy/ Manual override |

Since: 1.6

### NM_SETTING_PROXY_SETTING_NAME

    #define NM_SETTING_PROXY_SETTING_NAME "proxy"

### NM_SETTING_PROXY_METHOD

    #define NM_SETTING_PROXY_METHOD "method"

### NM_SETTING_PROXY_BROWSER_ONLY

    #define NM_SETTING_PROXY_BROWSER_ONLY "browser-only"

### NM_SETTING_PROXY_PAC_URL

    #define NM_SETTING_PROXY_PAC_URL "pac-url"

### NM_SETTING_PROXY_PAC_SCRIPT

    #define NM_SETTING_PROXY_PAC_SCRIPT "pac-script"

### NMSettingProxy

    typedef struct _NMSettingProxy NMSettingProxy;

WWW Proxy Settings

## Property Details

### The `“browser-only”` property

      “browser-only”             gboolean

Whether the proxy configuration is for browser only.

Owner: NMSettingProxy

Flags: Read / Write

Default value: FALSE

Since: 1.6

### The `“method”` property

      “method”                   gint

Method for proxy configuration, Default is `NM_SETTING_PROXY_METHOD_NONE`

Owner: NMSettingProxy

Flags: Read / Write / Construct

Default value: 0

Since: 1.6

### The `“pac-script”` property

      “pac-script”               gchar *

PAC script for the connection.

Owner: NMSettingProxy

Flags: Read / Write

Default value: NULL

Since: 1.6

### The `“pac-url”` property

      “pac-url”                  gchar *

PAC URL for obtaining PAC file.

Owner: NMSettingProxy

Flags: Read / Write

Default value: NULL

Since: 1.6