nic2proxy


Namenic2proxy JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/nic2proxy
SummaryCreates Proxies and binds them to a NIC - Windows only
upload_time2023-12-12 21:40:43
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords proxies nic
VCS
bugtrack_url
requirements getpublicipv4 touchtouch
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# 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/nic2proxy",
    "name": "nic2proxy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Proxies,NIC",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/1c/c4/fb9d851787f706bbf3b7c6703e90197e30c8456e4ffc1063cf3f6d30ead9/nic2proxy-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": "Creates Proxies and binds them to a NIC - Windows only",
    "version": "0.10",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/nic2proxy"
    },
    "split_keywords": [
        "proxies",
        "nic"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9ce31ef20c7b988cc6d4a59700af8ea001f6f56e48d0bf3b66a04dcce2afd281",
                "md5": "36c4f415e4fdce3596cf99f39a0fd4a3",
                "sha256": "14a17ccc085403077f5af24a1e52606bf66daabe0d51895e9ebafe025742d221"
            },
            "downloads": -1,
            "filename": "nic2proxy-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "36c4f415e4fdce3596cf99f39a0fd4a3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 2817666,
            "upload_time": "2023-12-12T21:40:37",
            "upload_time_iso_8601": "2023-12-12T21:40:37.674299Z",
            "url": "https://files.pythonhosted.org/packages/9c/e3/1ef20c7b988cc6d4a59700af8ea001f6f56e48d0bf3b66a04dcce2afd281/nic2proxy-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1cc4fb9d851787f706bbf3b7c6703e90197e30c8456e4ffc1063cf3f6d30ead9",
                "md5": "62e1cabceabb1f8f007214879385e790",
                "sha256": "c9b54a09644de58b91d20d02293f6b850e93215878bbd1fa18d60292bb9c6863"
            },
            "downloads": -1,
            "filename": "nic2proxy-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "62e1cabceabb1f8f007214879385e790",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 2804707,
            "upload_time": "2023-12-12T21:40:43",
            "upload_time_iso_8601": "2023-12-12T21:40:43.591626Z",
            "url": "https://files.pythonhosted.org/packages/1c/c4/fb9d851787f706bbf3b7c6703e90197e30c8456e4ffc1063cf3f6d30ead9/nic2proxy-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-12 21:40:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "nic2proxy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "getpublicipv4",
            "specs": []
        },
        {
            "name": "touchtouch",
            "specs": []
        }
    ],
    "lcname": "nic2proxy"
}
        
Elapsed time: 0.22245s