Module proxy

Dynamic proxy settings

This module offers a simple and convenient user interface for using a proxy while browsing the web. Users can add entries for specific proxy addresses, and easily switch between using any of these proxies to redirect traffic. It is also possible to use the system proxy, or disable proxy use altogether.

Adding a new proxy entry

To add a new proxy entry, use the :proxy command, with the name of the proxy and the web address of the proxy as arguments::proxy <name> <address>.

Example

To add a proxy entry for a local proxy running on port 8000, run the following:

:proxy proxy-name socks://localhost:8000

Viewing and changing the current proxy

It is currently easiest to view the current proxy by opening the proxy menu with the :proxy command. The current proxy will be shown in black text, while any inactive proxies will be shown in light gray text.

Functions

proxy.get_names ()

Get an ordered list of proxy names.

Return Values

  • table
    List of proxy names.

proxy.get (name)

Get the address of proxy given by name.

Parameters

  • name
    Type: string
    The name of a proxy.

Return Values

  • string
    The address of the proxy.

proxy.get_active ()

Get the active proxy configuration.

Return Values

  • table
    The active proxy configuration. Two fields are present: name and address.

proxy.load (fd_name)

Load the proxies list from a file.

Parameters

  • fd_name
    Type: string
    Custom proxy storage or nil to use default.

proxy.save (fd_name)

Save the proxies list to a file.

Parameters

  • fd_name
    Type: string
    Custom proxy storage or nil to use default.

proxy.set (name, address, save_file)

Add a new proxy server to current list.

Parameters

  • name
    Type: string
    Proxy configuration name.
  • address
    Type: string
    Proxy server address.
  • save_file
    Type: boolean
    Do not save configuration if false.

proxy.del (name)

Delete a proxy from the proxy list.

Parameters

  • name
    Type: string
    Proxy server name.

proxy.set_active (name)

Set given proxy to active. Return true on success, else false.

Parameters

  • name
    Type: string
    Proxy configuration name or nil to unset proxy.

Attribution

Copyright