# Creates Proxies and binds them to a NIC - Windows only
## pip install nic2proxy
### Tested against Windows / Python 3.11 / Anaconda
```python
MultiProxyServer class for managing and starting multiple proxy servers on Windows.
This class provides functionality to configure, start, and manage proxy servers.
It binds each proxy to a specific network interface.
It also includes methods for generating YAML configuration files,
retrieving the public IPv4 address of the host, and handling console events for controlling
server processes. It uses https://github.com/hang666/s5light under the hood
Usage:
1. Create an instance of MultiProxyServer with the desired interfaces and log folder.
2. Write the YAML configuration file with the write_yaml_config() method.
3. Start the proxy servers with the start_proxy() method. (Uses powershell - might need elevated rights)
4. Get information about the running servers with the __str__() method.
Example:
from nic2proxy import MultiProxyServer
interfaces = {
0: {
"bind_address": "0.0.0.0",
"bind_port": None, # None -> finds a free one
"out_address": "192.168.9.100", # Address of the NIC you want to use
"tcp_timeout": 60,
"udp_timeout": 60,
"whitelist": (),
},
1: {
"bind_address": "0.0.0.0",
"bind_port": None,
"out_address": "192.168.10.100", # Address of the NIC you want to use
"tcp_timeout": 60,
"udp_timeout": 60,
"whitelist": (),
},
}
prox = MultiProxyServer(interfaces=interfaces, logfolder="c:\\proxylogs")
prox.write_yaml_config().start_proxy()
print(prox)
# prox.kill_proxy() to kill 'em all!
```
Raw data
{
"_id": null,
"home_page": "https://github.com/hansalemaos/browser2requests",
"name": "browser2requests",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "requests,chrome",
"author": "Johannes Fischer",
"author_email": "aulasparticularesdealemaosp@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/05/bd/a7d03a9aa65db9cc9f3e4cd0eb97f7da80b11ee08d66189f8185c7a9c3ef/browser2requests-0.10.tar.gz",
"platform": null,
"description": "\r\n# Creates Proxies and binds them to a NIC - Windows only\r\n\r\n## pip install nic2proxy\r\n\r\n### Tested against Windows / Python 3.11 / Anaconda\r\n\r\n\r\n```python\r\nMultiProxyServer class for managing and starting multiple proxy servers on Windows.\r\n\r\nThis class provides functionality to configure, start, and manage proxy servers.\r\nIt binds each proxy to a specific network interface.\r\nIt also includes methods for generating YAML configuration files,\r\nretrieving the public IPv4 address of the host, and handling console events for controlling\r\nserver processes. It uses https://github.com/hang666/s5light under the hood\r\n\r\nUsage:\r\n1. Create an instance of MultiProxyServer with the desired interfaces and log folder.\r\n2. Write the YAML configuration file with the write_yaml_config() method.\r\n3. Start the proxy servers with the start_proxy() method. (Uses powershell - might need elevated rights)\r\n4. Get information about the running servers with the __str__() method.\r\n\r\nExample:\r\nfrom nic2proxy import MultiProxyServer\r\ninterfaces = {\r\n\t0: {\r\n\t\t\"bind_address\": \"0.0.0.0\",\r\n\t\t\"bind_port\": None, # None -> finds a free one \r\n\t\t\"out_address\": \"192.168.9.100\", # Address of the NIC you want to use\r\n\t\t\"tcp_timeout\": 60,\r\n\t\t\"udp_timeout\": 60,\r\n\t\t\"whitelist\": (),\r\n\t},\r\n\t1: {\r\n\t\t\"bind_address\": \"0.0.0.0\",\r\n\t\t\"bind_port\": None,\r\n\t\t\"out_address\": \"192.168.10.100\", # Address of the NIC you want to use\r\n\t\t\"tcp_timeout\": 60,\r\n\t\t\"udp_timeout\": 60,\r\n\t\t\"whitelist\": (),\r\n\t},\r\n}\r\n\r\nprox = MultiProxyServer(interfaces=interfaces, logfolder=\"c:\\\\proxylogs\")\r\nprox.write_yaml_config().start_proxy()\r\nprint(prox)\r\n# prox.kill_proxy() to kill 'em all!\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A class for capturing network requests in a browser and converting them to a pandas DataFrame - Windows only",
"version": "0.10",
"project_urls": {
"Homepage": "https://github.com/hansalemaos/browser2requests"
},
"split_keywords": [
"requests",
"chrome"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7c5c4b01e906f7ee59ce63a7b4497417eb8ffb1c001b83e98a8a9d5de2f7826e",
"md5": "16bb87cb170055e0a8d9b08abc8f2d86",
"sha256": "393932481739f65d9b2fac09005cf3c79ecf6cdc252db7ac32b3c5ddd521996a"
},
"downloads": -1,
"filename": "browser2requests-0.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "16bb87cb170055e0a8d9b08abc8f2d86",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 8475,
"upload_time": "2023-12-13T06:57:38",
"upload_time_iso_8601": "2023-12-13T06:57:38.408558Z",
"url": "https://files.pythonhosted.org/packages/7c/5c/4b01e906f7ee59ce63a7b4497417eb8ffb1c001b83e98a8a9d5de2f7826e/browser2requests-0.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "05bda7d03a9aa65db9cc9f3e4cd0eb97f7da80b11ee08d66189f8185c7a9c3ef",
"md5": "bddc52b0c395e342126bbf06ae601f92",
"sha256": "2cf23c8998d7da96dbe2a8504198795b0642020c94b6e90df8be51b3664af929"
},
"downloads": -1,
"filename": "browser2requests-0.10.tar.gz",
"has_sig": false,
"md5_digest": "bddc52b0c395e342126bbf06ae601f92",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7087,
"upload_time": "2023-12-13T06:57:39",
"upload_time_iso_8601": "2023-12-13T06:57:39.652773Z",
"url": "https://files.pythonhosted.org/packages/05/bd/a7d03a9aa65db9cc9f3e4cd0eb97f7da80b11ee08d66189f8185c7a9c3ef/browser2requests-0.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-13 06:57:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hansalemaos",
"github_project": "browser2requests",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "browser2requests"
}