Code Monkey home page Code Monkey logo

goixy's Introduction

Goixy

An HTTP/SOCKS5 Proxy, written in Go.

https://github.com/mitnk/goixy/blob/master/howitworks.png

install

You can download pre-built binaries here.

Or build it with Go environment yourself:

$ go get -u github.com/mitnk/goixy

usage

First, you need to create a config file for goixy. It locates at ~/.goixy/config.json, and looks like this:

$ cat ~/.goixy/config.json
{
    "Host": "1.2.3.4",
    "Port": "5678",
    "Key": "your-lightsocks-secret-key",
    "WhiteList": [
        "\\.google.*",
        ".*facebook\\.com"
    ],
    "DirectHost": "127.0.0.1",
    "DirectPort": "12345",
    "DirectKey": ""
}

(If DirectKey is not set or empty, Key will be used)

You need to run lightsocks on 1.2.3.4:5678. And also need to run on 127.0.0.1:12345 if you use -withdirect.

Goixy default does not use direct proxy, meaning all connections will use Host:Port proxy. If -withdirect is set, only WhiteList connections use Host:Port proxy, other traffic use DirectHost:DirectPort proxy.

run it

$ goixy
[2017-06-18 14:58:36][0] goixy v1.7.1 without Direct Porxy
[2017-06-18 14:58:36][0] listen on port: 127.0.0.1:1080

Now you can test it with curl:

$ curl -L -x 127.0.0.1:1080 hugo.wang/http/ip/
1.2.3.4  # output should be the IP of host on which lightsocks is running
$ curl -L hugo.wang/http/ip/
111.112.113.114  # should be you local public IP

see its help page

$ goixy -h
Usage of goixy v1.7.1
goixy [flags]
  -host string
        host (default "127.0.0.1")
  -port string
        port (default "1080")
  -s int
        time span to print reports in seconds (default 600)
  -t int
        time out on connections in seconds (default 3600)
  -v    verbose
  -vv
        very verbose
  -withdirect
        Use Direct proxy (for HTTP Porxy only)

NOTE: currently -withdirect only supports HTTP Proxy. Even set -withdirect, accesses with Socks Porxy (i.e. curl -x socks5://...) will always use Host:Port proxy.

lightsocks

https://github.com/mitnk/lightsocks

goixy's People

Watchers

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