Skip to main content

Creates Proxies and binds them to a NIC - Windows only

Project description

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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nic2proxy-0.10.tar.gz (2.8 MB view details)

Uploaded Source

Built Distribution

nic2proxy-0.10-py3-none-any.whl (2.8 MB view details)

Uploaded Python 3

File details

Details for the file nic2proxy-0.10.tar.gz.

File metadata

  • Download URL: nic2proxy-0.10.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for nic2proxy-0.10.tar.gz
Algorithm Hash digest
SHA256 c9b54a09644de58b91d20d02293f6b850e93215878bbd1fa18d60292bb9c6863
MD5 62e1cabceabb1f8f007214879385e790
BLAKE2b-256 1cc4fb9d851787f706bbf3b7c6703e90197e30c8456e4ffc1063cf3f6d30ead9

See more details on using hashes here.

File details

Details for the file nic2proxy-0.10-py3-none-any.whl.

File metadata

  • Download URL: nic2proxy-0.10-py3-none-any.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for nic2proxy-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 14a17ccc085403077f5af24a1e52606bf66daabe0d51895e9ebafe025742d221
MD5 36c4f415e4fdce3596cf99f39a0fd4a3
BLAKE2b-256 9ce31ef20c7b988cc6d4a59700af8ea001f6f56e48d0bf3b66a04dcce2afd281

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page