cli

command
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

README

Gotapdance CLI version

Build

After downloading Golang, TD and dependencies:

   cd ${GOPATH:-~/go}/src/github.com/refraction-networking/gotapdance/cli # works even if GOPATH is not set
   go build -a .

Usage

Simply run

./cli

to listen to local connections on default 10500 port.

Then, you'll have a few options:

Configure HTTP proxy

You will need to ask your particular application(e.g. browser) to use 127.0.0.1:10500 as HTTP proxy. In Firefox (both mobile and desktop) I prefer to type about:config into address line and set the following:

network.proxy.http_port = 10500
network.proxy.http = 127.0.0.1
network.proxy.ssl_port = 10500
network.proxy.ssl = 127.0.0.1
network.proxy.type = 1

To disable proxying you may simply set network.proxy.type back to 5 or 0.

The same settings are available in Firefox GUI: Preferences->Advanced->Network->Settings

Configure ssh SOCKS proxy

If you have access to some ssh server, say socksserver, you can set up ssh SOCKS tunnel. First, modify and add the following to .ssh/config:

Host socksserver-td
Hostname 123.456.789.012
User cookiemonster
ProxyCommand nc -X connect -x 127.0.0.1:10500 %h %p

then run ssh -D1234 socksserver-td -4

Now in Firefox you could just go to Preferences->Advanced->Network->Settings and set SOCKSv5 host to localhost:1234.

Some utilities use following enivoronment variables:

export https_proxy=127.0.0.1:10500
export http_proxy=127.0.0.1:10500
wget https://twitter.com

Most of the popular utilities also have a flag to specify a proxy.

Docker

A simple dockerfile is provided that instantiates a golang environment in which to run the cli. This is primarily meant to be used with the GNS3 simulation environment.

To build the docker environemnt use:

# run from repo root
docker build -t gotapdance/cli -f cli/cli.dockerfile .

The environemnt can then be attached to using a docker exec or using telnet in the case of gns3. See the wiki page for local docker image builds in gns3 for more details on setting up local docker appliances in gns3.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL