GithubHelp home page GithubHelp logo

tinyproxy's Introduction

tinyProxy

轻量的 TCP 代理服务器

功能

功能图

  • 支持基于 TCP 的协议;
  • 支持三种不同的调度策略:轮询、随机、基于 IP 的哈希值;
  • 支持心跳机制,能及时剔除不能正常工作的 server,同时也能将恢复正常工作的 server 重新加入到可调度的 server 列表中;
  • 支持简单的监控,可在网页**查看连接情况;
  • 支持 JSON 配置文件;

配置文件

config_file/default.json为配置文件,配置文件每一项都是必须的,否则tinyProxy无法正常工作。

{
  "service": "ubuntu",
  "host": "127.0.0.1",
  "port": 8889,
  "webport": 8880,
  "strategy": "poll",
  "heartbeat": 60,
  "maxprocessor": 1,
  "backends": [
    {
      "host": "123.207.60.196",
      "port": 11111
    }
  ]
}
  • service:代理服务器的服务名;
  • host:代理服务器的 host;
  • port:代理服务器的端口号;
  • webport:代理服务器监控页面的端口号;
  • strategy:调度策略;
  • maxprocessor:线程数;
  • backends:后端服务器数组;
    • host:后端服务器的 host;
    • port:后端服务器的端口号。

使用

go run main.go

tinyproxy's People

Contributors

chenbright avatar

Watchers

 avatar

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.