poe-api
poe-api copied to clipboard
How to use socks5 like this: proxy = 'socks5://{}:{}@{}:{}'.format(key, password, proxy_host, proxy_port)
I need set socks5 with username and password, but not work , my code like this:
proxy_host = "67.220.182.3"
proxy_port = "10001"
key = "key"
password = "password"
proxy = 'socks5://{}:{}@{}:{}'.format(key, password, proxy_host, proxy_port)
client = poe.Client(token, proxy=proxy)
I use PySocks set proxy, change my code,like this:
socks.set_default_proxy(socks.SOCKS5,
__PROXY_HOST__,
proxy_port,
username=__KEY__,
password=__PASSWORD__)
socket.socket = socks.socksocket
client = poe.Client(token)
return client.send_message(chatbot, message.content, with_chat_break=False)
is it can work?