psiphon-tunnel-core

module
v0.0.14-beta-android Latest Latest
Warning

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

Go to latest
Published: May 9, 2017 License: GPL-3.0

README

Build Status Coverage Status

Psiphon 3 Tunnel Core README

Overview

Psiphon client and server components implemented in Go. These components provides core tunnel functionality, handling all aspects of evading blocking and relaying traffic through Psiphon. In the client, local proxies provide an interface for routing traffic through the tunnel.

The client component does not include a UI and does not handle capturing or routing local traffic. These major aspects are handled by other parts of Psiphon client applications.

Status

This project is in production and used as the tunneling engine in our Windows and Android clients, which are available at our Psiphon 3 repository.

Client Setup

Build
  • Go 1.5 (or higher) is required.
  • This project builds and runs on recent versions of Windows, Linux, and Mac OS X.
  • Note that the psiphon package is imported using the absolute path github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon; without further local configuration, go will use this version of the code and not the local copy in the repository.
  • In this repository, run go build in ConsoleClient to make the ConsoleClient binary, a console Psiphon client application.
    • Build versioning info may be configured as follows, and passed to go build in the -ldflags argument:

      BUILDDATE=$(date --iso-8601=seconds)
      BUILDREPO=$(git config --get remote.origin.url)
      BUILDREV=$(git rev-parse --short HEAD)
      GOVERSION=$(go version | perl -ne '/go version (.*?) / && print $1')
      DEPENDENCIES=$(echo -n "{" && go list -f '{{range $dep := .Deps}}{{printf "%s\n" $dep}}{{end}}' | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' | xargs -I pkg bash -c 'cd $GOPATH/src/pkg && echo -n "\"pkg\":\"$(git rev-parse --short HEAD)\","' | sed 's/,$/}/')
      
      LDFLAGS="\
      -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildDate=$BUILDDATE \
      -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildRepo=$BUILDREPO \
      -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildRev=$BUILDREV \
      -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.goVersion=$GOVERSION \
      -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.dependencies=$DEPENDENCIES \
      "
      
Platform-specific instructions
macOS

Building without OpenSSL support (that is, without indistinguishable TLS support) requires no extra steps. To compile with OpenSSL support, follow these steps:

  1. You must have Homebrew installed.

  2. brew install openssl pkg-config

  3. Find out where Homebrew put the pkgconfig files for OpenSSL -- the location depends on your Homebrew installation. Run this command:

    $ brew info openssl
    

    Make note of the "build variable" path for PKG_CONFIG_PATH.

  4. Set PKG_CONFIG_PATH=<path discovered above> when building, and provide the -tags OPENSSL flag. This can be easily done on the build command line like so:

    $ PKG_CONFIG_PATH=<path discovered above> go build -tags OPENSSL
    
Configure
  • Configuration files are standard text files containing a valid JSON object. Example:
{
    "PropagationChannelId" : "<placeholder>",
    "SponsorId" : "<placeholder>",
    "LocalHttpProxyPort" : 8080,
    "LocalSocksProxyPort" : 1080
}

Note: The lines <!--BEGIN-SAMPLE-CONFIG--> and <--END-SAMPLE-CONFIG--> (visible in the raw Markdown) are used by the config test. Do not remove them.

  • All config file parameters are documented here.
  • Replace each <placeholder> with a value from your Psiphon server. The Psiphon server-side stack is open source and can be found in our Psiphon 3 repository.
Run
  • Run ./ConsoleClient --config psiphon.config where psiphon.config is created as described in the Configure section above

Other Platforms

Acknowledgements

Psiphon Tunnel Core uses:

Licensing

Please see the LICENSE file.

Contacts

We maintain a developer mailing list at psiphon3-developers@googlegroups.com. For more information about Psiphon Inc., please visit our web site at www.psiphon.ca.

Directories

Path Synopsis
MobileLibrary
psi
Package psiphon implements the core tunnel functionality of a Psiphon client.
Package psiphon implements the core tunnel functionality of a Psiphon client.
common/osl
Package osl implements the Obfuscated Server List (OSL) mechanism.
Package osl implements the Obfuscated Server List (OSL) mechanism.
common/tls
Package tls partially implements TLS 1.2, as specified in RFC 5246.
Package tls partially implements TLS 1.2, as specified in RFC 5246.
common/tls/cipherhw
Package cipherhw exposes common functions for detecting whether hardware support for certain ciphers and authenticators is present.
Package cipherhw exposes common functions for detecting whether hardware support for certain ciphers and authenticators is present.
common/tls/crypto/chacha20poly1305
Package chacha20poly1305 implements the ChaCha20-Poly1305 AEAD as specified in RFC 7539.
Package chacha20poly1305 implements the ChaCha20-Poly1305 AEAD as specified in RFC 7539.
common/tls/crypto/chacha20poly1305/internal/chacha20
Package ChaCha20 implements the core ChaCha20 function as specified in https://tools.ietf.org/html/rfc7539#section-2.3.
Package ChaCha20 implements the core ChaCha20 function as specified in https://tools.ietf.org/html/rfc7539#section-2.3.
common/tls/crypto/curve25519
Package curve25519 provides an implementation of scalar multiplication on the elliptic curve known as curve25519.
Package curve25519 provides an implementation of scalar multiplication on the elliptic curve known as curve25519.
common/tls/crypto/poly1305
Package poly1305 implements Poly1305 one-time message authentication code as specified in http://cr.yp.to/mac/poly1305-20050329.pdf.
Package poly1305 implements Poly1305 one-time message authentication code as specified in http://cr.yp.to/mac/poly1305-20050329.pdf.
server
Package psiphon/server implements the core tunnel functionality of a Psiphon server.
Package psiphon/server implements the core tunnel functionality of a Psiphon server.
server/psinet
Package psiphon/server/psinet implements psinet database services.
Package psiphon/server/psinet implements psinet database services.
transferstats
Package stats counts and keeps track of session stats.
Package stats counts and keeps track of session stats.
upstreamproxy/go-ntlm/ntlm
Package NTLM implements the interfaces used for interacting with NTLMv1 and NTLMv2.
Package NTLM implements the interfaces used for interacting with NTLMv1 and NTLMv2.
upstreamproxy/go-ntlm/ntlm/md4
Package md4 implements the MD4 hash algorithm as defined in RFC 1320.
Package md4 implements the MD4 hash algorithm as defined in RFC 1320.

Jump to

Keyboard shortcuts

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