Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whtiehack/socket-proxy
socket agent! proxy. support custom setting support most of tcp protocol! e.g. http https ssh ftp
https://github.com/whtiehack/socket-proxy
proxy socket-agent socket-proxy tcp-protocol
Last synced: about 1 month ago
JSON representation
socket agent! proxy. support custom setting support most of tcp protocol! e.g. http https ssh ftp
- Host: GitHub
- URL: https://github.com/whtiehack/socket-proxy
- Owner: whtiehack
- License: mit
- Created: 2016-05-20T05:26:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-30T02:26:49.000Z (about 2 months ago)
- Last Synced: 2024-10-30T05:00:20.754Z (about 2 months ago)
- Topics: proxy, socket-agent, socket-proxy, tcp-protocol
- Language: JavaScript
- Homepage:
- Size: 32.2 KB
- Stars: 7
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Socket proxy
## Description
socket agent! proxy. support custom settingsupport any tcp protocol! e.g. http https ssh ftp
### simple config.json
```
{
"you custom name":{ //this name can custom
"remoteip":"127.0.0.1", // remote host
"remoteport":3306, // remote port
"listenport":3333 // listen port
},
"you custom name 2":{ //this name can custom
"remoteip":"127.0.0.1", // remote host
"remoteport":6379, // remote port
"listenport":6378 // listen port
},
...
}```
## Installation
```bash
npm install socket-proxy --save
```## Docker
[![](https://images.microbadger.com/badges/image/smallwhite/socket-proxy.svg)](https://microbadger.com/images/smallwhite/socket-proxy "Get your own image badge on microbadger.com")
[![](https://images.microbadger.com/badges/version/smallwhite/socket-proxy.svg)](https://microbadger.com/images/smallwhite/socket-proxy "Get your own version badge on microbadger.com")
```
docker pull smallwhite/socket-proxy
docker run --network host -e REMOTE_PORT=3006 -e REMOTE_HOST=127.0.0.1 -e LOCAL_LISTEN_PORT=3005 -d smallwhite/socket-proxy// or full configs
docker run --network host -e CONFIGS="{\"you custom name\":{\"remoteip\":\"127.0.0.1\",\"remoteport\":3306,\"listenport\":3333},\"you custom name 2\":{\"remoteip\":\"127.0.0.1\",\"remoteport\":6379,\"listenport\":6378}}" -d smallwhite/socket-proxy// or edit you self compose
docker-compose up
```## Usage
```javascript
var proxy = require('socket-proxy');proxy.start({
"you custom name":{ //this name can custom
"remoteip":"127.0.0.1", // remote host
"remoteport":3306, // remote port
"listenport":3333 // listen port
}
});
```## Test you proxy
```javascript
var net = require('net');
var client = net.connect({port:3333},function(err){
client.write('hello~');
});
```## LICENSE
(ISC License)