Versions in this module Expand all Collapse all v1 v1.0.0 Sep 11, 2017 Changes in this version + const IV_LENGTH + var OK200 = []byte("HTTP/1.0 200 OK\r\n\r\n") + func ADecrypt(buf []byte) []byte + func ADecryptString(text string) string + func AEncrypt(buf []byte) []byte + func AEncryptString(text string) string + func Base35Decode(text string) []byte + func Base35Encode(buf []byte) string + func DecryptHost(text, mark string) string + func DecryptRequest(req *http.Request) string + func EncryptHost(text, mark string) string + func EncryptRequest(req *http.Request) string + func NewRand() *rand.Rand + func RandomKey() string + func ReverseRandomKey(key string) []byte + func SafeAddHeader(req *http.Request, k, v string) + func SafeGetHeader(req *http.Request, k string) string + func SplitHostPort(host string) (string, string) + func StartClient(localaddr, upstream string) + func StartServer(addr string) + func TwoWayBridge(target, source net.Conn, key string, throttleTargetToSource bool) + func XorWrite(w http.ResponseWriter, r *http.Request, p []byte, code int) (n int, err error) + type IOCopyCipher struct + Dst io.Writer + Key []byte + Partial bool + Src io.Reader + Throttling *TokenBucket + func (cc *IOCopyCipher) DoCopy() (written int64, err error) + type IOReaderCipher struct + Key []byte + Src io.Reader + func (rc *IOReaderCipher) Init() *IOReaderCipher + func (rc *IOReaderCipher) Read(p []byte) (n int, err error) + type InplaceCTR struct + func GetCipherStream(key []byte) *InplaceCTR + func (x *InplaceCTR) XorBuffer(buf []byte) + type ProxyHttpServer struct + Tr *http.Transport + TrDirect *http.Transport + Upstream string + func (proxy *ProxyHttpServer) CanDirectConnect(host string) bool + func (proxy *ProxyHttpServer) ServeHTTP(w http.ResponseWriter, r *http.Request) + type ProxyUpstreamHttpServer struct + Tr *http.Transport + func (proxy *ProxyUpstreamHttpServer) ServeHTTP(w http.ResponseWriter, r *http.Request) + type TokenBucket struct + Speed int64 + func NewTokenBucket(speed, max int64) *TokenBucket + func (tb *TokenBucket) Consume(n int64)