# ProxyFromLua

The name of a Lua script to supply the proxy settings.

The script can return up to three strings in the following formats:

- `"DIRECT"`
- `"PROXY_SERVER_IP:PORT"`
- `"PROXY_SERVER_IP:PORT","Proxy_UserName"`
- `"PROXY_SERVER_IP:PORT","Proxy_UserName","Proxy_PassWord"`

The password can be in plain text or encrypted.

The following code demonstrates an example Lua function that finds proxy settings based on a URL and host.

    function FindProxyForURL(url, host)
       -- FUNCTION BODY BEGIN
       -- You should ONLY change following statements
       -- inside FUNCTION BODY

       if (string.find(url, "127.0.0.1")) then return "DIRECT"  end

       if (string.find(host, "Autonomy.com")) then return "10.0.0.0:6666","UserName"  end

       -- Return a default proxy to avoid Lua function calling failure
       return "10.0.0.0:9999"

       -- FUNCTION BODY END
    end

Type: | String
Default: |
Required: | No
Configuration Section: | TaskName or Default
Example: | `ProxyFromLua=C:\Autonomy\HTTPconnector\proxy.lua`
See Also: | ProxyHost ProxyPort

© Copyright 2020 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a mail client, and then send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm