1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-27 22:18:36 +02:00
Files
OpenIntegrations/docs/en/md/SSH/Common-methods/Get-proxy-settings.mdx

79 lines
2.3 KiB
Plaintext
Raw Normal View History

2025-09-23 10:13:09 +03:00
---
sidebar_position: 9
description: Get proxy settings and other functions to work with SSH in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, SSH]
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# 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`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Address | --addr | String | ✔ | Proxy address |
| Port | --port | Number | ✔ | Proxy port |
| View | --type | String | ✖ | Proxy type: socks5, socks4, http |
| Login | --login | String, Undefined | ✖ | Authorization login, if required |
| Password | --pass | String, Undefined | ✖ | Authorization password, if required |
Returns: Structure Of KeyAndValue - Proxy settings structure
<br/>
2025-09-29 09:32:14 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2025-10-20 19:41:52 +03:00
ProxyType = FunctionParameters["Proxy_Type"]; // http, socks5, socks4
2025-09-23 10:13:09 +03:00
2025-10-20 19:41:52 +03:00
ProxyAddress = FunctionParameters["Proxy_IP"];
ProxyPort = FunctionParameters["Proxy_Port"];
ProxyLogin = FunctionParameters["Proxy_User"];
ProxyPassword = FunctionParameters["Proxy_Password"];
2025-09-29 09:32:14 +03:00
Result = OPI_SSH.GetProxySettings(ProxyAddress, ProxyPort, ProxyType, ProxyLogin, ProxyPassword);
```
2025-09-23 10:13:09 +03:00
2025-10-07 19:27:04 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint ssh GetProxySettings \
--addr "127.0.0.1" \
--port 8071 \
--type "http" \
--login "proxyuser" \
--pass "***"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint ssh GetProxySettings ^
--addr "127.0.0.1" ^
--port 8071 ^
--type "http" ^
--login "proxyuser" ^
--pass "***"
```
</TabItem>
</Tabs>
```json title="Result"
{
"server": "host.docker.internal",
"port": 1080,
"proxy_type": "socks5",
"login": "proxyuser",
"password": "***"
}
```