GithubHelp home page GithubHelp logo

plumpmath / spiderproxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zenhack/spiderproxy

0.0 0.0 0.0 140 KB

Tool for managing unreasonable trees of ssh tunnels

License: ISC License

Go 100.00%

spiderproxy's Introduction

Spiderproxy builds a tree of SSH connections, and offers a socks proxy on the local machine which intelligently routes traffic to the right places.

Spiderproxy uses your ssh agent to authenticate; it must be running in order for this to work.

Installing

go get zenhack.net/go/spiderproxy

Configuration File Reference

Spiderproxy reads a configuration file (by default spiderproxy.json in the current directory) which specifies a tree of connections to build, and rules for routing traffic based on destination addresses.

The file must contain a single JSON array, where each element of the array specifies a host to connect to via ssh. Each host is an object with the following fields:

  • "comment" (string): A comment describing the host; meant for humans.
  • "host" (string): The host name or IP address of the host to connect to.
  • "port" (number, optional): The TCP port to connect to. Defaults to 22.
  • "user" (string, optional): The name of the user to log in as. Defaults to the value of the USER environment variable.
  • "match" (array of strings): An array of shell glob patterns. When a client asks the socks proxy to establish a connection, the connection will be tunneled through the first host who's "match" field contains a glob pattern matching the destination host.
  • "next" (array of host objects): An array of the same form as the top-level object. When building the tree, connections any hosts specified in a "next" field will be tunneled through the host to which the field belongs. "next" fields may be nested.

The file example.spiderproxy.json in the root of this repository provides an example.

Invocation

If run with no arguments, Spiderproxy will read the file spiderproxy.json in the current directory, build a tree of ssh connections according to the rules above, and start a socks listening on port 1080, which will route traffic accordingly. The -addr command line option can be used to override the port (and control what ip addresses the server listens on), while the option -config specifies the path to an alternate config file.

LICENSE

Free/Open Source under the MIT license (see COPYING)

spiderproxy's People

Contributors

zenhack 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.