Skip to main content

Get proxy settings

Creates a structure of proxy server settings for the connection

Function GetProxySettings(Val Address, Val Port, Val View = "socks5", Val Login = Undefined, Val Password = Undefined) Export

ParameterCLI optionTypeRequiredDescription
Address--addrStringProxy address
Port--portNumberProxy port
View--typeStringProxy type: socks5, socks4, http
Login--loginString, UndefinedAuthorization login, if required
Password--passString, UndefinedAuthorization password, if required

Returns: Structure Of KeyAndValue - Proxy settings structure


1C:Enterprise/OneScript code example
    ProxyType = "http"; // http, socks5, socks4

ProxyAddress = "127.0.0.1";
ProxyPort = "8071";
ProxyLogin = "proxyuser";
ProxyPassword = "12we...";

Result = OPI_FTP.GetProxySettings(ProxyAddress, ProxyPort, ProxyType, ProxyLogin, ProxyPassword);
    oint ftp GetProxySettings \
--addr "127.0.0.1" \
--port 1080 \
--type "socks5" \
--login "proxyuser" \
--pass "***"
Result
{
"server": "host.docker.internal",
"port": 1080,
"proxy_type": "socks5",
"login": "proxyuser",
"password": "***"
}