https://github.com/aludirk/tcp-proxy
TCP proxy.
https://github.com/aludirk/tcp-proxy
proxy python tcp
Last synced: 4 months ago
JSON representation
TCP proxy.
- Host: GitHub
- URL: https://github.com/aludirk/tcp-proxy
- Owner: Aludirk
- License: gpl-3.0
- Created: 2017-08-18T08:25:15.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-19T15:56:38.000Z (almost 9 years ago)
- Last Synced: 2025-03-23T07:22:51.903Z (over 1 year ago)
- Topics: proxy, python, tcp
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 12
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# TCP Proxy (0.1.0)
- [Introduction](#introduction)
- [Installation](#installation)
- [Python 3](#python-3)
- [setuptools](#setuptools)
- [TCP Proxy](#tcp-proxy)
- [Examples](#examples)
- [Simple proxy server](#simple-proxy-server)
- [Simple proxy server with specific downstream](#simple-proxy-server-with-specific-downstream)
- [Proxy server using epoll event](#proxy-server-using-epoll-event)
- [License](#license)
## Introduction
A proxy server for TCP socket connections in Python 3, it supports the scalable I/O event, epoll and kqueue, for high performance in large number of connections.
## Installation
### Python 3
To install python-3, please follow the instructions in [Python offical site](https://www.python.org/downloads/).
### setuptools
To install setuptools, please follow the instructions in [setuptools](http://pypi.python.org/pypi/setuptools) package site.
### TCP Proxy
```bash
git clone https://github.com/Aludirk/tcp-proxy
cd tcp-proxy
python setup.py install
```
## Examples
### Simple proxy server
To set up a proxy to a remote server `some.domain.com:9999`, and accept connections by `localhost:5354` (default).
```bash
tcp-proxy some.domain.com 9999
```
### Simple proxy server with specific downstream
To set up a proxy to a remote server `some.domain.com:9999`, and accept connections by `192.168.0.100:20000`.
```bash
tcp-proxy -H 192.168.0.100 -p 20000 some.domain.com 9999
```
### Proxy server using epoll event
```bash
tcp-proxy -m epoll some.domain.com 9999
```
## License
This software is licensed under the [GNU GPL v3 license](https://www.gnu.org/copyleft/gpl.html). © 2017 Aludirk Wong