Configure http proxy for yowsup-cli
I am behind a proxy server in college and can't get yowsup-cli to work because apparently the httplib used by the python scripts need to be configured for proxy before they can send and receive http requests.
I tried editing some lines in the sendrequest method of warequest.py :
conn = httplib.HTTPSConnection('localhost',8118) #My proxy host and port
conn.request(reqType, host+path, params, headers);
This however did not work. The login mechanism also must be making some http requests and I'm sure it's possible to configure my proxy host and port for yowsup-cli to work properly. Is there some global setting for proxy in yowsup-cli? If not how do I go about this issue? Any help is deeply appreciated.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Any solution?
there is separate connections for registration and protocol only. no different connections for login in protocol, as login is a part of protocol :)
Ok, thank you.
So why the vivek1729 solution don't work?
because he set proxy for registration only, not for protocol socket.
Ok, now i understand.
Can you say me where i can found protocol socket code? Thank you
no idea how to add proxy for socket in python, but this is the main socket class in yowsup: https://github.com/tgalal/yowsup/blob/master/src/Yowsup/ConnectionIO/connectionengine.py
And this one is connecting socket to host: https://github.com/tgalal/yowsup/blob/master/src/Yowsup/Auth/auth.py#L62
Ok i will try to do it and post here the result. Thx
@Marcorele, any solution?
I added support a http proxy. Check my pull request #742.
@dinhoabreu patch worked :+1: