socket in python with proxies

A

Astan Chee

Hi, I have a proxy server that requires authentication on a non-standard
port and Im trying to connect to it via socket.connect()
I tried doing this:
import socket
server = ("username:p[email protected]",1234)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(server)

I keep getting the

Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
s.connect(server)
File "<string>", line 1, in connect
gaierror: (11001, 'getaddrinfo failed')

What does this mean? and can I actually use username/password to connect
using a socket in python?
Thanks
Astan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top