1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-07 23:03:08 +02:00
Files
OpenIntegrations/docs/en/md/FTP/Common-methods/Get-connection-settings.mdx
Vitaly the Alpaca (bot) 7c2d89f7e4 Main build (Jenkins)
2025-08-02 20:59:16 +03:00

53 lines
1.9 KiB
Plaintext
Vendored

---
sidebar_position: 7
description: Get connection settings and other functions to work with FTP 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, FTP]
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get connection settings
Creates a structure of FTP connection settings
`Function GetConnectionSettings(Val Host, Val Port = 21, Val Login = Undefined, Val Password = Undefined, Val Passive = True, Val ReadTimeout = 120, Val WriteTimeout = 120, Val IPResolve = True) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Host | --host | String | ✔ | Host addres |
| Port | --port | Number | ✖ | Server port |
| Login | --login | String, Undefined | ✖ | Username for authorization, if required |
| Password | --pass | String, Undefined | ✖ | User password for authorization, if required |
| Passive | --passive | Boolean | ✖ | Passive connection mode |
| ReadTimeout | --rtout | Number | ✖ | Read timeout |
| WriteTimeout | --wtout | Number | ✖ | Write timeout |
| IPResolve | --ipresl | Boolean | ✖ | Advanced passive mode address resolution |
Returns: Structure Of KeyAndValue - Connection settings structure
<br/>
:::tip
When `IPResolve = True`, the connection address returned by the server in passive mode after `PASV` will be replaced with the IP from the `Host` field, in cases when a proxy is used or the server returns `127.0.0.1` (only if an IP address is specified in the `Host` field))
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Host = "172.33.0.10";
Port = "21";
Login = "bayselonarrend";
Password = "12we...";
Result = OPI_FTP.GetConnectionSettings(Host, Port, Login, Password);
```