mirror of https://github.com/Nofated095/Q2TG.git
Merge pull request #152 from ccmuyuu/rainbowcat
Add socks5 username/password
This commit is contained in:
commit
e53df687cb
|
@ -64,3 +64,6 @@ services:
|
|||
# 如果需要通过代理联网,那么设置下面两个变量
|
||||
#- PROXY_IP=
|
||||
#- PROXY_PORT=
|
||||
# 代理联网认证,有需要请修改下面两个变量
|
||||
#- PROXY_USERNAME=
|
||||
#- PROXY_PASSWORD=
|
||||
|
|
|
@ -53,6 +53,8 @@ export default class Telegram {
|
|||
socksType: 5,
|
||||
ip: process.env.PROXY_IP,
|
||||
port: parseInt(process.env.PROXY_PORT),
|
||||
...(process.env.PROXY_USERNAME && { username: process.env.PROXY_USERNAME }),
|
||||
...(process.env.PROXY_PASSWORD && { password: process.env.PROXY_PASSWORD }),
|
||||
} : undefined,
|
||||
autoReconnect: true,
|
||||
networkSocket: process.env.TG_CONNECTION === 'websocket' ? PromisedWebSockets : PromisedNetSockets,
|
||||
|
|
Loading…
Reference in New Issue