Giter Club home page Giter Club logo

socket-proxy's Introduction

Socket proxy

Description

socket agent! proxy. support custom setting

support 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

npm install socket-proxy --save

Docker

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

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

var net  = require('net');
var client = net.connect({port:3333},function(err){
    client.write('hello~');
});

LICENSE

(ISC License)

socket-proxy's People

Contributors

renovate-bot avatar renovate[bot] avatar whtiehack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

socket-proxy's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker-compose.yml
dockerfile
Dockerfile
  • node 18.12.1-alpine
npm
package.json

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.