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

serve socks5 is slow and broken #106

Open
mcgr0g opened this issue Sep 5, 2022 · 0 comments
Open

serve socks5 is slow and broken #106

mcgr0g opened this issue Sep 5, 2022 · 0 comments

Comments

@mcgr0g
Copy link

mcgr0g commented Sep 5, 2022

check latest docker image:

docker images | grep proxy
bluet/proxybroker2         latest          0d842236e4e0   6 days ago      179MB

it can find:

$ docker run --rm bluet/proxybroker2 --log INFO find --types SOCKS5 --lvl High --countries US UK DE FR NL --strict -l 10
<Proxy US 0.97s [SOCKS5] 184.178.172.13:15311>
<Proxy US 0.97s [SOCKS5] 98.162.25.29:31679>
<Proxy US 1.04s [SOCKS5] 72.210.252.134:46164>
<Proxy US 1.04s [SOCKS5] 184.178.172.28:15294>
<Proxy US 1.05s [SOCKS5] 184.178.172.25:15291>
<Proxy US 1.30s [SOCKS5] 184.178.172.18:15280>
<Proxy US 3.59s [SOCKS5] 72.49.49.11:31034>
<Proxy US 3.59s [SOCKS5] 66.42.224.229:41679>
<Proxy US 1.38s [SOCKS5] 184.178.172.5:15303>
[22:55:40] - ERROR - proxybroker - 066.29.154.103:3128: Error at creating: 
[22:55:40] - INFO - proxybroker - Done! Total found proxies: 1754
<Proxy US 0.26s [SOCKS5] 174.64.199.79:4145>

and list is valid:

$ curl --socks5 184.178.172.13:15311 http://httpbin.org/ip
{
  "origin": "184.178.172.13"
}

but serve miss found earlier items and load something another:

$ docker run --rm bluet/proxybroker2 --log INFO serve --host 127.0.0.1 --port 8888 --types SOCKS5 --lvl High --countries UK DE FR NL --min-queue 5
/usr/local/lib/python3.9/asyncio/events.py:80: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.
  self._context.run(self._callback, *self._args)
Server started at http://127.0.0.1:8888
[22:56:10] - INFO - proxybroker - Listening established on ('127.0.0.1', 8888)
[22:56:29] - ERROR - proxybroker - 047.88.6.66:4672: Error at creating: 
[22:56:30] - ERROR - proxybroker - 068.183.98.123:3128: Error at creating: 
[22:56:32] - ERROR - proxybroker - 072.210.252.134:46164: Error at creating: 
[22:56:33] - ERROR - proxybroker - 047.91.57.156:3000: Error at creating: 
[22:56:33] - ERROR - proxybroker - 071.19.249.118:8001: Error at creating: 
[22:56:35] - ERROR - proxybroker - 080.48.119.28:8080: Error at creating: 
[22:56:35] - ERROR - proxybroker - 094.74.117.93:2526: Error at creating: 
[22:56:54] - ERROR - proxybroker - 043.225.140.143:3000: Error at creating: 
[22:56:54] - ERROR - proxybroker - 03.144.188.184:8080: Error at creating: 
[22:56:57] - ERROR - proxybroker - 066.29.154.103:3128: Error at creating: 
[22:56:57] - ERROR - proxybroker - 045.79.27.210:1080: Error at creating: 
[22:56:59] - ERROR - proxybroker - 066.29.154.105:3128: Error at creating: 
[22:56:59] - ERROR - proxybroker - 05.153.234.91:3128: Error at creating: 
[22:57:00] - ERROR - proxybroker - 045.169.162.1:3128: Error at creating: 
[22:57:03] - ERROR - proxybroker - 047.88.8.118:3000: Error at creating: 
[23:00:49] - ERROR - proxybroker - 103.250.166.04:6667: Error at creating: 
^C[23:01:00] - INFO - proxybroker - Done! Total found proxies: 30726
[23:01:00] - INFO - proxybroker - Server is stopped
[23:01:00] - INFO - proxybroker - Stop!

As you see counter is 30726. And "find counter" equal 1754.
This indicates that the serve method is skipping valid records and this is the reason for the slow work.

second problem: "broken" proxy really worked

$ curl --socks5 47.88.6.66:4672 http://httpbin.org/ip
{
  "origin": "47.88.6.66"
}

Expected behavior
1/ serve method not missing element, accessible in find
2/ serve method correctly identify negotiability of proxies

Environment
Docker image

{
    "Id": "sha256:0d842236e4e016fcd811ca79588b7876434c420224eccd5081d845d75963a36e",
    "RepoTags": [
        "bluet/proxybroker2:latest"
    ],
    "RepoDigests": [
        "bluet/proxybroker2@sha256:9a19953e4789aa211b0ce5338b2b644831b111702e19ac93eb0cd1fd27eca0aa"
    ],
    "Created": "2022-08-30T21:53:47.639486018Z"
    },
    Config": {
        "Env": [
            "PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "LANG=C.UTF-8",
            "GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568",
            "PYTHON_VERSION=3.9.13",
            "PYTHON_PIP_VERSION=22.0.4",
            "PYTHON_SETUPTOOLS_VERSION=58.1.0",
            "PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/5eaac1050023df1f5c98b173b248c260023f2278/public/get-pip.py",
            "PYTHON_GET_PIP_SHA256=5aefe6ade911d997af080b315ebcb7f882212d070465df544e1175ac2be519b4",
            "PYTHONDONTWRITEBYTECODE=1",
            "PYTHONUNBUFFERED=1",
            "PIP_NO_CACHE_DIR=1",
            "PIP_DISABLE_PIP_VERSION_CHECK=1"
        ],
    },
    "Architecture": "amd64",
    "Os": "linux"
}

Also tested in ubuntu and virtualenv in Python 3.8.10. Installatin via pip install -U git+https://github.com/bluet/proxybroker2.git today.

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

1 participant