vincent-ng / proxy

Two porxy servers, impl by ssh or nodejs. can be deployed with docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

proxy

This repo has two proxy servers. One is socks5 proxy based on ssh and sshd. Another is http/https proxy based on nodejs.

Usage

socks5

docker run -it -p 1080:1080 vincent/proxy

or

docker-compose -f docker-compose.yml up

http/https

If TARGET env var is porvided, proxy traffic according to the host map. If TARGET env var is empty, act as a common proxy server.

$env:TARGET='{"baidu.localhost:8080":"https://www.baidu.com", "google.localhost:8080":"https://www.google.com"}'
node .

TARGET config example.

{
	"localhost:8080/helloworld":"https://wt-18e127c6f4b8a13508b25fa5c646c8a2-0.sandbox.auth0-extend.com/hello/world",
	"localhost:8080/":"https://wt-18e127c6f4b8a13508b25fa5c646c8a2-0.sandbox.auth0-extend.com/index.html",
	"localhost:8080":"https://wt-18e127c6f4b8a13508b25fa5c646c8a2-0.sandbox.auth0-extend.com",
	"baidu.localhost:8080":"https://www.baidu.com",
	"google.localhost:8080":"https://www.google.com"
}
docker run -it -p 8123:80 vincent/proxy:nodejs

or

docker-compose -f docker-compose-http.yml up

Online Demo

socks5

Try in PWD

http/https

Try in PWD

About

Two porxy servers, impl by ssh or nodejs. can be deployed with docker


Languages

Language:JavaScript 100.0%