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

Add missing features from proxybroker2 (minimum proxies in queue, remove proxy, sample script, strategy option) #161

Open
wants to merge 256 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
256 commits
Select commit Hold shift + click to select a range
7c3222f
added: urls in refs in README
bluet May 2, 2020
7556738
added: Dockerfile for auto build on Docker Hub
bluet May 2, 2020
0bed8af
reduce pytest errors
bluet May 2, 2020
667b6ce
bump version. merged https://github.com/constverum/ProxyBroker/pull/121
bluet May 2, 2020
d0131bb
inject X-Proxy-Info header in response
bluet May 3, 2020
1feda62
bugfix: type error
bluet May 3, 2020
58fe9d8
cleanup comments
bluet May 3, 2020
d2a179c
Merge pull request #2 from bluet/1-send-proxy-info-back-to-client-in-…
bluet May 3, 2020
d0ec826
update README
bluet May 3, 2020
d17f09a
Update and rename README.rst to README.md
bluet May 3, 2020
190d59b
added history cache and retrieving. changed: proxy control url
bluet May 3, 2020
b82fae2
bugfix: installation error due to renaming README.rst to README.md
bluet May 4, 2020
97886a8
store url<->proxy history in cache
bluet May 4, 2020
1972ae9
update README.md, added X-Proxy-Info and HTTP API descriptions
bluet May 4, 2020
52626c3
Update README.md
bluet May 4, 2020
84bd8e5
Update README.md
bluet May 4, 2020
046648a
Update README.md
bluet May 4, 2020
635656a
init
afunTW May 9, 2020
ee43359
update: end of file fixer
afunTW May 9, 2020
84c2631
update: pipenv env setting
afunTW May 9, 2020
a2bb4fe
update: pre-comiit check all files
afunTW May 9, 2020
d7e9fb7
update: requirements for py36
afunTW May 9, 2020
4d2f60d
update: add cachetools in requirements
afunTW May 9, 2020
f1d1421
update: flake format
afunTW May 10, 2020
61dd626
update: pytest ignore flake8 max length check
afunTW May 10, 2020
7fe6a34
Bump attrs from 19.1.0 to 19.3.0
dependabot-preview[bot] May 21, 2020
298157c
Merge pull request #6 from bluet/dependabot/pip/attrs-19.3.0
bluet May 22, 2020
a235eed
update: black not support 3.6
afunTW May 23, 2020
89f7190
bugfix: pytest-mock mocker no need context manager
afunTW May 23, 2020
f95dc55
bugfix: pytest-mock mocker no need context manager
afunTW May 23, 2020
d6f2095
added missing dependency cachetools
bluet May 25, 2020
be9763d
fix typo
bluet May 25, 2020
15b69b0
Merge branch 'master' of https://github.com/bluet/proxybroker2
bluet May 25, 2020
80b10ab
update: solved dependencies that cause merge conflict
afunTW Jun 30, 2020
8ce5c33
solve merge conflict
afunTW Jul 2, 2020
3f26fed
Merge pull request #4 from afunTW/master
bluet Jul 2, 2020
bb4b651
Adding optional SIGINT handler. It raises RuntimeError when run on a …
quancore Jul 2, 2020
186420f
attrs version bumped in setup.py
ivaano Jul 3, 2020
cab734e
text output
ivaano Jul 4, 2020
3b88d72
documentation fix
ivaano Jul 4, 2020
525adf5
bugfix on get_real_ext_ip method
quancore Jul 4, 2020
a6e3fd9
Merge pull request #9 from quancore/optional_sigint_handler
afunTW Aug 20, 2020
0afb7b0
fix: requirements/dev-py36.txt to reduce vulnerabilities
snyk-bot Jan 21, 2021
69c44e9
Merge pull request #18 from bluet/snyk-fix-9a1892184ca2431ebfe33fb99b…
bluet Jan 21, 2021
b59d7e9
fix: requirements/dev-py36.txt to reduce vulnerabilities
snyk-bot Feb 2, 2021
989f21a
Merge pull request #19 from bluet/snyk-fix-15615b9465016ce5cb2383360d…
bluet Feb 2, 2021
4f1dfe7
Merge pull request #11 from quancore/external_ip
bluet Jul 6, 2021
d13aba2
specific python version 3.6 in Dockerfile
vincentinttsh Jul 6, 2021
a98c873
fix FLAKE8 FAILED
vincentinttsh Jul 6, 2021
361546f
add github actions python-test-versions.yml
bluet Jul 6, 2021
aa883b1
Update python-test-versions.yml
bluet Jul 6, 2021
9414752
fix test failure
bluet Jul 6, 2021
68b166b
Merge pull request #29 from vincentinttsh/master
bluet Jul 6, 2021
f23af0e
github action for python-publish.yml
bluet Jul 6, 2021
2a07937
Create pylint.yml
bluet Jul 6, 2021
ae07d45
update README.md : compatible python version 3.5, 3.6, 3.7
bluet Jul 6, 2021
d693dc7
github action python 3.7
bluet Jul 6, 2021
51e0fd6
github action python 3.7
bluet Jul 6, 2021
05f88e5
fix file lookup for pylint
bluet Jul 6, 2021
e6e24d6
Delete pylint.yml
bluet Jul 6, 2021
d21f265
Don't lock python packages black version in dev-py36.txt
vincentinttsh Jul 7, 2021
5d8be21
Merge pull request #30 from vincentinttsh/master
bluet Jul 7, 2021
49a9418
fix: tests and styles
a5r0n Sep 26, 2021
02c8a72
fix: Dockerfile to reduce vulnerabilities
snyk-bot Apr 14, 2022
ef7ef48
fix: Dockerfile to reduce vulnerabilities
snyk-bot May 8, 2022
e6c5c64
Create FUNDING.yml
bluet May 16, 2022
0fd6e69
Bump py from 1.8.1 to 1.10.0
dependabot[bot] May 16, 2022
173ddee
Bump pyyaml from 5.3.1 to 5.4
dependabot[bot] May 16, 2022
19633fa
Merge pull request #63 from bluet/dependabot/pip/py-1.10.0
bluet May 16, 2022
3d1c804
Merge pull request #64 from bluet/dependabot/pip/pyyaml-5.4
bluet May 16, 2022
818434e
Merge pull request #60 from bluet/snyk-fix-7c84bda73c4767fdb25fe0bea1…
bluet May 16, 2022
6deabd6
Merge pull request #65 from ivaano/master
bluet May 16, 2022
dc86c0f
docs: update README.md [skip ci]
allcontributors[bot] May 16, 2022
d4aed5f
docs: create .all-contributorsrc [skip ci]
allcontributors[bot] May 16, 2022
28224c2
docs: update README.md [skip ci]
allcontributors[bot] May 16, 2022
c5c6b50
docs: create .all-contributorsrc [skip ci]
allcontributors[bot] May 16, 2022
7ef9ce3
docs: update README.md [skip ci]
allcontributors[bot] May 16, 2022
1e751f0
docs: create .all-contributorsrc [skip ci]
allcontributors[bot] May 16, 2022
46155dd
docs: update README.md [skip ci]
allcontributors[bot] May 16, 2022
64d658f
docs: create .all-contributorsrc [skip ci]
allcontributors[bot] May 16, 2022
729238d
docs: update README.md [skip ci]
allcontributors[bot] May 16, 2022
b423bb9
docs: create .all-contributorsrc [skip ci]
allcontributors[bot] May 16, 2022
7203395
docs: update README.md [skip ci]
allcontributors[bot] May 16, 2022
6a7f302
docs: create .all-contributorsrc [skip ci]
allcontributors[bot] May 16, 2022
f3d0211
Merge pull request #72 from bluet/all-contributors/add-ivaano
bluet May 16, 2022
6452e60
Merge branch 'master' into all-contributors/add-synchronizing
bluet May 16, 2022
0826260
Merge pull request #70 from bluet/all-contributors/add-synchronizing
bluet May 16, 2022
af9c9ef
Merge branch 'master' into all-contributors/add-vincentinttsh
bluet May 16, 2022
921a04d
Merge pull request #69 from bluet/all-contributors/add-vincentinttsh
bluet May 16, 2022
e2bc310
Merge branch 'master' into all-contributors/add-quancore
bluet May 16, 2022
b28fff3
Merge pull request #68 from bluet/all-contributors/add-quancore
bluet May 16, 2022
bad825e
Merge branch 'master' into all-contributors/add-afunTW
bluet May 16, 2022
4987945
Merge pull request #67 from bluet/all-contributors/add-afunTW
bluet May 16, 2022
16604d7
Merge branch 'master' into all-contributors/add-a5r0n
bluet May 16, 2022
e644bf9
Update python-test-versions.yml
bluet May 16, 2022
e05e558
Update README.md
bluet May 16, 2022
e9531a2
Update README.md
bluet May 16, 2022
41637f0
Update python-test-versions.yml
bluet May 16, 2022
d78bd85
build(deps-dev): bump pycares from 3.1.1 to 4.2.0
dependabot[bot] Jul 5, 2022
23ad147
Merge pull request #78 from bluet/dependabot/pip/pycares-4.2.0
bluet Aug 9, 2022
9502256
feature: Update action version
Aug 20, 2022
5af17be
feature: Remove pipenv config due to multi-version python support
Aug 20, 2022
9dd9ad9
feature: Ignore the pipenv config
Aug 20, 2022
60084f4
feature: Deprecate travis CI, using GitHub Actions instead
Aug 20, 2022
904ad08
Merge pull request #79 from bluet/feature/update-github-action
afunTW Aug 20, 2022
96dfb31
fix: Separate the linter and test
Aug 20, 2022
3c4e84e
Merge pull request #80 from bluet/fix/pytest-ignore-linter
afunTW Aug 20, 2022
585f691
Merge pull request #66 from bluet/all-contributors/add-a5r0n
afunTW Aug 20, 2022
e3dc824
Merge pull request #74 from a5r0n/master
afunTW Aug 20, 2022
08d1cde
feature: Deprecate py36 and py37 in CI test
Aug 20, 2022
1b93ae0
feature: Remove py36 dependency
Aug 20, 2022
64f7d6e
Merge pull request #81 from bluet/feature/deprecate-py36-py37-support
afunTW Aug 20, 2022
cd99e89
Merge branch 'master' into snyk-fix-c079a85be00f1db2eadf8c2708bb8a5a
bluet Aug 20, 2022
473b4dd
Merge pull request #55 from bluet/snyk-fix-c079a85be00f1db2eadf8c2708…
bluet Aug 20, 2022
91bb8e9
temporary fix
ziloka Aug 21, 2022
9d8703d
docs: update README.md [skip ci]
allcontributors[bot] Aug 22, 2022
89c1473
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Aug 22, 2022
dd3772c
Merge pull request #88 from ziloka/fix-deprecation
bluet Aug 22, 2022
2da2c8f
Merge pull request #90 from bluet/all-contributors/add-ziloka
bluet Aug 22, 2022
8367f51
downgrade docker base image to python 3.9
bluet Aug 22, 2022
05e2444
build: use poetry for dependency management
a5r0n Aug 21, 2022
b721e10
build(deps): Update python dependencies
a5r0n Aug 21, 2022
d1dc7b3
build(deps): Update python dev dependencies
a5r0n Aug 21, 2022
ef8a587
ci(build): Update Dockerfile to use poetry
a5r0n Aug 21, 2022
fa33cb4
ci(actions): use poetry for testing action
a5r0n Aug 21, 2022
2f31555
fixup! ci(build): Update Dockerfile to use poetry
a5r0n Aug 21, 2022
a0e9770
fix poetry version
a5r0n Aug 22, 2022
6081f7a
fixup! fix poetry version
a5r0n Aug 22, 2022
6d48e15
fix venv path
a5r0n Aug 22, 2022
09d6166
exclude .venv in flake linting
a5r0n Aug 22, 2022
a7763f7
Merge pull request #86 from a5r0n/build/use-poetry
bluet Aug 22, 2022
685d997
Update python-test-versions.yml
bluet Aug 22, 2022
9d6d89d
Update README.md
bluet Aug 22, 2022
4b78ed8
Update pyproject.toml
bluet Aug 22, 2022
22d263f
update pyproject.toml
bluet Aug 22, 2022
4f3f162
run script in venv through Poetry
hms5232 Aug 22, 2022
e8393f2
Merge pull request #92 from hms5232/master
bluet Aug 23, 2022
9a1731c
feature: Add coverage test
Aug 24, 2022
035f23b
feature: Update dependency
Aug 24, 2022
523d65a
feature: Update dependency
Aug 24, 2022
08bac31
Merge pull request #96 from bluet/feature/add-pytest-cov
bluet Aug 24, 2022
d051792
Update FUNDING.yml
bluet Aug 24, 2022
38066f1
Update issue templates
bluet Aug 24, 2022
c40aa8a
Revert "Update FUNDING.yml"
bluet Aug 24, 2022
adbaeff
Update README.md
bluet Aug 26, 2022
de8d880
Update README.md
bluet Aug 26, 2022
a2715be
fix runtime error event loop is closed error
ziloka Aug 23, 2022
46ddcd4
fix asyncio.get_event_loop() deprecation warning for python 3.10
ziloka Aug 23, 2022
2bfe4cf
remove api.py commented code
ziloka Aug 23, 2022
2f54203
fix escape characters deprecation warnings
ziloka Aug 26, 2022
5151cd2
Merge pull request #94 from ziloka/fix/python3.10
bluet Aug 27, 2022
125a8a9
use setup-python built-in cache functionality
hms5232 Aug 24, 2022
a7fbc82
Merge pull request #97 from hms5232/master
bluet Aug 27, 2022
3156c4f
instructions to compile for unix
ziloka Aug 25, 2022
b03ac5f
Update FUNDING.yml
bluet Aug 24, 2022
e18f4ce
Revert "Update FUNDING.yml"
bluet Aug 24, 2022
5bbd628
instructions to compile to exe for major platforms
ziloka Aug 27, 2022
0a4f44a
instructions to compile for unix
ziloka Aug 25, 2022
a5087ff
add py 2 exe github action workflow
ziloka Aug 24, 2022
7359536
Update FUNDING.yml
bluet Aug 24, 2022
ad4b9c1
Revert "Update FUNDING.yml"
bluet Aug 24, 2022
0f2ec7f
add os specific instructions
ziloka Aug 27, 2022
90cefea
executables are in pkg-os-arch format
ziloka Aug 27, 2022
5c27520
Merge pull request #95 from ziloka/update-readme
bluet Aug 30, 2022
2b5e328
fix README.md
bluet Aug 30, 2022
e5563c4
Merge pull request #100 from bluet/bluet-patch-fix-README.md
bluet Aug 30, 2022
3440b68
Merge branch 'master' into ci/py-2-exe
bluet Aug 30, 2022
145c5fe
v2.0.0-alpha4
bluet Aug 30, 2022
bfd9ddc
docs: update README.md [skip ci]
allcontributors[bot] Aug 30, 2022
6f65647
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Aug 30, 2022
b2d1d3e
Merge pull request #102 from bluet/all-contributors/add-hms5232
bluet Aug 30, 2022
623da7b
update badges in README.md
bluet Aug 30, 2022
1f5bb0a
Merge pull request #103 from bluet/bluet-patch-update-badges-in-READM…
bluet Aug 30, 2022
93e988c
update badges in README.md
bluet Aug 30, 2022
1e337d7
Merge pull request #104 from bluet/bluet-patch-update-badges-in-READM…
bluet Aug 30, 2022
f36250e
update docker files
bluet Aug 30, 2022
0ce9c3c
remove docker support for mips64le
bluet Aug 30, 2022
0d2af08
fix docker multiarch build
bluet Aug 30, 2022
f1a3e24
Merge branch 'master' into ci/py-2-exe
bluet Aug 31, 2022
8e79a83
fix compiled exe modulenotfound error no module named aiohttp error
ziloka Nov 4, 2022
de233b1
fix breaking change of the broker constructor
ziloka Nov 4, 2022
d6736a3
Merge pull request #110 from ziloka/bug-fix-broker-constructor
bluet Nov 4, 2022
4d393e3
py2exe: install deps
ziloka Nov 6, 2022
3570f71
fix breaking change of the broker constructor
ziloka Nov 4, 2022
d89ae9f
py2exe: install deps before compile 2 exe
ziloka Nov 8, 2022
99a6f02
bump Poetry in action and remove requirements.txt
hms5232 Dec 29, 2022
15afd9a
Merge pull request #115 from hms5232/master
bluet Dec 31, 2022
fb707ce
remove devcontainer
ziloka Jan 10, 2023
d9cb886
.devcontainer/
bluet Feb 12, 2023
737f6a3
Merge branch 'master' into ci/py-2-exe
bluet Feb 12, 2023
0681fb4
Merge pull request #98 from ziloka/ci/py-2-exe
bluet Feb 12, 2023
5356ff9
v2.0.0-alpha5
bluet Feb 12, 2023
2e6a1df
Update README.md
bluet Feb 12, 2023
aee1816
remove requirements folder and update README
hms5232 Feb 14, 2023
766245c
append changelog to fulfill the license obligation
SilverSteven Feb 22, 2023
4710088
Merge pull request #119 from hms5232/remove-requirements-folder
bluet Feb 25, 2023
cfe026f
Merge branch 'master' into fulfill-license-obligation
bluet Feb 25, 2023
5a1fa03
Merge pull request #120 from SilverSteven/fulfill-license-obligation
bluet Feb 25, 2023
8688ee6
change job name in py-to-exe and update poetry version
bluet Feb 25, 2023
5448377
Merge pull request #121 from bluet/update-poetry-version-in-actions
bluet Feb 25, 2023
0de979f
Fix leading zero issue in octet
stefanDeveloper Mar 14, 2023
2785f2b
Fix linting
stefanDeveloper Mar 14, 2023
dcf07ce
Fix typo
stefanDeveloper Mar 14, 2023
4be465d
docs: update README.md [skip ci]
allcontributors[bot] Mar 18, 2023
904a11e
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Mar 18, 2023
d5b9204
Merge pull request #123 from stefanDeveloper/master
bluet Mar 18, 2023
c64960f
Merge pull request #124 from bluet/all-contributors/add-stefanDeveloper
bluet Mar 18, 2023
ded51b3
docs: update README.md [skip ci]
allcontributors[bot] Mar 18, 2023
7acfda3
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Mar 18, 2023
503368b
Merge pull request #125 from bluet/all-contributors/add-SilverSteven
bluet Mar 18, 2023
f8f6e74
update .gitignore
bluet Mar 24, 2023
8c5d545
update MANIFEST.in and vscode settings
bluet Mar 24, 2023
7c326b6
update docker-build.sh
bluet Mar 24, 2023
9bee4a7
update pyproject.toml
bluet Mar 24, 2023
d7dfd10
update docker-build.sh
bluet Mar 24, 2023
a25f655
Bump aiohttp from 3.8.1 to 3.8.5
dependabot[bot] Jul 20, 2023
cadfc4c
Merge pull request #135 from bluet/dependabot/pip/aiohttp-3.8.5
bluet Jul 25, 2023
dedf536
Remove inappropriate comment
xnnd1 Aug 16, 2023
1ac7db9
Create sweep.yaml config file
sweep-ai[bot] Aug 17, 2023
3a6bdf1
Create bugfix template
sweep-ai[bot] Aug 17, 2023
feaa1ee
Create feature template
sweep-ai[bot] Aug 17, 2023
c08ee4f
Create refactor template
sweep-ai[bot] Aug 17, 2023
73eb60a
Added code to set event loop policy on Windows to
sweep-ai[bot] Aug 17, 2023
67f62f8
Merge pull request #137 from bluet/sweep/add-sweep-config
bluet Aug 17, 2023
2f364c2
Merge main into sweep/fix-notimplementederror-windows-python38
sweep-ai[bot] Aug 17, 2023
56e11a4
Merge pull request #138 from bluet/sweep/fix-notimplementederror-wind…
bluet Aug 17, 2023
8fb1ee9
Merge branch 'master' into master
bluet Aug 17, 2023
19e57ba
Merge pull request #136 from xnnd1/master
bluet Aug 17, 2023
e83f23a
Bump aiohttp from 3.8.5 to 3.9.0
dependabot[bot] Nov 28, 2023
48c6c70
Merge pull request #149 from bluet/dependabot/pip/aiohttp-3.9.0
bluet Dec 6, 2023
6d612c1
Update python-test-versions.yml to include 3.11 and 3.12
bluet Dec 7, 2023
4cde4ec
Merge pull request #150 from bluet/bluet-patch-1
bluet Dec 7, 2023
7a10929
fix: test error: mock not awaitable
bluet Dec 7, 2023
4afb062
Merge branch 'master' into fix-test-mock-no-await
bluet Dec 7, 2023
300ab87
Merge pull request #151 from bluet/fix-test-mock-no-await
bluet Dec 7, 2023
fdfcec2
update .gitignore
bluet Dec 7, 2023
4c7a44a
bump aiohttp to 3.9.1
bluet Dec 7, 2023
0f04cf4
bump aiodns
bluet Dec 7, 2023
d14e305
bump dependancies in poetry.lock
bluet Dec 7, 2023
dc944d6
minor fixes
bluet Dec 7, 2023
1bbc479
Bump aiohttp from 3.9.1 to 3.9.2
dependabot[bot] Jan 30, 2024
928f4aa
Merge pull request #158 from bluet/dependabot/pip/aiohttp-3.9.2
bluet Mar 18, 2024
a77199e
Bump idna from 3.6 to 3.7
dependabot[bot] Apr 12, 2024
eb7a48c
Merge pull request #163 from bluet/dependabot/pip/idna-3.7
bluet Oct 14, 2024
ba414bf
Bump setuptools from 69.0.2 to 70.0.0
dependabot[bot] Oct 14, 2024
b16a6f7
Bump aiohttp from 3.9.2 to 3.10.2
dependabot[bot] Oct 14, 2024
955c14e
Merge pull request #173 from bluet/dependabot/pip/setuptools-70.0.0
bluet Oct 14, 2024
18dbc17
Merge pull request #174 from bluet/dependabot/pip/aiohttp-3.10.2
bluet Oct 14, 2024
5f99fff
Bump aiohttp from 3.10.2 to 3.10.11
dependabot[bot] Nov 18, 2024
644e7dc
Merge pull request #177 from bluet/dependabot/pip/aiohttp-3.10.11
bluet Nov 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM python:alpine
WORKDIR /app
ADD . /app/
RUN apk --no-cache add --update \
gcc musl-dev git ca-certificates libffi-dev openssl \
&& pip install . \
&& rm -rf /var/cache/apk/* \
&& rm -rf /tmp/*
ENTRYPOINT ["proxybroker"]
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include LICENSE
include README.rst
include README.md
include CHANGELOG.rst
include requirements.txt
include requirements/*.txt
Expand Down
355 changes: 355 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,355 @@
ProxyBroker
===========

![image](https://img.shields.io/pypi/v/proxybroker.svg?style=flat-square%0A%20:target:%20https://pypi.python.org/pypi/proxybroker/)
![image](https://img.shields.io/travis/constverum/ProxyBroker.svg?style=flat-square%0A%20:target:%20https://travis-ci.org/constverum/ProxyBroker)
![image](https://img.shields.io/pypi/wheel/proxybroker.svg?style=flat-square%0A%20:target:%20https://pypi.python.org/pypi/proxybroker/)
![image](https://img.shields.io/pypi/pyversions/proxybroker.svg?style=flat-square%0A%20:target:%20https://pypi.python.org/pypi/proxybroker/)
![image](https://img.shields.io/pypi/l/proxybroker.svg?style=flat-square%0A%20:target:%20https://pypi.python.org/pypi/proxybroker/)

ProxyBroker is an open source tool that asynchronously finds public proxies from multiple sources and concurrently checks them.

![image](https://raw.githubusercontent.com/constverum/ProxyBroker/master/docs/source/_static/index_find_example.gif)

Features
--------

- Finds more than 7000 working proxies from \~50 sources.
- Support protocols: HTTP(S), SOCKS4/5. Also CONNECT method to ports 80 and 23 (SMTP).
- Proxies may be filtered by type, anonymity level, response time, country and status in DNSBL.
- Work as a proxy server that distributes incoming requests to external proxies. With automatic proxy rotation.
- All proxies are checked to support Cookies and Referer (and POST requests if required).
- Automatically removes duplicate proxies.
- Is asynchronous.

Docker
------
Docker Hub https://hub.docker.com/r/bluet/proxybroker2

```
$ docker run --rm bluet/proxybroker2 --help
usage: proxybroker [--max-conn MAX_CONN] [--max-tries MAX_TRIES]
[--timeout SECONDS] [--judge JUDGES] [--provider PROVIDERS]
[--verify-ssl]
[--log [{NOTSET,DEBUG,INFO,WARNING,ERROR,CRITICAL}]]
[--min-queue MINIMUM_PROXIES_IN_QUEUE]
[--version] [--help]
{find,grab,serve,update-geo} ...

Proxy [Finder | Checker | Server]

Commands:
These are common commands used in various situations

{find,grab,serve,update-geo}
find Find and check proxies
grab Find proxies without a check
serve Run a local proxy server
update-geo Download and use a detailed GeoIP database

Options:
--max-conn MAX_CONN The maximum number of concurrent checks of proxies
--max-tries MAX_TRIES
The maximum number of attempts to check a proxy
--timeout SECONDS, -t SECONDS
Timeout of a request in seconds. The default value is
8 seconds
--judge JUDGES Urls of pages that show HTTP headers and IP address
--provider PROVIDERS Urls of pages where to find proxies
--verify-ssl, -ssl Flag indicating whether to check the SSL certificates
--min-queue MINIMUM_PROXIES_IN_QUEUE The minimum number of proxies in the queue for checking connectivity
--log [{NOTSET,DEBUG,INFO,WARNING,ERROR,CRITICAL}]
Logging level
--version, -v Show program's version number and exit
--help, -h Show this help message and exit

Run 'proxybroker <command> --help' for more information on a command.
Suggestions and bug reports are greatly appreciated:
<https://github.com/bluet/proxybroker2/issues>

```


Requirements
------------

- Python **3.5** or higher
- [aiohttp](https://pypi.python.org/pypi/aiohttp)
- [aiodns](https://pypi.python.org/pypi/aiodns)
- [maxminddb](https://pypi.python.org/pypi/maxminddb)

Installation
------------

To install last stable release from pypi:

``` {.sourceCode .bash}
$ pip install proxybroker
```

The latest development version can be installed directly from GitHub:

``` {.sourceCode .bash}
$ pip install -U git+https://github.com/bluet/proxybroker2.git
```

Usage
-----

### CLI Examples

#### Find

Find and show 10 HTTP(S) proxies from United States with the high level of anonymity:

``` {.sourceCode .bash}
$ proxybroker find --types HTTP HTTPS --lvl High --countries US --strict -l 10
```

![image](https://raw.githubusercontent.com/constverum/ProxyBroker/master/docs/source/_static/cli_find_example.gif)

#### Grab

Find and save to a file 10 US proxies (without a check):

``` {.sourceCode .bash}
$ proxybroker grab --countries US --limit 10 --outfile ./proxies.txt
```

![image](https://raw.githubusercontent.com/constverum/ProxyBroker/master/docs/source/_static/cli_grab_example.gif)

#### Serve

Run a local proxy server that distributes incoming requests to a pool of found HTTP(S) proxies with the high level of anonymity:

``` {.sourceCode .bash}
$ proxybroker serve --host 127.0.0.1 --port 8888 --types HTTP HTTPS --lvl High --min-queue 5
```

![image](https://raw.githubusercontent.com/constverum/ProxyBroker/master/docs/source/_static/cli_serve_example.gif)

Run `proxybroker --help` for more information on the options available.
Run `proxybroker <command> --help` for more information on a command.

### Basic code example

Find and show 10 working HTTP(S) proxies:

``` {.sourceCode .python}
import asyncio
from proxybroker import Broker

async def show(proxies):
while True:
proxy = await proxies.get()
if proxy is None: break
print('Found proxy: %s' % proxy)

proxies = asyncio.Queue()
broker = Broker(proxies)
tasks = asyncio.gather(
broker.find(types=['HTTP', 'HTTPS'], limit=10),
show(proxies))

loop = asyncio.get_event_loop()
loop.run_until_complete(tasks)
```

[More examples](https://proxybroker.readthedocs.io/en/latest/examples.html).

### Proxy information per requests
#### HTTP
Check `X-Proxy-Info` header in response.
```
$ http_proxy=http://127.0.0.1:8888 https_proxy=http://127.0.0.1:8888 curl -v http://httpbin.org/get
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8888 (#0)
> GET http://httpbin.org/get HTTP/1.1
> Host: httpbin.org
> User-Agent: curl/7.58.0
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 OK
< X-Proxy-Info: 174.138.42.112:8080
< Date: Mon, 04 May 2020 03:39:40 GMT
< Content-Type: application/json
< Content-Length: 304
< Server: gunicorn/19.9.0
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Credentials: true
< X-Cache: MISS from ADM-MANAGER
< X-Cache-Lookup: MISS from ADM-MANAGER:880
< Connection: keep-alive
<
{
"args": {},
"headers": {
"Accept": "*/*",
"Cache-Control": "max-age=259200",
"Host": "httpbin.org",
"User-Agent": "curl/7.58.0",
"X-Amzn-Trace-Id": "Root=1-5eaf8e7c-6a1162a1387a1743a49063f4"
},
"origin": "...",
"url": "http://httpbin.org/get"
}
* Connection #0 to host 127.0.0.1 left intact
```

#### HTTPS
We are not able to modify HTTPS traffic to inject custom header once they start being encrypted. A `X-Proxy-Info` will be sent to client after `HTTP/1.1 200 Connection established` but not sure how clients can read it.
```
(env) bluet@ocisly:~/workspace/proxybroker2$ http_proxy=http://127.0.0.1:8888 https_proxy=http://127.0.0.1:8888 curl -v https://httpbin.org/get
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8888 (#0)
* allocate connect buffer!
* Establish HTTP proxy tunnel to httpbin.org:443
> CONNECT httpbin.org:443 HTTP/1.1
> Host: httpbin.org:443
> User-Agent: curl/7.58.0
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 Connection established
< X-Proxy-Info: 207.148.22.139:8080
<
* Proxy replied 200 to CONNECT request
* CONNECT phase completed!
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
...
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x5560b2e93580)
> GET /get HTTP/2
> Host: httpbin.org
> User-Agent: curl/7.58.0
> Accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 200
< date: Mon, 04 May 2020 03:39:35 GMT
< content-type: application/json
< content-length: 256
< server: gunicorn/19.9.0
< access-control-allow-origin: *
< access-control-allow-credentials: true
<
{
"args": {},
"headers": {
"Accept": "*/*",
"Host": "httpbin.org",
"User-Agent": "curl/7.58.0",
"X-Amzn-Trace-Id": "Root=1-5eaf8e77-efcb353b0983ad6a90f8bdcd"
},
"origin": "...",
"url": "https://httpbin.org/get"
}
* Connection #0 to host 127.0.0.1 left intact
```

### HTTP API
#### Get info of proxy been used for retrieving specific url
For HTTP, it's easy.
```
$ http_proxy=http://127.0.0.1:8888 https_proxy=http://127.0.0.1:8888 curl -v http://proxycontrol/api/history/url:http://httpbin.org/get
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8888 (#0)
> GET http://proxycontrol/api/history/url:http://httpbin.org/get HTTP/1.1
> Host: proxycontrol
> User-Agent: curl/7.58.0
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 34
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Credentials: true
<
{"proxy": "..."}
```

For HTTPS, we're not able to know encrypted payload (request), so only hostname can be used.
```
$ http_proxy=http://127.0.0.1:8888 https_proxy=http://127.0.0.1:8888 curl -v http://proxycontrol/api/history/url:httpbin.org:443
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8888 (#0)
> GET http://proxycontrol/api/history/url:httpbin.org:443 HTTP/1.1
> Host: proxycontrol
> User-Agent: curl/7.58.0
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 34
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Credentials: true
<
{"proxy": "..."}
* Connection #0 to host 127.0.0.1 left intact
```

#### Remove specific proxy from queue
```
$ http_proxy=http://127.0.0.1:8888 https_proxy=http://127.0.0.1:8888 curl -v http://proxycontrol/api/remove/PROXY_IP:PROXY_PORT
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8888 (#0)
> GET http://proxycontrol/api/remove/... HTTP/1.1
> Host: proxycontrol
> User-Agent: curl/7.58.0
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 204 No Content
<
* Connection #0 to host 127.0.0.1 left intact
```

Documentation
-------------

<https://proxybroker.readthedocs.io/>

TODO
----

- Check the ping, response time and speed of data transfer
- Check site access (Google, Twitter, etc) and even your own custom URL's
- Information about uptime
- Checksum of data returned
- Support for proxy authentication
- Finding outgoing IP for cascading proxy
- The ability to specify the address of the proxy without port (try to connect on defaulted ports)

Contributing
------------

- Fork it: <https://github.com/bluet/proxybroker2/fork>
- Create your feature branch: `git checkout -b my-new-feature`
- Commit your changes: `git commit -am 'Add some feature'`
- Push to the branch: `git push origin my-new-feature`
- Submit a pull request!

License
-------

Licensed under the Apache License, Version 2.0

*This product includes GeoLite2 data created by MaxMind, available from* [<http://www.maxmind.com>](http://www.maxmind.com).

Refs
----

- <https://github.com/constverum/ProxyBroker/pull/161>
- <https://github.com/davidsarkany/docker-ProxyBroker>
Loading