Creates Proxies and binds them to a NIC - Windows only
pip install nic2proxy
Tested against Windows / Python 3.11 / Anaconda
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!
Metadata
Release files for nic2proxy 0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nic2proxy-0.10.tar.gz | 2.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nic2proxy-0.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.6 MB
Release files / nic2proxy-0.10.tar.gz
| Download URL | nic2proxy-0.10.tar.gz |
|---|---|
| Size | 2.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9b54a09644de58b91d20d02293f6b850e93215878bbd1fa18d60292bb9c6863
|
|
BLAKE2b-256 checksum How to use checksums |
1cc4fb9d851787f706bbf3b7c6703e90197e30c8456e4ffc1063cf3f6d30ead9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / nic2proxy-0.10-py3-none-any.whl
| Download URL | nic2proxy-0.10-py3-none-any.whl |
|---|---|
| Size | 2.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14a17ccc085403077f5af24a1e52606bf66daabe0d51895e9ebafe025742d221
|
|
BLAKE2b-256 checksum How to use checksums |
9ce31ef20c7b988cc6d4a59700af8ea001f6f56e48d0bf3b66a04dcce2afd281
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|