Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diegohce/nexer
Content based network multiplexer or redirector made with love and Go
https://github.com/diegohce/nexer
connection-pool connection-tee go golang network network-multiplexer networking redirects tee tool tools tunnel
Last synced: 2 months ago
JSON representation
Content based network multiplexer or redirector made with love and Go
- Host: GitHub
- URL: https://github.com/diegohce/nexer
- Owner: diegohce
- License: agpl-3.0
- Created: 2016-06-01T00:37:44.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-16T22:04:37.000Z (about 6 years ago)
- Last Synced: 2024-06-20T11:14:34.457Z (8 months ago)
- Topics: connection-pool, connection-tee, go, golang, network, network-multiplexer, networking, redirects, tee, tool, tools, tunnel
- Language: Go
- Homepage:
- Size: 51.8 KB
- Stars: 7
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nexer
An easily extensible and content based, network multiplexer.# Usage
## Nexer core arguments
```
Usage of nexer:
-bind string
Bind [address]:port
-proto string
Protocol [tcp/udp] (default "tcp")
-tunnel string
Tunnel type (see --tunnels) (default "echo")
-tunnels
Tunnels list
-version
Shows nexer current version
```# Available tunnels
```
Available tunnel types:
tee
connectionpool
direct
echo
pip
apt
apt-experimental
url
```## tee tunnel
Sends the same request to both ```-main``` and ```-forward-to``` hosts. Responses from ```-forward-to``` host are logged into ```-logfile``` or to standard output.
```
Usage of tee:
-forward-to string
Where to forward requests to
-logfile string
Where to log the forwarded responses (default "(stdout)")
-main string
Real request/endpoint destination
```## connectionpool
Connection pooling between nexer and -dest
```
Usage of connectionpool:
-dest string
Destination address:port
-pool-size int
Connection pool size (default 1)
```## echo tunnel
Echo has no arguments. Implements an echo server.## direct tunnel
Direct tunnel redirection
```
Usage of direct:
-dest string
Destination address:port
-proto string
Protocol [tcp/udp] (default "tcp")
-write-delay int
Write delay in seconds (default 0)```
## apt / apt-experimental tunnel
The apt-experimental tunnel is expected to be faster and more reliable than the plain apt tunnel.
```
Usage of apt:
-log-requests
Show http requests (default false)
```To create the tunnel run:
```
# ./nexer -bind :3142 -tunnel apt
or
# ./nexer -bind :3142 -tunnel apt-experimental
```### To use apt-get with the tunnel
```
# apt-get -o "Acquire::http::proxy=http://yourserver:3142" update
```or
```
# apt-get -o "Acquire::http::proxy=http://yourserver:3142" install
```## pip tunnel
Tunnel to pip service (python packages index)
```
Usage of pip:
-dest string
Destination pip servername (will use https port 443 always!) (default "pypi.python.org")
```### Create the pip tunnel
To create a tunnel simply run:
```
# ./nexer -bind :3143 -tunnel pip
```### Installing python packages using the pip tunnel
```
pip install --index-url "http://yourserver:3143/simple/"
```or
```
pip install --index-url "http://yourserver:3143/simple/" -r requirements.txt
```### Searching for packages using the pip tunnel
```
pip search --index http://yourserver:3143/pypi
```## url tunnel
```
Usage of url:
-debug string
Destination address:port
-prod string
Destination address:port
```
Redirects to -prod. If ```debug=1``` is present in the querystring, redirects to -debug# Extending nexer (new tunnel dev)
The easiest way to commence is to look at the
[echo tunnel](https://github.com/diegohce/nexer/blob/master/src/tunnel/echotunnel/echotunnel.go) and the
[direct tunnel](https://github.com/diegohce/nexer/blob/master/src/tunnel/directtunnel/directtunnel.go) as an example.Also check the ```import``` statement in [nexer.go](https://github.com/diegohce/nexer/blob/master/src/nexer.go)
where tunnels **must** be imported to be available.## Building
After setting Go environment values
([goenv.sh](https://github.com/diegohce/nexer/blob/master/goenv.sh) might help),
go to ```src``` directory and run from the command line:```go build -tags all nexer.go version.go```