From b3a2ac31fb1c8665cd9aa66e195d2280afe3400b Mon Sep 17 00:00:00 2001 From: Hiroyuki Wada Date: Thu, 5 Oct 2017 19:50:51 +0900 Subject: [PATCH 1/2] Fix README.md * Change command name from go-transproxy to transproxy * Fix source install --- README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index acc982e..01df2f8 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,12 @@ Futheremore, it will configure iptables automatically. Download from [Releases page](https://github.com/wadahiro/go-transproxy/releases). ### Source install -Use Go 1.8. +Use Go 1.8 and [dep](https://github.com/golang/dep). ``` -go get -u github.com/wadahiro/go-transproxy/... +dep ensure +go build -o transproxy cmd/transproxy/main.go +chmod +x transproxy ``` ## Usage @@ -31,7 +33,7 @@ go get -u github.com/wadahiro/go-transproxy/... ``` Usage: - go-transproxy [options] + transproxy [options] Options: @@ -76,7 +78,7 @@ export http_proxy=http://foo:bar@yourproxy.example.org:3128 export no_proxy=example.org,192.168.0.0/24 # Start go-transproxy with admin privileges(sudo) -sudo -E go-transproxy -private-dns 192.168.0.100 -public-dns 8.8.8.8 +sudo -E transproxy -private-dns 192.168.0.100 -public-dns 8.8.8.8 ``` For testing, using docker is easy way. Now, you can access to google from docker container with no proxy configuration as follows. @@ -95,27 +97,27 @@ If your proxy doesn't support CONNECT method to DNS port, it cannot resolve publ Fortunately, Google privides [DNS-over-HTTPS service](https://developers.google.com/speed/public-dns/docs/dns-over-https), so you can use this service as public DNS by adding `-dns-over-https-enabled` option instead of `-public-dns` option as below even if your proxy supports CONNECT method to 443 port only. ``` -sudo -E go-transproxy -private-dns 192.168.0.100 -dns-over-https-enabled +sudo -E transproxy -private-dns 192.168.0.100 -dns-over-https-enabled ``` If you can resolve all domains directly from local LAN, run command without dns related options as below. It disables DNS-Proxy. ``` -sudo -E go-transproxy +sudo -E transproxy ``` If you need to use both public DNS and private DNS, and need to use public DNS directly, run command with `-dns-over-tcp-disabled` option as below. It suppresses to insert a iptables OUTPUT rule for DNS over TCP. ``` -sudo -E go-transproxy -private-dns 192.168.0.100 -public-dns 172.16.0.1 -dns-over-tcp-disabled +sudo -E transproxy -private-dns 192.168.0.100 -public-dns 172.16.0.1 -dns-over-tcp-disabled ``` If you want to use an application which access to internet using port 5000, run command with `-tcp-proxy-dports` option as below. ``` -sudo -E go-transproxy -private-dns 192.168.0.100 -public-dns 8.8.8.8 -tcp-proxy-dports 22,5000 +sudo -E transproxy -private-dns 192.168.0.100 -public-dns 8.8.8.8 -tcp-proxy-dports 22,5000 ``` ## Current Limitation From 39bc086755548ff1e77e286acbf1f46c3c4d32da Mon Sep 17 00:00:00 2001 From: Hiroyuki Wada Date: Tue, 14 Nov 2017 15:56:04 +0900 Subject: [PATCH 2/2] Add build script for release --- build.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..662fd82 --- /dev/null +++ b/build.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +VERSION=0.3 + +DIR=$(cd $(dirname $0); pwd) +cd $DIR + +rm -rf bin/* +go build -v -o bin/transproxy -a -tags netgo -installsuffix netgo cmd/transproxy/main.go + +tar cvzf go-transproxy-$VERSION.tar.gz bin README.md LICENSE +