feat: add socks username/password config (#890)

Co-authored-by: Redon <790348264@qq.com>
main
Hank 2 years ago committed by GitHub
parent d2a852d5eb
commit 90f0c3a80b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -174,6 +174,8 @@ pnpm dev
- `TIMEOUT_MS` timeout, in milliseconds, optional - `TIMEOUT_MS` timeout, in milliseconds, optional
- `SOCKS_PROXY_HOST` optional, effective with SOCKS_PROXY_PORT - `SOCKS_PROXY_HOST` optional, effective with SOCKS_PROXY_PORT
- `SOCKS_PROXY_PORT` optional, effective with SOCKS_PROXY_HOST - `SOCKS_PROXY_PORT` optional, effective with SOCKS_PROXY_HOST
- `SOCKS_PROXY_USERNAME` optional, effective with SOCKS_PROXY_HOST and SOCKS_PROXY_PORT
- `SOCKS_PROXY_PASSWORD` optional, effective with SOCKS_PROXY_HOST and SOCKS_PROXY_PORT
- `HTTPS_PROXY` optional, support httphttps, socks5 - `HTTPS_PROXY` optional, support httphttps, socks5
- `ALL_PROXY` optional, support httphttps, socks5 - `ALL_PROXY` optional, support httphttps, socks5
@ -225,6 +227,10 @@ services:
SOCKS_PROXY_HOST: xxxx SOCKS_PROXY_HOST: xxxx
# socks proxy port, optional, effective with SOCKS_PROXY_HOST # socks proxy port, optional, effective with SOCKS_PROXY_HOST
SOCKS_PROXY_PORT: xxxx SOCKS_PROXY_PORT: xxxx
# socks proxy, optional, effective with SOCKS_PROXY_HOST and SOCKS_PROXY_PORT
SOCKS_PROXY_USERNAME: xxxx
# socks proxy port, optional, effective with SOCKS_PROXY_HOST and SOCKS_PROXY_PORT
SOCKS_PROXY_PASSWORD: xxxx
# HTTPS Proxyoptional, support http, https, socks5 # HTTPS Proxyoptional, support http, https, socks5
HTTPS_PROXY: http://xxx:7890 HTTPS_PROXY: http://xxx:7890
``` ```
@ -238,7 +244,7 @@ The `OPENAI_API_MODEL` is optional and only used when setting the `OPENAI_API_KE
#### Railway Environment Variables #### Railway Environment Variables
| Environment Variable | Required | Description | | Environment Variable | Required | Description |
| -------------------- | -------- | ------------------------------------------------------------------------------------------------- | |------------------------|-------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| `PORT` | Required | Default: `3002` | | `PORT` | Required | Default: `3002` |
| `AUTH_SECRET_KEY` | Optional | access password | | `AUTH_SECRET_KEY` | Optional | access password |
| `TIMEOUT_MS` | Optional | Timeout in milliseconds | | `TIMEOUT_MS` | Optional | Timeout in milliseconds |
@ -249,6 +255,8 @@ The `OPENAI_API_MODEL` is optional and only used when setting the `OPENAI_API_KE
| `API_REVERSE_PROXY` | Optional, only for `Web API` | Reverse proxy address for `Web API`. [Details](https://github.com/transitive-bullshit/chatgpt-api#reverse-proxy) | | `API_REVERSE_PROXY` | Optional, only for `Web API` | Reverse proxy address for `Web API`. [Details](https://github.com/transitive-bullshit/chatgpt-api#reverse-proxy) |
| `SOCKS_PROXY_HOST` | Optional, effective with `SOCKS_PROXY_PORT` | Socks proxy. | | `SOCKS_PROXY_HOST` | Optional, effective with `SOCKS_PROXY_PORT` | Socks proxy. |
| `SOCKS_PROXY_PORT` | Optional, effective with `SOCKS_PROXY_HOST` | Socks proxy port. | | `SOCKS_PROXY_PORT` | Optional, effective with `SOCKS_PROXY_HOST` | Socks proxy port. |
| `SOCKS_PROXY_USERNAME` | Optional, effective with `SOCKS_PROXY_HOST` & `SOCKS_PROXY_PORT` | Socks proxy username. |
| `SOCKS_PROXY_PASSWORD` | Optional, effective with `SOCKS_PROXY_HOST` & `SOCKS_PROXY_PORT` | Socks proxy password. |
| `HTTPS_PROXY` | Optional | HTTPS Proxy. | | `HTTPS_PROXY` | Optional | HTTPS Proxy. |
| `ALL_PROXY` | Optional | ALL Proxy. | | `ALL_PROXY` | Optional | ALL Proxy. |

@ -27,6 +27,10 @@ services:
SOCKS_PROXY_HOST: SOCKS_PROXY_HOST:
# Socks代理端口可选和 SOCKS_PROXY_HOST 一起时生效 # Socks代理端口可选和 SOCKS_PROXY_HOST 一起时生效
SOCKS_PROXY_PORT: SOCKS_PROXY_PORT:
# Socks代理用户名可选和 SOCKS_PROXY_HOST & SOCKS_PROXY_PORT 一起时生效
SOCKS_PROXY_USERNAME:
# Socks代理密码可选和 SOCKS_PROXY_HOST & SOCKS_PROXY_PORT 一起时生效
SOCKS_PROXY_PASSWORD:
# HTTPS_PROXY 代理,可选 # HTTPS_PROXY 代理,可选
HTTPS_PROXY: HTTPS_PROXY:
nginx: nginx:

Loading…
Cancel
Save