GithubHelp home page GithubHelp logo

nsdown / proxyinabox Goto Github PK

View Code? Open in Web Editor NEW

This project forked from naiba-archived/proxy-in-a-box

0.0 2.0 0.0 5.7 MB

:inbox_tray:Proxy in a box. 自动抓取、调度代理 IP。

License: MIT License

Go 100.00%

proxyinabox's Introduction

Proxy-in-a-Box

Go Report Card travis

Proxy-in-a-Box helps programmers quickly and easily develop powerful crawler services. one-script, easy-to-use: proxies in a box.

Usage:
  proxy-in-a-box [flags]

Flags:
  -c, --conf string   config file (default "./pb.yaml")
  -p, --ha string     http proxy server addr (default "127.0.0.1:8080")
  -h, --help          help for proxy-in-a-box
  -s, --sa string     https proxy server addr (default "127.0.0.1:8081")

Usage

  1. get lastest Proxy-in-a-Box
    go get -u -v github.com/naiba/proxyinabox/cmd/proxy-in-a-box/...
  2. enter the application directory
    cd $GOPATH/bin
  3. write config file #Config
  4. run it
    ./proxy-in-a-box
  5. configured in your code
    HTTP proxy: `http://[IP]:8080`
    HTTPS proxy: `https://[IP]:8081`
    * Please set http header when requesting: "Naiba: lifelonglearning" ref:https://github.com/naiba/proxyinabox/blob/master/cmd/proxy-in-a-box/test_server.sh
    
    Set in the code, and then grab it, the Proxy-in-a-Box will automatically assign the proxy.

Config

# run in debug mode
debug: true
# mysql config
mysql:
  host: 127.0.0.1
  port: 3306
  user: root
  pass: 123456
  dbname: proxy
# system config
sys:
  name: Naiba
  # verify proxy's worker num
  proxy_verify_worker: 20
  # how many domains can request per ip in 30min
  domains_per_ip: 30
  # how many request can do per ip in 1s
  request_limit_per_ip: 10
  # verify interval of the proxy stored in the database
  verify_duration: 30

Benchmark

ab -H 'Naiba: lifelonglearning' -v4  -n100 -c10 -X 127.0.0.1:8080 http://api.ip.la/cn

proxyinabox's People

Watchers

James Cloos avatar  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.