You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-10-08 22:51:57 +02:00
Доработка доков, vendored OpenSSL для Windows
This commit is contained in:
7
docs/en/md/Instructions/FTP.md
vendored
7
docs/en/md/Instructions/FTP.md
vendored
@@ -10,6 +10,13 @@ keywords: [1C, 1C:Enterprise, 1C:Enterprise 8.3, API, Integration, Services, Dat
|
||||
|
||||
This section is dedicated to the library for working with FTP(s). On this page, all the steps necessary to start working are described
|
||||
|
||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
||||
|
||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
||||
<div class="addin">An external component is used to implement some functions in this library<br/>
|
||||
Please review the ["About external components"](/docs/Start/Component-requirements) section before getting started</div>
|
||||
</div>
|
||||
|
||||
## Getting Started
|
||||
|
||||
This library provides various methods for working with FTP(s) on the client side. Each method accepts a `Connection` as its first parameter, which can be initialized in one of two ways:
|
||||
|
56
docs/en/md/Instructions/SFTP.md
vendored
56
docs/en/md/Instructions/SFTP.md
vendored
@@ -8,6 +8,60 @@ keywords: [1C, 1C:Enterprise, 1C:Enterprise 8.3, API, Integration, Services, Dat
|
||||
|
||||
# SFTP
|
||||
|
||||
This section is dedicated to the library for working with FTP(s). On this page, all the steps necessary to start working are described
|
||||
This section is dedicated to the library for working with SFTP. On this page, all the steps necessary to start working are described
|
||||
|
||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
||||
|
||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
||||
<div class="addin">An external component is used to implement some functions in this library<br/>
|
||||
Please review the ["About external components"](/docs/Start/Component-requirements) section before getting started</div>
|
||||
</div>
|
||||
|
||||
<div class="theme-admonition theme-admonition-caution admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--warning">
|
||||
|
||||
<img src={require('../../static/img/lock.png').default} class="tipimage" />
|
||||
<div class="addin">This library requires **OpenSSL 3.x** to run on Linux <br/>
|
||||
Learn more: <a href="/docs/Start/Component-requirements#openssl" class="orangelink">"Using OpenSSL in External Components"</a></div>
|
||||
</div>
|
||||
|
||||
## Getting Started
|
||||
|
||||
This library provides various methods for working with SFTP on the client side. Each method accepts a `Connection` as its first parameter, which can be initialized in one of two ways:
|
||||
|
||||
1. Using the `OpenConnection` function. In this case, a component object is returned that supports a single connection for multiple requests.
|
||||
2. Using the `GetConnectionConfiguration` function. In this case, only a connection description structure is returned. Each function receiving this structure as the `Connection` parameter will internally create a new connection and close it upon completion
|
||||
|
||||
When performing multiple sequential requests to an SFTP server, it is recommended to use a full connection obtained via the `OpenConnection` function
|
||||
|
||||
Once a connection is established, it can be used with the library's other methods to perform specific tasks
|
||||
|
||||
## Proxy Usage
|
||||
|
||||
The client supports establishing connections through a proxy server. Proxy settings can be obtained using the `GetProxySettings` function. The resulting structure must then be passed to either `OpenConnection` or `GetConnectionConfiguration` when initiating work
|
||||
|
||||
```bsl
|
||||
|
||||
...
|
||||
|
||||
ProxyType = "http"; // http, socks5, socks4
|
||||
|
||||
ProxyAddress = FunctionParameters["Proxy_IP"];
|
||||
ProxyPort = FunctionParameters["Proxy_Port"];
|
||||
ProxyLogin = FunctionParameters["Proxy_User"];
|
||||
ProxyPassword = FunctionParameters["Proxy_Password"];
|
||||
|
||||
ProxySettings = OPI_SFTP.GetProxySettings(ProxyAddress, ProxyPort, ProxyType, ProxyLogin, ProxyPassword);
|
||||
|
||||
Connection = OPI_SFTP.CreateConnection(SFTPSettings, ProxySettings);
|
||||
|
||||
```
|
||||
|
||||
Support is provided for socks4, socks5, and http proxy servers
|
||||
|
||||
:::warning
|
||||
Operation via http-proxy is experimental and may be unstable depending on the proxy server’s implementation, configuration, and capabilities. It is recommended to use socks-proxy whenever possible for stable traffic transmission
|
||||
:::
|
||||
|
||||
## Compatibility with the SSH Library
|
||||
|
||||
The SFTP and SSH libraries share a common connection format. This means that when working with SFTP, you can also execute `sh` commands by passing the existing connection object to the SSH library methods.
|
||||
|
56
docs/en/md/Instructions/SSH.md
vendored
56
docs/en/md/Instructions/SSH.md
vendored
@@ -8,6 +8,60 @@ keywords: [1C, 1C:Enterprise, 1C:Enterprise 8.3, API, Integration, Services, Dat
|
||||
|
||||
# SSH
|
||||
|
||||
This section is dedicated to the library for working with FTP(s). On this page, all the steps necessary to start working are described
|
||||
This section is dedicated to the library for working with SSH. On this page, all the steps necessary to start working are described
|
||||
|
||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
||||
|
||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
||||
<div class="addin">An external component is used to implement some functions in this library<br/>
|
||||
Please review the ["About external components"](/docs/Start/Component-requirements) section before getting started</div>
|
||||
</div>
|
||||
|
||||
<div class="theme-admonition theme-admonition-caution admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--warning">
|
||||
|
||||
<img src={require('../../static/img/lock.png').default} class="tipimage" />
|
||||
<div class="addin">This library requires **OpenSSL 3.x** to run on Linux <br/>
|
||||
Learn more: <a href="/docs/Start/Component-requirements#openssl" class="orangelink">"Using OpenSSL in External Components"</a></div>
|
||||
</div>
|
||||
|
||||
## Getting Started
|
||||
|
||||
This library provides various methods for working with SSH on the client side. Each method accepts a `Connection` as its first parameter, which can be initialized in one of two ways:
|
||||
|
||||
1. Using the `OpenConnection` function. In this case, a component object is returned that supports a single connection for multiple requests.
|
||||
2. Using the `GetConnectionConfiguration` function. In this case, only a connection description structure is returned. Each function receiving this structure as the `Connection` parameter will internally create a new connection and close it upon completion
|
||||
|
||||
When performing multiple sequential requests to an SSH server, it is recommended to use a full connection obtained via the `OpenConnection` function
|
||||
|
||||
After establishing a connection, `sh` commands can be executed using the `ExecuteCommand` function.
|
||||
|
||||
:::important
|
||||
Commands are run in `execute` mode. This means that execution context, such as changing the current working directory or setting environment variables, is not preserved between calls. To execute multiple sequential commands, they must be included in a single call to the `ExecuteCommand` function.
|
||||
:::
|
||||
|
||||
## Proxy Usage
|
||||
|
||||
The client supports establishing connections through a proxy server. Proxy settings can be obtained using the `GetProxySettings` function. The resulting structure must then be passed to either `OpenConnection` or `GetConnectionConfiguration` when initiating work
|
||||
|
||||
```bsl
|
||||
|
||||
...
|
||||
|
||||
ProxyType = "http"; // http, socks5, socks4
|
||||
|
||||
ProxyAddress = FunctionParameters["Proxy_IP"];
|
||||
ProxyPort = FunctionParameters["Proxy_Port"];
|
||||
ProxyLogin = FunctionParameters["Proxy_User"];
|
||||
ProxyPassword = FunctionParameters["Proxy_Password"];
|
||||
|
||||
ProxySettings = OPI_SSH.GetProxySettings(ProxyAddress, ProxyPort, ProxyType, ProxyLogin, ProxyPassword);
|
||||
|
||||
Connection = OPI_SSH.CreateConnection(SSHSettings, ProxySettings);
|
||||
|
||||
```
|
||||
|
||||
Support is provided for socks4, socks5, and http proxy servers
|
||||
|
||||
:::warning
|
||||
Operation via http-proxy is experimental and may be unstable depending on the proxy server’s implementation, configuration, and capabilities. It is recommended to use socks-proxy whenever possible for stable traffic transmission
|
||||
:::
|
||||
|
7
docs/ru/md/Instructions/FTP.md
vendored
7
docs/ru/md/Instructions/FTP.md
vendored
@@ -10,6 +10,13 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
||||
|
||||
Этот раздел посвящен библиотеке для работы с протоколом FTP(s) в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
||||
|
||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
||||
|
||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
||||
<div class="addin">Для реализации некоторых функции в этой библиотеке используется внешняя компонента <br/>
|
||||
Пожалуйста, ознакомьтесь с разделом ["О внешних компонентах"](/docs/Start/Component-requirements) перед началом работы</div>
|
||||
</div>
|
||||
|
||||
## Начало работы
|
||||
|
||||
Данная библиотека предоставляет различные методы работы с FTP(s) на стороне клиента. Каждый из них принимает в качестве первого параметра `Соединение`, значение которого может быть получено одним из двух способов:
|
||||
|
56
docs/ru/md/Instructions/SFTP.md
vendored
56
docs/ru/md/Instructions/SFTP.md
vendored
@@ -10,4 +10,60 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
||||
|
||||
Этот раздел посвящен библиотеке для работы с протоколом SFTP в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
||||
|
||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
||||
|
||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
||||
<div class="addin">Для реализации некоторых функции в этой библиотеке используется внешняя компонента <br/>
|
||||
Пожалуйста, ознакомьтесь с разделом ["О внешних компонентах"](/docs/Start/Component-requirements) перед началом работы</div>
|
||||
</div>
|
||||
|
||||
<div class="theme-admonition theme-admonition-caution admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--warning">
|
||||
|
||||
<img src={require('../../static/img/lock.png').default} class="tipimage" />
|
||||
<div class="addin">Для работы этой библиотеки на Linux необходим **OpenSSL 3.x** <br/>
|
||||
Узнать больше: <a href="/docs/Start/Component-requirements#openssl" class="orangelink">"Об использовании OpenSSL во внешних компонентах"</a></div>
|
||||
</div>
|
||||
|
||||
|
||||
## Начало работы
|
||||
|
||||
Данная библиотека предоставляет различные методы работы с SFTP на стороне клиента. Каждый из них принимает в качестве первого параметра `Соединение`, значение которого может быть получено одним из двух способов:
|
||||
|
||||
1. При помощи функции `ОткрытьСоединение`. В этом случае возвращается объект компоненты, поддерживающий единое соединение для множества запросов
|
||||
2. При помощи функции `ПолучитьКонфигурациюСоединения`. В этом случае возвращается лишь структура описания соединения. Каждая функция, в которую эта структура будет передана в качестве `Соединения`, будет создавать новое подключение внутри себя и закрывать его по окончании работы
|
||||
|
||||
При выполнении множественных последовательных запросов к серверу FTP рекомендуется использовать полноценное соединение, получаемое при помощи функции `ОткрытьСоединение`
|
||||
|
||||
После формирования соединения, оно может быть использовано при работе с остальными методами библиотеки для выполнения конкретных задач
|
||||
|
||||
## Использование прокси
|
||||
|
||||
Данный клиент поддерживает создание соединения через прокси сервер. Получить структуру настроек прокси можно при помощи функции `ПолучитьНастройкиПрокси`. Полученная структура, далее, должна быть передана в функцию `ОткрытьСоединение` или `ПолучитьКонфигурациюСоединения` при начале работы
|
||||
|
||||
```bsl
|
||||
|
||||
...
|
||||
|
||||
ТипПрокси = "http"; // http, socks5, socks4
|
||||
|
||||
АдресПрокси = "127.0.0.1";
|
||||
ПортПрокси = "8071";
|
||||
ЛогинПрокси = "proxyuser";
|
||||
ПарольПрокси = "12we...";
|
||||
|
||||
НастройкиПрокси = OPI_SFTP.ПолучитьНастройкиПрокси(АдресПрокси, ПортПрокси, ТипПрокси, ЛогинПрокси, ПарольПрокси);
|
||||
|
||||
Соединение = OPI_SFTP.ОткрытьСоединение(НастройкиSFTP, НастройкиПрокси);
|
||||
|
||||
```
|
||||
|
||||
Поддерживается работа через SOCKS4, SOCKS5 и HTTP-прокси серверы
|
||||
|
||||
:::warning
|
||||
Работа через http-прокси является экспериментальной и может быть нестабильной в зависимости от реализации прокси-сервера, его настроек и возможностей. Рекомендуется по возможности использовать SOCKS-прокси для стабильной передачи трафика
|
||||
:::
|
||||
|
||||
## Совместимость с библиотекой SSH
|
||||
|
||||
Библиотеки SFTP и SSH имеют общий формат соединения. Это значит, что при работе с SFTP вы также можете вызывать команды `sh`, передавая в методы библиотеки SSH уже существующий объект соединения
|
||||
|
||||
|
54
docs/ru/md/Instructions/SSH.md
vendored
54
docs/ru/md/Instructions/SSH.md
vendored
@@ -10,4 +10,58 @@ keywords: [1C, 1С, 1С:Предприятие, 1С:Предприятие 8.3,
|
||||
|
||||
Этот раздел посвящен библиотеке для работы с протоколом SSH в 1С:Предприятие, OneScript и CLI. На данной странице описаны все действия, необходимые для полноценного начала работы
|
||||
|
||||
<div class="theme-admonition theme-admonition-info admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--info">
|
||||
|
||||
<img src={require('../../static/img/addin.png').default} class="tipimage" />
|
||||
<div class="addin">Для реализации некоторых функции в этой библиотеке используется внешняя компонента <br/>
|
||||
Пожалуйста, ознакомьтесь с разделом ["О внешних компонентах"](/docs/Start/Component-requirements) перед началом работы</div>
|
||||
</div>
|
||||
|
||||
<div class="theme-admonition theme-admonition-caution admonition_node_modules-@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module alert alert--warning">
|
||||
|
||||
<img src={require('../../static/img/lock.png').default} class="tipimage" />
|
||||
<div class="addin">Для работы этой библиотеки на Linux необходим **OpenSSL 3.x** <br/>
|
||||
Узнать больше: <a href="/docs/Start/Component-requirements#openssl" class="orangelink">"Об использовании OpenSSL во внешних компонентах"</a></div>
|
||||
</div>
|
||||
|
||||
## Начало работы
|
||||
|
||||
Данная библиотека предоставляет различные методы работы с SSH на стороне клиента. Каждый из них принимает в качестве первого параметра `Соединение`, значение которого может быть получено одним из двух способов:
|
||||
|
||||
1. При помощи функции `ОткрытьСоединение`. В этом случае возвращается объект компоненты, поддерживающий единое соединение для множества запросов
|
||||
2. При помощи функции `ПолучитьКонфигурациюСоединения`. В этом случае возвращается лишь структура описания соединения. Каждая функция, в которую эта структура будет передана в качестве `Соединения`, будет создавать новое подключение внутри себя и закрывать его по окончании работы
|
||||
|
||||
При выполнении множественных последовательных запросов к серверу SSH рекомендуется использовать полноценное соединение, получаемое при помощи функции `ОткрытьСоединение`
|
||||
|
||||
После установки соединения, вызов команд `sh` можно осуществлять при помощи `ВыполнитьКоманду`
|
||||
|
||||
:::important
|
||||
Команды выполняются в режиме `execute`, а не в режиме `shell`. Это означает, что контекст выполнения, вроде смены текущей директории или переменных окружения, не сохраняется между вызовами. Для выполнения нескольких последовательных команд они должны находится в одном вызове функции `ВыполнитьКоманду`
|
||||
:::
|
||||
|
||||
## Использование прокси
|
||||
|
||||
Данный клиент поддерживает создание соединения через прокси сервер. Получить структуру настроек прокси можно при помощи функции `ПолучитьНастройкиПрокси`. Полученная структура, далее, должна быть передана в функцию `ОткрытьСоединение` или `ПолучитьКонфигурациюСоединения` при начале работы
|
||||
|
||||
```bsl
|
||||
|
||||
...
|
||||
|
||||
ТипПрокси = "http"; // http, socks5, socks4
|
||||
|
||||
АдресПрокси = "127.0.0.1";
|
||||
ПортПрокси = "8071";
|
||||
ЛогинПрокси = "proxyuser";
|
||||
ПарольПрокси = "12we...";
|
||||
|
||||
НастройкиПрокси = OPI_SSH.ПолучитьНастройкиПрокси(АдресПрокси, ПортПрокси, ТипПрокси, ЛогинПрокси, ПарольПрокси);
|
||||
|
||||
Соединение = OPI_SSH.ОткрытьСоединение(НастройкиSSH, НастройкиПрокси);
|
||||
|
||||
```
|
||||
|
||||
Поддерживается работа через SOCKS4, SOCKS5 и HTTP-прокси серверы
|
||||
|
||||
:::warning
|
||||
Работа через http-прокси является экспериментальной и может быть нестабильной в зависимости от реализации прокси-сервера, его настроек и возможностей. Рекомендуется по возможности использовать SOCKS-прокси для стабильной передачи трафика
|
||||
:::
|
||||
|
10
src/addins/ssh/Cargo.lock
generated
10
src/addins/ssh/Cargo.lock
generated
@@ -128,6 +128,15 @@ version = "2.7.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
|
||||
|
||||
[[package]]
|
||||
name = "openssl-src"
|
||||
version = "300.4.2+3.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "168ce4e058f975fe43e89d9ccf78ca668601887ae736090aacc23ae353c298e2"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "openssl-sys"
|
||||
version = "0.9.109"
|
||||
@@ -136,6 +145,7 @@ checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
"openssl-src",
|
||||
"pkg-config",
|
||||
"vcpkg",
|
||||
]
|
||||
|
@@ -17,5 +17,12 @@ opt-level = "z"
|
||||
addin1c = "0.5.0"
|
||||
serde_json = "1.0.140"
|
||||
serde = { version = "1.0.219", features = ["derive"] }
|
||||
ssh2 = { version = "0.9.5", features = ["openssl-on-win32"] }
|
||||
common-tcp = { path = "../!commons/common-tcp" }
|
||||
|
||||
[target.'cfg(all(windows, target_env = "msvc"))'.dependencies.ssh2]
|
||||
version = "0.9.5"
|
||||
features = ["vendored-openssl", "openssl-on-win32"]
|
||||
|
||||
# Для всех остальных платформ (Linux, macOS, Windows GNU)
|
||||
[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies.ssh2]
|
||||
version = "0.9.5"
|
||||
|
@@ -1,14 +1,9 @@
|
||||
"MAIN ---"
|
||||
linux-vdso.so.1 (0x00007ffc92f7c000)
|
||||
libssl.so.3 => /lib64/libssl.so.3 (0x00007d7cede00000)
|
||||
libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007d7ced600000)
|
||||
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007d7ced200000)
|
||||
libc.so.6 => /lib64/libc.so.6 (0x00007d7cece00000)
|
||||
libdl.so.2 => /lib64/libdl.so.2 (0x00007d7ceca00000)
|
||||
/lib64/ld-linux-x86-64.so.2 (0x00007d7cee200000)
|
||||
libz.so.1 => /lib64/libz.so.1 (0x00007d7cec600000)
|
||||
GLIBC_2.2.5
|
||||
GLIBC_2.3
|
||||
GLIBC_2.3.4
|
||||
GLIBC_2.14
|
||||
GLIBC_2.17
|
||||
linux-vdso.so.1 (0x00007ffed8be2000)
|
||||
libssl.so.3 => /lib64/libssl.so.3 (0x00007e8e49a00000)
|
||||
libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007e8e49200000)
|
||||
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007e8e48e00000)
|
||||
libc.so.6 => /lib64/libc.so.6 (0x00007e8e48a00000)
|
||||
libdl.so.2 => /lib64/libdl.so.2 (0x00007e8e48600000)
|
||||
/lib64/ld-linux-x86-64.so.2 (0x00007e8e49e00000)
|
||||
libz.so.1 => /lib64/libz.so.1 (0x00007e8e48200000)
|
||||
|
BIN
src/en/OInt/addins/OPI_SSH.zip
vendored
BIN
src/en/OInt/addins/OPI_SSH.zip
vendored
Binary file not shown.
Binary file not shown.
BIN
src/ru/OInt/addins/OPI_SSH.zip
vendored
BIN
src/ru/OInt/addins/OPI_SSH.zip
vendored
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user