Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending UDP packets through a SOCK5 #140

Open
All3xJ opened this issue Apr 16, 2020 · 1 comment
Open

Sending UDP packets through a SOCK5 #140

All3xJ opened this issue Apr 16, 2020 · 1 comment

Comments

@All3xJ
Copy link

All3xJ commented Apr 16, 2020

I have this code:

import socket
import socks
import random

data = random._urandom(1024)
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "IP_OF_SOCK5", PORT_OF_SOCK5, True)
s = socks.socksocket(socket.AF_INET, socket.SOCK_DGRAM)
s.sendto(data, ('IP_DST',PORT_DST))

But I receive these errors:

socks.GeneralProxyError: Connection closed unexpectedly
or
ConnectionResetError: [Errno 54] Connection reset by peer
or
TimeoutError: [Errno 60] Operation timed out

In theory, SOCKS5 supports UDP forwarding, my problem is: how can I implement it in Python? What am I doing wrong?

And no, I'm not using TOR, I know in fact that TOR doesn't support UDP.

What am I doing wrong?

@lilanleo
Copy link

Same problem to me :( have you worked it out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants