SYMBOL INDEX (1033 symbols across 138 files) FILE: api/api.go type Handler (line 10) | type Handler function RegisterHandler (line 14) | func RegisterHandler(name string, handler Handler) { function RunService (line 18) | func RunService(ctx context.Context, name string, auth statistic.Authent... FILE: api/control/control.go type apiController (line 18) | type apiController struct method Name (line 36) | func (apiController) Name() string { method listUsers (line 40) | func (o *apiController) listUsers(apiClient service.TrojanServerServic... method getUsers (line 63) | func (o *apiController) getUsers(apiClient service.TrojanServerService... method setUsers (line 88) | func (o *apiController) setUsers(apiClient service.TrojanServerService... method Handle (line 136) | func (o *apiController) Handle() error { method Priority (line 169) | func (o *apiController) Priority() int { function init (line 173) | func init() { FILE: api/service/api.pb.go constant _ (line 18) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) constant _ (line 20) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) type SetUsersRequest_Operation (line 23) | type SetUsersRequest_Operation method Enum (line 45) | func (x SetUsersRequest_Operation) Enum() *SetUsersRequest_Operation { method String (line 51) | func (x SetUsersRequest_Operation) String() string { method Descriptor (line 55) | func (SetUsersRequest_Operation) Descriptor() protoreflect.EnumDescrip... method Type (line 59) | func (SetUsersRequest_Operation) Type() protoreflect.EnumType { method Number (line 63) | func (x SetUsersRequest_Operation) Number() protoreflect.EnumNumber { method EnumDescriptor (line 68) | func (SetUsersRequest_Operation) EnumDescriptor() ([]byte, []int) { constant SetUsersRequest_Add (line 26) | SetUsersRequest_Add SetUsersRequest_Operation = 0 constant SetUsersRequest_Delete (line 27) | SetUsersRequest_Delete SetUsersRequest_Operation = 1 constant SetUsersRequest_Modify (line 28) | SetUsersRequest_Modify SetUsersRequest_Operation = 2 type Traffic (line 72) | type Traffic struct method Reset (line 81) | func (x *Traffic) Reset() { method String (line 90) | func (x *Traffic) String() string { method ProtoMessage (line 94) | func (*Traffic) ProtoMessage() {} method ProtoReflect (line 96) | func (x *Traffic) ProtoReflect() protoreflect.Message { method Descriptor (line 109) | func (*Traffic) Descriptor() ([]byte, []int) { method GetUploadTraffic (line 113) | func (x *Traffic) GetUploadTraffic() uint64 { method GetDownloadTraffic (line 120) | func (x *Traffic) GetDownloadTraffic() uint64 { type Speed (line 127) | type Speed struct method Reset (line 136) | func (x *Speed) Reset() { method String (line 145) | func (x *Speed) String() string { method ProtoMessage (line 149) | func (*Speed) ProtoMessage() {} method ProtoReflect (line 151) | func (x *Speed) ProtoReflect() protoreflect.Message { method Descriptor (line 164) | func (*Speed) Descriptor() ([]byte, []int) { method GetUploadSpeed (line 168) | func (x *Speed) GetUploadSpeed() uint64 { method GetDownloadSpeed (line 175) | func (x *Speed) GetDownloadSpeed() uint64 { type User (line 182) | type User struct method Reset (line 191) | func (x *User) Reset() { method String (line 200) | func (x *User) String() string { method ProtoMessage (line 204) | func (*User) ProtoMessage() {} method ProtoReflect (line 206) | func (x *User) ProtoReflect() protoreflect.Message { method Descriptor (line 219) | func (*User) Descriptor() ([]byte, []int) { method GetPassword (line 223) | func (x *User) GetPassword() string { method GetHash (line 230) | func (x *User) GetHash() string { type UserStatus (line 237) | type UserStatus struct method Reset (line 250) | func (x *UserStatus) Reset() { method String (line 259) | func (x *UserStatus) String() string { method ProtoMessage (line 263) | func (*UserStatus) ProtoMessage() {} method ProtoReflect (line 265) | func (x *UserStatus) ProtoReflect() protoreflect.Message { method Descriptor (line 278) | func (*UserStatus) Descriptor() ([]byte, []int) { method GetUser (line 282) | func (x *UserStatus) GetUser() *User { method GetTrafficTotal (line 289) | func (x *UserStatus) GetTrafficTotal() *Traffic { method GetSpeedCurrent (line 296) | func (x *UserStatus) GetSpeedCurrent() *Speed { method GetSpeedLimit (line 303) | func (x *UserStatus) GetSpeedLimit() *Speed { method GetIpCurrent (line 310) | func (x *UserStatus) GetIpCurrent() int32 { method GetIpLimit (line 317) | func (x *UserStatus) GetIpLimit() int32 { type GetTrafficRequest (line 324) | type GetTrafficRequest struct method Reset (line 332) | func (x *GetTrafficRequest) Reset() { method String (line 341) | func (x *GetTrafficRequest) String() string { method ProtoMessage (line 345) | func (*GetTrafficRequest) ProtoMessage() {} method ProtoReflect (line 347) | func (x *GetTrafficRequest) ProtoReflect() protoreflect.Message { method Descriptor (line 360) | func (*GetTrafficRequest) Descriptor() ([]byte, []int) { method GetUser (line 364) | func (x *GetTrafficRequest) GetUser() *User { type GetTrafficResponse (line 371) | type GetTrafficResponse struct method Reset (line 382) | func (x *GetTrafficResponse) Reset() { method String (line 391) | func (x *GetTrafficResponse) String() string { method ProtoMessage (line 395) | func (*GetTrafficResponse) ProtoMessage() {} method ProtoReflect (line 397) | func (x *GetTrafficResponse) ProtoReflect() protoreflect.Message { method Descriptor (line 410) | func (*GetTrafficResponse) Descriptor() ([]byte, []int) { method GetSuccess (line 414) | func (x *GetTrafficResponse) GetSuccess() bool { method GetInfo (line 421) | func (x *GetTrafficResponse) GetInfo() string { method GetTrafficTotal (line 428) | func (x *GetTrafficResponse) GetTrafficTotal() *Traffic { method GetSpeedCurrent (line 435) | func (x *GetTrafficResponse) GetSpeedCurrent() *Speed { type ListUsersRequest (line 442) | type ListUsersRequest struct method Reset (line 448) | func (x *ListUsersRequest) Reset() { method String (line 457) | func (x *ListUsersRequest) String() string { method ProtoMessage (line 461) | func (*ListUsersRequest) ProtoMessage() {} method ProtoReflect (line 463) | func (x *ListUsersRequest) ProtoReflect() protoreflect.Message { method Descriptor (line 476) | func (*ListUsersRequest) Descriptor() ([]byte, []int) { type ListUsersResponse (line 480) | type ListUsersResponse struct method Reset (line 488) | func (x *ListUsersResponse) Reset() { method String (line 497) | func (x *ListUsersResponse) String() string { method ProtoMessage (line 501) | func (*ListUsersResponse) ProtoMessage() {} method ProtoReflect (line 503) | func (x *ListUsersResponse) ProtoReflect() protoreflect.Message { method Descriptor (line 516) | func (*ListUsersResponse) Descriptor() ([]byte, []int) { method GetStatus (line 520) | func (x *ListUsersResponse) GetStatus() *UserStatus { type GetUsersRequest (line 527) | type GetUsersRequest struct method Reset (line 535) | func (x *GetUsersRequest) Reset() { method String (line 544) | func (x *GetUsersRequest) String() string { method ProtoMessage (line 548) | func (*GetUsersRequest) ProtoMessage() {} method ProtoReflect (line 550) | func (x *GetUsersRequest) ProtoReflect() protoreflect.Message { method Descriptor (line 563) | func (*GetUsersRequest) Descriptor() ([]byte, []int) { method GetUser (line 567) | func (x *GetUsersRequest) GetUser() *User { type GetUsersResponse (line 574) | type GetUsersResponse struct method Reset (line 584) | func (x *GetUsersResponse) Reset() { method String (line 593) | func (x *GetUsersResponse) String() string { method ProtoMessage (line 597) | func (*GetUsersResponse) ProtoMessage() {} method ProtoReflect (line 599) | func (x *GetUsersResponse) ProtoReflect() protoreflect.Message { method Descriptor (line 612) | func (*GetUsersResponse) Descriptor() ([]byte, []int) { method GetSuccess (line 616) | func (x *GetUsersResponse) GetSuccess() bool { method GetInfo (line 623) | func (x *GetUsersResponse) GetInfo() string { method GetStatus (line 630) | func (x *GetUsersResponse) GetStatus() *UserStatus { type SetUsersRequest (line 637) | type SetUsersRequest struct method Reset (line 646) | func (x *SetUsersRequest) Reset() { method String (line 655) | func (x *SetUsersRequest) String() string { method ProtoMessage (line 659) | func (*SetUsersRequest) ProtoMessage() {} method ProtoReflect (line 661) | func (x *SetUsersRequest) ProtoReflect() protoreflect.Message { method Descriptor (line 674) | func (*SetUsersRequest) Descriptor() ([]byte, []int) { method GetStatus (line 678) | func (x *SetUsersRequest) GetStatus() *UserStatus { method GetOperation (line 685) | func (x *SetUsersRequest) GetOperation() SetUsersRequest_Operation { type SetUsersResponse (line 692) | type SetUsersResponse struct method Reset (line 701) | func (x *SetUsersResponse) Reset() { method String (line 710) | func (x *SetUsersResponse) String() string { method ProtoMessage (line 714) | func (*SetUsersResponse) ProtoMessage() {} method ProtoReflect (line 716) | func (x *SetUsersResponse) ProtoReflect() protoreflect.Message { method Descriptor (line 729) | func (*SetUsersResponse) Descriptor() ([]byte, []int) { method GetSuccess (line 733) | func (x *SetUsersResponse) GetSuccess() bool { method GetInfo (line 740) | func (x *SetUsersResponse) GetInfo() string { function file_api_proto_rawDescGZIP (line 863) | func file_api_proto_rawDescGZIP() []byte { function init (line 915) | func init() { file_api_proto_init() } function file_api_proto_init (line 916) | func file_api_proto_init() { FILE: api/service/api_grpc.pb.go constant _ (line 15) | _ = grpc.SupportPackageIsVersion7 type TrojanClientServiceClient (line 20) | type TrojanClientServiceClient interface type trojanClientServiceClient (line 24) | type trojanClientServiceClient struct method GetTraffic (line 32) | func (c *trojanClientServiceClient) GetTraffic(ctx context.Context, in... function NewTrojanClientServiceClient (line 28) | func NewTrojanClientServiceClient(cc grpc.ClientConnInterface) TrojanCli... type TrojanClientServiceServer (line 44) | type TrojanClientServiceServer interface type UnimplementedTrojanClientServiceServer (line 50) | type UnimplementedTrojanClientServiceServer struct method GetTraffic (line 53) | func (UnimplementedTrojanClientServiceServer) GetTraffic(context.Conte... method mustEmbedUnimplementedTrojanClientServiceServer (line 56) | func (UnimplementedTrojanClientServiceServer) mustEmbedUnimplementedTr... type UnsafeTrojanClientServiceServer (line 61) | type UnsafeTrojanClientServiceServer interface function RegisterTrojanClientServiceServer (line 65) | func RegisterTrojanClientServiceServer(s grpc.ServiceRegistrar, srv Troj... function _TrojanClientService_GetTraffic_Handler (line 69) | func _TrojanClientService_GetTraffic_Handler(srv interface{}, ctx contex... type TrojanServerServiceClient (line 106) | type TrojanServerServiceClient interface type trojanServerServiceClient (line 115) | type trojanServerServiceClient struct method ListUsers (line 123) | func (c *trojanServerServiceClient) ListUsers(ctx context.Context, in ... method GetUsers (line 155) | func (c *trojanServerServiceClient) GetUsers(ctx context.Context, opts... method SetUsers (line 186) | func (c *trojanServerServiceClient) SetUsers(ctx context.Context, opts... function NewTrojanServerServiceClient (line 119) | func NewTrojanServerServiceClient(cc grpc.ClientConnInterface) TrojanSer... type TrojanServerService_ListUsersClient (line 138) | type TrojanServerService_ListUsersClient interface type trojanServerServiceListUsersClient (line 143) | type trojanServerServiceListUsersClient struct method Recv (line 147) | func (x *trojanServerServiceListUsersClient) Recv() (*ListUsersRespons... type TrojanServerService_GetUsersClient (line 164) | type TrojanServerService_GetUsersClient interface type trojanServerServiceGetUsersClient (line 170) | type trojanServerServiceGetUsersClient struct method Send (line 174) | func (x *trojanServerServiceGetUsersClient) Send(m *GetUsersRequest) e... method Recv (line 178) | func (x *trojanServerServiceGetUsersClient) Recv() (*GetUsersResponse,... type TrojanServerService_SetUsersClient (line 195) | type TrojanServerService_SetUsersClient interface type trojanServerServiceSetUsersClient (line 201) | type trojanServerServiceSetUsersClient struct method Send (line 205) | func (x *trojanServerServiceSetUsersClient) Send(m *SetUsersRequest) e... method Recv (line 209) | func (x *trojanServerServiceSetUsersClient) Recv() (*SetUsersResponse,... type TrojanServerServiceServer (line 220) | type TrojanServerServiceServer interface type UnimplementedTrojanServerServiceServer (line 231) | type UnimplementedTrojanServerServiceServer struct method ListUsers (line 234) | func (UnimplementedTrojanServerServiceServer) ListUsers(*ListUsersRequ... method GetUsers (line 237) | func (UnimplementedTrojanServerServiceServer) GetUsers(TrojanServerSer... method SetUsers (line 240) | func (UnimplementedTrojanServerServiceServer) SetUsers(TrojanServerSer... method mustEmbedUnimplementedTrojanServerServiceServer (line 243) | func (UnimplementedTrojanServerServiceServer) mustEmbedUnimplementedTr... type UnsafeTrojanServerServiceServer (line 248) | type UnsafeTrojanServerServiceServer interface function RegisterTrojanServerServiceServer (line 252) | func RegisterTrojanServerServiceServer(s grpc.ServiceRegistrar, srv Troj... function _TrojanServerService_ListUsers_Handler (line 256) | func _TrojanServerService_ListUsers_Handler(srv interface{}, stream grpc... type TrojanServerService_ListUsersServer (line 264) | type TrojanServerService_ListUsersServer interface type trojanServerServiceListUsersServer (line 269) | type trojanServerServiceListUsersServer struct method Send (line 273) | func (x *trojanServerServiceListUsersServer) Send(m *ListUsersResponse... function _TrojanServerService_GetUsers_Handler (line 277) | func _TrojanServerService_GetUsers_Handler(srv interface{}, stream grpc.... type TrojanServerService_GetUsersServer (line 281) | type TrojanServerService_GetUsersServer interface type trojanServerServiceGetUsersServer (line 287) | type trojanServerServiceGetUsersServer struct method Send (line 291) | func (x *trojanServerServiceGetUsersServer) Send(m *GetUsersResponse) ... method Recv (line 295) | func (x *trojanServerServiceGetUsersServer) Recv() (*GetUsersRequest, ... function _TrojanServerService_SetUsers_Handler (line 303) | func _TrojanServerService_SetUsers_Handler(srv interface{}, stream grpc.... type TrojanServerService_SetUsersServer (line 307) | type TrojanServerService_SetUsersServer interface type trojanServerServiceSetUsersServer (line 313) | type trojanServerServiceSetUsersServer struct method Send (line 317) | func (x *trojanServerServiceSetUsersServer) Send(m *SetUsersResponse) ... method Recv (line 321) | func (x *trojanServerServiceSetUsersServer) Recv() (*SetUsersRequest, ... FILE: api/service/client.go type ClientAPI (line 15) | type ClientAPI struct method GetTraffic (line 26) | func (s *ClientAPI) GetTraffic(ctx context.Context, req *GetTrafficReq... function RunClientAPI (line 54) | func RunClientAPI(ctx context.Context, auth statistic.Authenticator) err... function init (line 96) | func init() { FILE: api/service/client_test.go function TestClientAPI (line 16) | func TestClientAPI(t *testing.T) { FILE: api/service/config.go constant Name (line 5) | Name = "API_SERVICE" type SSLConfig (line 7) | type SSLConfig struct type APIConfig (line 15) | type APIConfig struct type Config (line 22) | type Config struct function init (line 26) | func init() { FILE: api/service/server.go type ServerAPI (line 22) | type ServerAPI struct method GetUsers (line 27) | func (s *ServerAPI) GetUsers(stream TrojanServerService_GetUsersServer... method SetUsers (line 82) | func (s *ServerAPI) SetUsers(stream TrojanServerService_SetUsersServer... method ListUsers (line 147) | func (s *ServerAPI) ListUsers(req *ListUsersRequest, stream TrojanServ... function newAPIServer (line 184) | func newAPIServer(cfg *Config) (*grpc.Server, error) { function RunServerAPI (line 218) | func RunServerAPI(ctx context.Context, auth statistic.Authenticator) err... function init (line 259) | func init() { FILE: api/service/server_test.go function TestServerAPI (line 20) | func TestServerAPI(t *testing.T) { function TestTLSRSA (line 160) | func TestTLSRSA(t *testing.T) { function TestTLSECC (line 210) | func TestTLSECC(t *testing.T) { function init (line 416) | func init() { FILE: common/common.go type Runnable (line 12) | type Runnable interface function SHA224String (line 17) | func SHA224String(password string) string { function GetProgramDir (line 28) | func GetProgramDir() string { function GetAssetLocation (line 36) | func GetAssetLocation(file string) string { FILE: common/error.go type Error (line 7) | type Error struct method Error (line 11) | func (e *Error) Error() string { method Base (line 15) | func (e *Error) Base(err error) *Error { function NewError (line 22) | func NewError(info string) *Error { function Must (line 28) | func Must(err error) { function Must2 (line 35) | func Must2(_ interface{}, err error) { FILE: common/geodata/cache.go type geoipCache (line 14) | type geoipCache method Has (line 16) | func (g geoipCache) Has(key string) bool { method Get (line 20) | func (g geoipCache) Get(key string) *v2router.GeoIP { method Set (line 27) | func (g geoipCache) Set(key string, value *v2router.GeoIP) { method Unmarshal (line 34) | func (g geoipCache) Unmarshal(filename, code string) (*v2router.GeoIP,... type geositeCache (line 80) | type geositeCache method Has (line 82) | func (g geositeCache) Has(key string) bool { method Get (line 86) | func (g geositeCache) Get(key string) *v2router.GeoSite { method Set (line 93) | func (g geositeCache) Set(key string, value *v2router.GeoSite) { method Unmarshal (line 100) | func (g geositeCache) Unmarshal(filename, code string) (*v2router.GeoS... FILE: common/geodata/decode.go function EmitBytes (line 29) | func EmitBytes(f io.ReadSeeker, code string) ([]byte, error) { function Decode (line 102) | func Decode(filename, code string) ([]byte, error) { FILE: common/geodata/decode_test.go function init (line 16) | func init() { function TestDecodeGeoIP (line 45) | func TestDecodeGeoIP(t *testing.T) { function TestDecodeGeoSite (line 58) | func TestDecodeGeoSite(t *testing.T) { function BenchmarkLoadGeoIP (line 71) | func BenchmarkLoadGeoIP(b *testing.B) { function BenchmarkLoadGeoSite (line 88) | func BenchmarkLoadGeoSite(b *testing.B) { FILE: common/geodata/interface.go type GeodataLoader (line 5) | type GeodataLoader interface FILE: common/geodata/loader.go type geodataCache (line 9) | type geodataCache struct method LoadIP (line 21) | func (g *geodataCache) LoadIP(filename, country string) ([]*v2router.C... method LoadSite (line 30) | func (g *geodataCache) LoadSite(filename, list string) ([]*v2router.Do... method LoadGeoIP (line 39) | func (g *geodataCache) LoadGeoIP(country string) ([]*v2router.CIDR, er... method LoadGeoSite (line 43) | func (g *geodataCache) LoadGeoSite(list string) ([]*v2router.Domain, e... function NewGeodataLoader (line 14) | func NewGeodataLoader() GeodataLoader { FILE: common/io.go type RewindReader (line 11) | type RewindReader struct method Read (line 21) | func (r *RewindReader) Read(p []byte) (int, error) { method ReadByte (line 43) | func (r *RewindReader) ReadByte() (byte, error) { method Discard (line 49) | func (r *RewindReader) Discard(n int) (int, error) { method Rewind (line 66) | func (r *RewindReader) Rewind() { method StopBuffering (line 76) | func (r *RewindReader) StopBuffering() { method SetBufferSize (line 82) | func (r *RewindReader) SetBufferSize(size int) { type RewindConn (line 104) | type RewindConn struct method Read (line 109) | func (c *RewindConn) Read(p []byte) (int, error) { function NewRewindConn (line 113) | func NewRewindConn(conn net.Conn) *RewindConn { type StickyWriter (line 122) | type StickyWriter struct method Write (line 128) | func (w *StickyWriter) Write(p []byte) (int, error) { FILE: common/io_test.go function TestBufferedReader (line 11) | func TestBufferedReader(t *testing.T) { FILE: common/net.go constant KiB (line 17) | KiB = 1024 constant MiB (line 18) | MiB = KiB * 1024 constant GiB (line 19) | GiB = MiB * 1024 function HumanFriendlyTraffic (line 22) | func HumanFriendlyTraffic(bytes uint64) string { function PickPort (line 35) | func PickPort(network string, host string) int { function WriteAllBytes (line 69) | func WriteAllBytes(writer io.Writer, payload []byte) error { function WriteFile (line 80) | func WriteFile(path string, payload []byte) error { function FetchHTTPContent (line 90) | func FetchHTTPContent(target string) ([]byte, error) { FILE: common/sync.go type Notifier (line 4) | type Notifier struct method Signal (line 16) | func (n *Notifier) Signal() { method Wait (line 24) | func (n *Notifier) Wait() <-chan struct{} { function NewNotifier (line 9) | func NewNotifier() *Notifier { FILE: config/config.go type Creator (line 13) | type Creator function RegisterConfigCreator (line 16) | func RegisterConfigCreator(name string, creator Creator) { function parseJSON (line 21) | func parseJSON(data []byte) (map[string]interface{}, error) { function parseYAML (line 33) | func parseYAML(data []byte) (map[string]interface{}, error) { function WithJSONConfig (line 45) | func WithJSONConfig(ctx context.Context, data []byte) (context.Context, ... function WithYAMLConfig (line 58) | func WithYAMLConfig(ctx context.Context, data []byte) (context.Context, ... function WithConfig (line 71) | func WithConfig(ctx context.Context, name string, cfg interface{}) conte... function FromContext (line 77) | func FromContext(ctx context.Context, name string) interface{} { FILE: config/config_test.go type Foo (line 10) | type Foo struct type TestStruct (line 15) | type TestStruct struct function creator (line 21) | func creator() interface{} { function TestJSONConfig (line 25) | func TestJSONConfig(t *testing.T) { function TestYAMLConfig (line 47) | func TestYAMLConfig(t *testing.T) { FILE: easy/easy.go type easy (line 15) | type easy struct method Name (line 50) | func (o *easy) Name() string { method Handle (line 54) | func (o *easy) Handle() error { method Priority (line 158) | func (o *easy) Priority() int { type ClientConfig (line 25) | type ClientConfig struct type TLS (line 34) | type TLS struct type ServerConfig (line 40) | type ServerConfig struct function init (line 162) | func init() { FILE: log/golog/buffer/buffer.go type Buffer (line 7) | type Buffer method Reset (line 10) | func (b *Buffer) Reset() { method Append (line 15) | func (b *Buffer) Append(data []byte) { method AppendByte (line 20) | func (b *Buffer) AppendByte(data byte) { method AppendInt (line 25) | func (b *Buffer) AppendInt(val int, width int) { method Bytes (line 40) | func (b Buffer) Bytes() []byte { FILE: log/golog/buffer/buffer_test.go function TestBufferAllocation (line 14) | func TestBufferAllocation(t *testing.T) { function TestBufferReset (line 52) | func TestBufferReset(t *testing.T) { FILE: log/golog/colorful/colorful.go type ColorBuffer (line 13) | type ColorBuffer struct method Off (line 43) | func (cb *ColorBuffer) Off() { method Red (line 48) | func (cb *ColorBuffer) Red() { method Green (line 53) | func (cb *ColorBuffer) Green() { method Orange (line 58) | func (cb *ColorBuffer) Orange() { method Blue (line 63) | func (cb *ColorBuffer) Blue() { method Purple (line 68) | func (cb *ColorBuffer) Purple() { method Cyan (line 73) | func (cb *ColorBuffer) Cyan() { method Gray (line 78) | func (cb *ColorBuffer) Gray() { function init (line 29) | func init() { function mixer (line 83) | func mixer(data []byte, color []byte) []byte { function Red (line 89) | func Red(data []byte) []byte { function Green (line 94) | func Green(data []byte) []byte { function Orange (line 99) | func Orange(data []byte) []byte { function Blue (line 104) | func Blue(data []byte) []byte { function Purple (line 109) | func Purple(data []byte) []byte { function Cyan (line 114) | func Cyan(data []byte) []byte { function Gray (line 119) | func Gray(data []byte) []byte { FILE: log/golog/colorful/colorful_test.go function TestColorBuffer (line 16) | func TestColorBuffer(t *testing.T) { function TestColorMixer (line 48) | func TestColorMixer(t *testing.T) { FILE: log/golog/golog.go function init (line 22) | func init() { type FdWriter (line 28) | type FdWriter interface type Logger (line 34) | type Logger struct method SetLogLevel (line 111) | func (l *Logger) SetLogLevel(level log.LogLevel) { method SetOutput (line 117) | func (l *Logger) SetOutput(w io.Writer) { method WithColor (line 128) | func (l *Logger) WithColor() *Logger { method WithoutColor (line 136) | func (l *Logger) WithoutColor() *Logger { method WithDebug (line 144) | func (l *Logger) WithDebug() *Logger { method WithoutDebug (line 152) | func (l *Logger) WithoutDebug() *Logger { method IsDebug (line 160) | func (l *Logger) IsDebug() bool { method WithTimestamp (line 167) | func (l *Logger) WithTimestamp() *Logger { method WithoutTimestamp (line 175) | func (l *Logger) WithoutTimestamp() *Logger { method Quiet (line 183) | func (l *Logger) Quiet() *Logger { method NoQuiet (line 191) | func (l *Logger) NoQuiet() *Logger { method IsQuiet (line 199) | func (l *Logger) IsQuiet() bool { method Output (line 206) | func (l *Logger) Output(depth int, prefix Prefix, data string) error { method Fatal (line 298) | func (l *Logger) Fatal(v ...interface{}) { method Fatalf (line 307) | func (l *Logger) Fatalf(format string, v ...interface{}) { method Error (line 315) | func (l *Logger) Error(v ...interface{}) { method Errorf (line 322) | func (l *Logger) Errorf(format string, v ...interface{}) { method Warn (line 329) | func (l *Logger) Warn(v ...interface{}) { method Warnf (line 336) | func (l *Logger) Warnf(format string, v ...interface{}) { method Info (line 343) | func (l *Logger) Info(v ...interface{}) { method Infof (line 350) | func (l *Logger) Infof(format string, v ...interface{}) { method Debug (line 357) | func (l *Logger) Debug(v ...interface{}) { method Debugf (line 364) | func (l *Logger) Debugf(format string, v ...interface{}) { method Trace (line 371) | func (l *Logger) Trace(v ...interface{}) { method Tracef (line 378) | func (l *Logger) Tracef(format string, v ...interface{}) { type Prefix (line 46) | type Prefix struct function New (line 103) | func New(out FdWriter) *Logger { FILE: log/log.go type LogLevel (line 10) | type LogLevel constant AllLevel (line 13) | AllLevel LogLevel = 0 constant InfoLevel (line 14) | InfoLevel LogLevel = 1 constant WarnLevel (line 15) | WarnLevel LogLevel = 2 constant ErrorLevel (line 16) | ErrorLevel LogLevel = 3 constant FatalLevel (line 17) | FatalLevel LogLevel = 4 constant OffLevel (line 18) | OffLevel LogLevel = 5 type Logger (line 21) | type Logger interface type EmptyLogger (line 40) | type EmptyLogger struct method SetLogLevel (line 42) | func (l *EmptyLogger) SetLogLevel(LogLevel) {} method Fatal (line 44) | func (l *EmptyLogger) Fatal(v ...interface{}) { os.Exit(1) } method Fatalf (line 46) | func (l *EmptyLogger) Fatalf(format string, v ...interface{}) { os.Exi... method Error (line 48) | func (l *EmptyLogger) Error(v ...interface{}) {} method Errorf (line 50) | func (l *EmptyLogger) Errorf(format string, v ...interface{}) {} method Warn (line 52) | func (l *EmptyLogger) Warn(v ...interface{}) {} method Warnf (line 54) | func (l *EmptyLogger) Warnf(format string, v ...interface{}) {} method Info (line 56) | func (l *EmptyLogger) Info(v ...interface{}) {} method Infof (line 58) | func (l *EmptyLogger) Infof(format string, v ...interface{}) {} method Debug (line 60) | func (l *EmptyLogger) Debug(v ...interface{}) {} method Debugf (line 62) | func (l *EmptyLogger) Debugf(format string, v ...interface{}) {} method Trace (line 64) | func (l *EmptyLogger) Trace(v ...interface{}) {} method Tracef (line 66) | func (l *EmptyLogger) Tracef(format string, v ...interface{}) {} method SetOutput (line 68) | func (l *EmptyLogger) SetOutput(w io.Writer) {} function Error (line 70) | func Error(v ...interface{}) { function Errorf (line 74) | func Errorf(format string, v ...interface{}) { function Warn (line 78) | func Warn(v ...interface{}) { function Warnf (line 82) | func Warnf(format string, v ...interface{}) { function Info (line 86) | func Info(v ...interface{}) { function Infof (line 90) | func Infof(format string, v ...interface{}) { function Debug (line 94) | func Debug(v ...interface{}) { function Debugf (line 98) | func Debugf(format string, v ...interface{}) { function Trace (line 102) | func Trace(v ...interface{}) { function Tracef (line 106) | func Tracef(format string, v ...interface{}) { function Fatal (line 110) | func Fatal(v ...interface{}) { function Fatalf (line 114) | func Fatalf(format string, v ...interface{}) { function SetLogLevel (line 118) | func SetLogLevel(level LogLevel) { function SetOutput (line 122) | func SetOutput(w io.Writer) { function RegisterLogger (line 126) | func RegisterLogger(l Logger) { FILE: log/simplelog/simplelog.go function init (line 11) | func init() { type SimpleLogger (line 15) | type SimpleLogger struct method SetLogLevel (line 19) | func (l *SimpleLogger) SetLogLevel(level log.LogLevel) { method Fatal (line 23) | func (l *SimpleLogger) Fatal(v ...interface{}) { method Fatalf (line 30) | func (l *SimpleLogger) Fatalf(format string, v ...interface{}) { method Error (line 37) | func (l *SimpleLogger) Error(v ...interface{}) { method Errorf (line 43) | func (l *SimpleLogger) Errorf(format string, v ...interface{}) { method Warn (line 49) | func (l *SimpleLogger) Warn(v ...interface{}) { method Warnf (line 55) | func (l *SimpleLogger) Warnf(format string, v ...interface{}) { method Info (line 61) | func (l *SimpleLogger) Info(v ...interface{}) { method Infof (line 67) | func (l *SimpleLogger) Infof(format string, v ...interface{}) { method Debug (line 73) | func (l *SimpleLogger) Debug(v ...interface{}) { method Debugf (line 79) | func (l *SimpleLogger) Debugf(format string, v ...interface{}) { method Trace (line 85) | func (l *SimpleLogger) Trace(v ...interface{}) { method Tracef (line 91) | func (l *SimpleLogger) Tracef(format string, v ...interface{}) { method SetOutput (line 97) | func (l *SimpleLogger) SetOutput(io.Writer) { FILE: main.go function main (line 11) | func main() { FILE: option/option.go type Handler (line 5) | type Handler interface function RegisterHandler (line 13) | func RegisterHandler(h Handler) { function PopOptionHandler (line 17) | func PopOptionHandler() (Handler, error) { FILE: proxy/client/client.go constant Name (line 21) | Name = "CLIENT" function GenerateClientTree (line 24) | func GenerateClientTree(transportPlugin bool, muxEnabled bool, wsEnabled... function init (line 45) | func init() { FILE: proxy/client/config.go type MuxConfig (line 5) | type MuxConfig struct type WebsocketConfig (line 9) | type WebsocketConfig struct type RouterConfig (line 13) | type RouterConfig struct type ShadowsocksConfig (line 17) | type ShadowsocksConfig struct type TransportPluginConfig (line 21) | type TransportPluginConfig struct type Config (line 25) | type Config struct function init (line 33) | func init() { FILE: proxy/config.go type Config (line 5) | type Config struct function init (line 11) | func init() { FILE: proxy/custom/config.go constant Name (line 5) | Name = "CUSTOM" type NodeConfig (line 7) | type NodeConfig struct type StackConfig (line 13) | type StackConfig struct type Config (line 18) | type Config struct function init (line 23) | func init() { FILE: proxy/custom/custom.go function convert (line 15) | func convert(i interface{}) interface{} { function buildNodes (line 31) | func buildNodes(ctx context.Context, nodeConfigList []NodeConfig) (map[s... function init (line 54) | func init() { FILE: proxy/forward/forward.go constant Name (line 13) | Name = "FORWARD" function init (line 15) | func init() { function init (line 35) | func init() { FILE: proxy/nat/nat.go constant Name (line 17) | Name = "NAT" function init (line 19) | func init() { function init (line 42) | func init() { FILE: proxy/option.go type Option (line 18) | type Option struct method Name (line 22) | func (o *Option) Name() string { method Handle (line 44) | func (o *Option) Handle() error { method Priority (line 90) | func (o *Option) Priority() int { function detectAndReadConfig (line 26) | func detectAndReadConfig(file string) ([]byte, bool, error) { function init (line 94) | func init() { type StdinOption (line 104) | type StdinOption struct method Name (line 109) | func (o *StdinOption) Name() string { method Handle (line 113) | func (o *StdinOption) Handle() error { method Priority (line 145) | func (o *StdinOption) Priority() int { method isFormatJson (line 149) | func (o *StdinOption) isFormatJson() (isJson bool, e error) { FILE: proxy/proxy.go constant Name (line 17) | Name = "PROXY" constant MaxPacketSize (line 20) | MaxPacketSize = 1024 * 8 type Proxy (line 24) | type Proxy struct method Run (line 31) | func (p *Proxy) Run() error { method Close (line 38) | func (p *Proxy) Close() error { method relayConnLoop (line 47) | func (p *Proxy) relayConnLoop() { method relayPacketLoop (line 93) | func (p *Proxy) relayPacketLoop() { function NewProxy (line 153) | func NewProxy(ctx context.Context, cancel context.CancelFunc, sources []... type Creator (line 162) | type Creator function RegisterProxyCreator (line 166) | func RegisterProxyCreator(name string, creator Creator) { function NewProxyFromConfigData (line 170) | func NewProxyFromConfigData(data []byte, isJSON bool) (*Proxy, error) { FILE: proxy/server/config.go function init (line 8) | func init() { FILE: proxy/server/server.go constant Name (line 20) | Name = "SERVER" function init (line 22) | func init() { FILE: proxy/stack.go type Node (line 10) | type Node struct method BuildNext (line 19) | func (n *Node) BuildNext(name string) *Node { method LinkNextNode (line 41) | func (n *Node) LinkNextNode(next *Node) *Node { function FindAllEndpoints (line 58) | func FindAllEndpoints(root *Node) []tunnel.Server { function CreateClientStack (line 70) | func CreateClientStack(ctx context.Context, clientStack []string) (tunne... function CreateServerStack (line 86) | func CreateServerStack(ctx context.Context, serverStack []string) (tunne... FILE: redirector/redirector.go type Dial (line 13) | type Dial function defaultDial (line 15) | func defaultDial(addr net.Addr) (net.Conn, error) { type Redirection (line 19) | type Redirection struct type Redirector (line 25) | type Redirector struct method Redirect (line 30) | func (r *Redirector) Redirect(redirection *Redirection) { method worker (line 39) | func (r *Redirector) worker() { function NewRedirector (line 89) | func NewRedirector(ctx context.Context) *Redirector { FILE: redirector/redirector_test.go function TestRedirector (line 16) | func TestRedirector(t *testing.T) { FILE: statistic/memory/config.go type Config (line 7) | type Config struct function init (line 11) | func init() { FILE: statistic/memory/memory.go constant Name (line 17) | Name = "MEMORY" type User (line 19) | type User struct method Close (line 43) | func (u *User) Close() error { method AddIP (line 49) | func (u *User) AddIP(ip string) bool { method DelIP (line 65) | func (u *User) DelIP(ip string) bool { method GetIP (line 78) | func (u *User) GetIP() int { method SetIPLimit (line 82) | func (u *User) SetIPLimit(n int) { method GetIPLimit (line 86) | func (u *User) GetIPLimit() int { method AddTraffic (line 90) | func (u *User) AddTraffic(sent, recv int) { method SetSpeedLimit (line 103) | func (u *User) SetSpeedLimit(send, recv int) { method GetSpeedLimit (line 119) | func (u *User) GetSpeedLimit() (send, recv int) { method Hash (line 132) | func (u *User) Hash() string { method SetTraffic (line 136) | func (u *User) SetTraffic(send, recv uint64) { method GetTraffic (line 141) | func (u *User) GetTraffic() (uint64, uint64) { method ResetTraffic (line 145) | func (u *User) ResetTraffic() (uint64, uint64) { method speedUpdater (line 153) | func (u *User) speedUpdater() { method GetSpeed (line 169) | func (u *User) GetSpeed() (uint64, uint64) { type Authenticator (line 173) | type Authenticator struct method AuthUser (line 178) | func (a *Authenticator) AuthUser(hash string) (bool, statistic.User) { method AddUser (line 185) | func (a *Authenticator) AddUser(hash string) error { method DelUser (line 200) | func (a *Authenticator) DelUser(hash string) error { method ListUsers (line 210) | func (a *Authenticator) ListUsers() []statistic.User { method Close (line 219) | func (a *Authenticator) Close() error { function NewAuthenticator (line 223) | func NewAuthenticator(ctx context.Context) (statistic.Authenticator, err... function init (line 236) | func init() { FILE: statistic/memory/memory_test.go function TestMemoryAuth (line 14) | func TestMemoryAuth(t *testing.T) { function BenchmarkMemoryUsage (line 124) | func BenchmarkMemoryUsage(b *testing.B) { FILE: statistic/mysql/config.go type MySQLConfig (line 7) | type MySQLConfig struct type Config (line 17) | type Config struct function init (line 21) | func init() { FILE: statistic/mysql/mysql.go constant Name (line 20) | Name = "MYSQL" type Authenticator (line 22) | type Authenticator struct method updater (line 29) | func (a *Authenticator) updater() { function connectDatabase (line 80) | func connectDatabase(driverName, username, password, ip string, port int... function NewAuthenticator (line 85) | func NewAuthenticator(ctx context.Context) (statistic.Authenticator, err... function init (line 113) | func init() { FILE: statistic/statistics.go type TrafficMeter (line 13) | type TrafficMeter interface type IPRecorder (line 25) | type IPRecorder interface type User (line 33) | type User interface type Authenticator (line 38) | type Authenticator interface type Creator (line 46) | type Creator function RegisterAuthenticatorCreator (line 54) | func RegisterAuthenticatorCreator(name string, creator Creator) { function NewAuthenticator (line 58) | func NewAuthenticator(ctx context.Context, name string) (Authenticator, ... FILE: test/scenario/custom_test.go function TestCustom1 (line 12) | func TestCustom1(t *testing.T) { function TestCustom2 (line 127) | func TestCustom2(t *testing.T) { FILE: test/scenario/proxy_test.go function init (line 83) | func init() { function CheckClientServer (line 88) | func CheckClientServer(clientData, serverData string, socksPort int) (ok... function TestClientServerWebsocketSubTree (line 130) | func TestClientServerWebsocketSubTree(t *testing.T) { function TestClientServerTrojanSubTree (line 185) | func TestClientServerTrojanSubTree(t *testing.T) { function TestWebsocketDetection (line 232) | func TestWebsocketDetection(t *testing.T) { function TestPluginWebsocket (line 284) | func TestPluginWebsocket(t *testing.T) { function TestForward (line 337) | func TestForward(t *testing.T) { function TestLeak (line 429) | func TestLeak(t *testing.T) { function SingleThreadBenchmark (line 464) | func SingleThreadBenchmark(clientData, serverData string, socksPort int) { function BenchmarkClientServer (line 500) | func BenchmarkClientServer(b *testing.B) { FILE: test/util/target.go function runHelloHTTPServer (line 24) | func runHelloHTTPServer() { function runTCPEchoServer (line 61) | func runTCPEchoServer() { function runUDPEchoServer (line 92) | func runUDPEchoServer() { function GeneratePayload (line 109) | func GeneratePayload(length int) []byte { function runTCPBlackHoleServer (line 120) | func runTCPBlackHoleServer() { function runUDPBlackHoleServer (line 139) | func runUDPBlackHoleServer() { function init (line 157) | func init() { FILE: test/util/util.go function CheckConn (line 14) | func CheckConn(a net.Conn, b net.Conn) bool { function CheckPacketOverConn (line 45) | func CheckPacketOverConn(a, b net.PacketConn) bool { function CheckPacket (line 78) | func CheckPacket(a, b net.PacketConn) bool { function GetTestAddr (line 101) | func GetTestAddr() string { FILE: tunnel/adapter/config.go type Config (line 5) | type Config struct function init (line 10) | func init() { FILE: tunnel/adapter/server.go type Server (line 17) | type Server struct method acceptConnLoop (line 28) | func (s *Server) acceptConnLoop() { method AcceptConn (line 67) | func (s *Server) AcceptConn(overlay tunnel.Tunnel) (tunnel.Conn, error) { method AcceptPacket (line 90) | func (s *Server) AcceptPacket(tunnel.Tunnel) (tunnel.PacketConn, error) { method Close (line 96) | func (s *Server) Close() error { function NewServer (line 102) | func NewServer(ctx context.Context, _ tunnel.Server) (*Server, error) { FILE: tunnel/adapter/tunnel.go constant Name (line 9) | Name = "ADAPTER" type Tunnel (line 11) | type Tunnel struct method Name (line 13) | func (t *Tunnel) Name() string { method NewClient (line 17) | func (t *Tunnel) NewClient(ctx context.Context, client tunnel.Client) ... method NewServer (line 21) | func (t *Tunnel) NewServer(ctx context.Context, server tunnel.Server) ... function init (line 25) | func init() { FILE: tunnel/dokodemo/config.go type Config (line 5) | type Config struct function init (line 13) | func init() { FILE: tunnel/dokodemo/conn.go constant MaxPacketSize (line 11) | MaxPacketSize = 1024 * 8 type Conn (line 13) | type Conn struct method Metadata (line 19) | func (c *Conn) Metadata() *tunnel.Metadata { type PacketConn (line 24) | type PacketConn struct method Close (line 34) | func (c *PacketConn) Close() error { method ReadFrom (line 40) | func (c *PacketConn) ReadFrom(p []byte) (int, net.Addr, error) { method WriteTo (line 44) | func (c *PacketConn) WriteTo(p []byte, addr net.Addr) (int, error) { method ReadWithMetadata (line 54) | func (c *PacketConn) ReadWithMetadata(p []byte) (int, *tunnel.Metadata... method WriteWithMetadata (line 64) | func (c *PacketConn) WriteWithMetadata(p []byte, m *tunnel.Metadata) (... FILE: tunnel/dokodemo/dokodemo_test.go function TestDokodemo (line 15) | func TestDokodemo(t *testing.T) { FILE: tunnel/dokodemo/server.go type Server (line 15) | type Server struct method dispatchLoop (line 28) | func (s *Server) dispatchLoop() { method AcceptConn (line 91) | func (s *Server) AcceptConn(tunnel.Tunnel) (tunnel.Conn, error) { method AcceptPacket (line 104) | func (s *Server) AcceptPacket(tunnel.Tunnel) (tunnel.PacketConn, error) { method Close (line 113) | func (s *Server) Close() error { function NewServer (line 120) | func NewServer(ctx context.Context, _ tunnel.Server) (*Server, error) { FILE: tunnel/dokodemo/tunnel.go constant Name (line 10) | Name = "DOKODEMO" type Tunnel (line 12) | type Tunnel struct method Name (line 14) | func (*Tunnel) Name() string { method NewServer (line 18) | func (*Tunnel) NewServer(ctx context.Context, underlay tunnel.Server) ... method NewClient (line 22) | func (*Tunnel) NewClient(ctx context.Context, underlay tunnel.Client) ... function init (line 26) | func init() { FILE: tunnel/freedom/client.go type Client (line 15) | type Client struct method DialConn (line 27) | func (c *Client) DialConn(addr *tunnel.Address, _ tunnel.Tunnel) (tunn... method DialPacket (line 66) | func (c *Client) DialPacket(tunnel.Tunnel) (tunnel.PacketConn, error) { method Close (line 107) | func (c *Client) Close() error { function NewClient (line 112) | func NewClient(ctx context.Context, _ tunnel.Client) (*Client, error) { FILE: tunnel/freedom/config.go type Config (line 5) | type Config struct type TCPConfig (line 12) | type TCPConfig struct type ForwardProxyConfig (line 18) | type ForwardProxyConfig struct function init (line 26) | func init() { FILE: tunnel/freedom/conn.go constant MaxPacketSize (line 14) | MaxPacketSize = 1024 * 8 type Conn (line 16) | type Conn struct method Metadata (line 20) | func (c *Conn) Metadata() *tunnel.Metadata { type PacketConn (line 24) | type PacketConn struct method WriteWithMetadata (line 28) | func (c *PacketConn) WriteWithMetadata(p []byte, m *tunnel.Metadata) (... method ReadWithMetadata (line 32) | func (c *PacketConn) ReadWithMetadata(p []byte) (int, *tunnel.Metadata... method WriteTo (line 45) | func (c *PacketConn) WriteTo(p []byte, addr net.Addr) (int, error) { type SocksPacketConn (line 60) | type SocksPacketConn struct method WriteWithMetadata (line 66) | func (c *SocksPacketConn) WriteWithMetadata(payload []byte, metadata *... method ReadWithMetadata (line 79) | func (c *SocksPacketConn) ReadWithMetadata(payload []byte) (int, *tunn... method Close (line 100) | func (c *SocksPacketConn) Close() error { FILE: tunnel/freedom/freedom_test.go function TestConn (line 17) | func TestConn(t *testing.T) { function TestPacket (line 40) | func TestPacket(t *testing.T) { function TestSocks (line 63) | func TestSocks(t *testing.T) { FILE: tunnel/freedom/tunnel.go constant Name (line 9) | Name = "FREEDOM" type Tunnel (line 11) | type Tunnel struct method Name (line 13) | func (*Tunnel) Name() string { method NewClient (line 17) | func (*Tunnel) NewClient(ctx context.Context, client tunnel.Client) (t... method NewServer (line 21) | func (*Tunnel) NewServer(ctx context.Context, client tunnel.Server) (t... function init (line 25) | func init() { FILE: tunnel/http/http_test.go function TestHTTP (line 19) | func TestHTTP(t *testing.T) { FILE: tunnel/http/server.go type ConnectConn (line 18) | type ConnectConn struct method Metadata (line 23) | func (c *ConnectConn) Metadata() *tunnel.Metadata { type OtherConn (line 27) | type OtherConn struct method Metadata (line 36) | func (c *OtherConn) Metadata() *tunnel.Metadata { method Read (line 40) | func (c *OtherConn) Read(p []byte) (int, error) { method Write (line 53) | func (c *OtherConn) Write(p []byte) (int, error) { method Close (line 57) | func (c *OtherConn) Close() error { type Server (line 64) | type Server struct method acceptLoop (line 71) | func (s *Server) acceptLoop() { method AcceptConn (line 169) | func (s *Server) AcceptConn(tunnel.Tunnel) (tunnel.Conn, error) { method AcceptPacket (line 178) | func (s *Server) AcceptPacket(tunnel.Tunnel) (tunnel.PacketConn, error) { method Close (line 183) | func (s *Server) Close() error { function NewServer (line 188) | func NewServer(ctx context.Context, underlay tunnel.Server) (*Server, er... FILE: tunnel/http/tunnel.go constant Name (line 9) | Name = "HTTP" type Tunnel (line 11) | type Tunnel struct method Name (line 13) | func (t *Tunnel) Name() string { method NewClient (line 17) | func (t *Tunnel) NewClient(ctx context.Context, client tunnel.Client) ... method NewServer (line 21) | func (t *Tunnel) NewServer(ctx context.Context, server tunnel.Server) ... function init (line 25) | func init() { FILE: tunnel/metadata.go type Command (line 14) | type Command type Metadata (line 16) | type Metadata struct method ReadFrom (line 21) | func (r *Metadata) ReadFrom(rr io.Reader) error { method WriteTo (line 36) | func (r *Metadata) WriteTo(w io.Writer) error { method Network (line 48) | func (r *Metadata) Network() string { method String (line 52) | func (r *Metadata) String() string { type AddressType (line 56) | type AddressType constant IPv4 (line 59) | IPv4 AddressType = 1 constant DomainName (line 60) | DomainName AddressType = 3 constant IPv6 (line 61) | IPv6 AddressType = 4 type Address (line 64) | type Address struct method String (line 72) | func (a *Address) String() string { method Network (line 85) | func (a *Address) Network() string { method ResolveIP (line 89) | func (a *Address) ResolveIP() (net.IP, error) { method ReadFrom (line 139) | func (a *Address) ReadFrom(r io.Reader) error { method WriteTo (line 193) | func (a *Address) WriteTo(w io.Writer) error { function NewAddressFromAddr (line 104) | func NewAddressFromAddr(network string, addr string) (*Address, error) { function NewAddressFromHostPort (line 114) | func NewAddressFromHostPort(network string, host string, port int) *Addr... FILE: tunnel/mux/client.go type muxID (line 18) | type muxID function generateMuxID (line 20) | func generateMuxID() muxID { type smuxClientInfo (line 24) | type smuxClientInfo struct type Client (line 32) | type Client struct method Close (line 42) | func (c *Client) Close() error { method cleanLoop (line 53) | func (c *Client) cleanLoop() { method newMuxClient (line 99) | func (c *Client) newMuxClient() (*smuxClientInfo, error) { method DialConn (line 129) | func (c *Client) DialConn(*tunnel.Address, tunnel.Tunnel) (tunnel.Conn... method DialPacket (line 165) | func (c *Client) DialPacket(tunnel.Tunnel) (tunnel.PacketConn, error) { function NewClient (line 169) | func NewClient(ctx context.Context, underlay tunnel.Client) (*Client, er... FILE: tunnel/mux/config.go type MuxConfig (line 5) | type MuxConfig struct type Config (line 11) | type Config struct function init (line 15) | func init() { FILE: tunnel/mux/conn.go type stickyConn (line 11) | type stickyConn struct method stickToPayload (line 17) | func (c *stickyConn) stickToPayload(p []byte) []byte { method Close (line 41) | func (c *stickyConn) Close() error { method Write (line 49) | func (c *stickyConn) Write(p []byte) (int, error) { function newStickyConn (line 76) | func newStickyConn(conn tunnel.Conn) *stickyConn { type Conn (line 84) | type Conn struct method Read (line 89) | func (c *Conn) Read(p []byte) (int, error) { method Write (line 93) | func (c *Conn) Write(p []byte) (int, error) { method Close (line 97) | func (c *Conn) Close() error { FILE: tunnel/mux/mux_test.go function TestMux (line 14) | func TestMux(t *testing.T) { FILE: tunnel/mux/server.go type Server (line 14) | type Server struct method acceptConnWorker (line 21) | func (s *Server) acceptConnWorker() { method AcceptConn (line 65) | func (s *Server) AcceptConn(tunnel.Tunnel) (tunnel.Conn, error) { method AcceptPacket (line 74) | func (s *Server) AcceptPacket(tunnel.Tunnel) (tunnel.PacketConn, error) { method Close (line 78) | func (s *Server) Close() error { function NewServer (line 83) | func NewServer(ctx context.Context, underlay tunnel.Server) (*Server, er... FILE: tunnel/mux/tunnel.go constant Name (line 9) | Name = "MUX" type Tunnel (line 11) | type Tunnel struct method Name (line 13) | func (*Tunnel) Name() string { method NewClient (line 17) | func (*Tunnel) NewClient(ctx context.Context, client tunnel.Client) (t... method NewServer (line 21) | func (*Tunnel) NewServer(ctx context.Context, server tunnel.Server) (t... function init (line 25) | func init() { FILE: tunnel/router/client.go constant Block (line 23) | Block = 0 constant Bypass (line 24) | Bypass = 1 constant Proxy (line 25) | Proxy = 2 constant AsIs (line 29) | AsIs = 0 constant IPIfNonMatch (line 30) | IPIfNonMatch = 1 constant IPOnDemand (line 31) | IPOnDemand = 2 constant MaxPacketSize (line 34) | MaxPacketSize = 1024 * 8 function matchDomain (line 36) | func matchDomain(list []*v2router.Domain, target string) bool { function matchIP (line 77) | func matchIP(list []*v2router.CIDR, target net.IP) bool { function newIPAddress (line 105) | func newIPAddress(address *tunnel.Address) (*tunnel.Address, error) { type Client (line 122) | type Client struct method Route (line 133) | func (c *Client) Route(address *tunnel.Address) int { method DialConn (line 170) | func (c *Client) DialConn(address *tunnel.Address, overlay tunnel.Tunn... method DialPacket (line 189) | func (c *Client) DialPacket(overlay tunnel.Tunnel) (tunnel.PacketConn,... method Close (line 211) | func (c *Client) Close() error { type codeInfo (line 216) | type codeInfo struct function loadCode (line 221) | func loadCode(cfg *Config, prefix string) []codeInfo { function NewClient (line 262) | func NewClient(ctx context.Context, underlay tunnel.Client) (*Client, er... FILE: tunnel/router/config.go type Config (line 8) | type Config struct type RouterConfig (line 12) | type RouterConfig struct function init (line 23) | func init() { FILE: tunnel/router/conn.go type packetInfo (line 13) | type packetInfo struct type PacketConn (line 18) | type PacketConn struct method packetLoop (line 27) | func (c *PacketConn) packetLoop() { method Close (line 69) | func (c *PacketConn) Close() error { method ReadFrom (line 75) | func (c *PacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err err... method WriteTo (line 79) | func (c *PacketConn) WriteTo(p []byte, addr net.Addr) (n int, err erro... method WriteWithMetadata (line 83) | func (c *PacketConn) WriteWithMetadata(p []byte, m *tunnel.Metadata) (... method ReadWithMetadata (line 104) | func (c *PacketConn) ReadWithMetadata(p []byte) (int, *tunnel.Metadata... FILE: tunnel/router/router_test.go type MockClient (line 17) | type MockClient struct method DialConn (line 19) | func (m *MockClient) DialConn(address *tunnel.Address, t tunnel.Tunnel... method DialPacket (line 23) | func (m *MockClient) DialPacket(t tunnel.Tunnel) (tunnel.PacketConn, e... method Close (line 27) | func (m MockClient) Close() error { type MockPacketConn (line 31) | type MockPacketConn struct method ReadFrom (line 33) | func (m MockPacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err ... method WriteTo (line 37) | func (m MockPacketConn) WriteTo(p []byte, addr net.Addr) (n int, err e... method Close (line 41) | func (m MockPacketConn) Close() error { method LocalAddr (line 45) | func (m MockPacketConn) LocalAddr() net.Addr { method SetDeadline (line 49) | func (m MockPacketConn) SetDeadline(t time.Time) error { method SetReadDeadline (line 53) | func (m MockPacketConn) SetReadDeadline(t time.Time) error { method SetWriteDeadline (line 57) | func (m MockPacketConn) SetWriteDeadline(t time.Time) error { method WriteWithMetadata (line 61) | func (m MockPacketConn) WriteWithMetadata(bytes []byte, metadata *tunn... method ReadWithMetadata (line 65) | func (m MockPacketConn) ReadWithMetadata(bytes []byte) (int, *tunnel.M... function TestRouter (line 69) | func TestRouter(t *testing.T) { FILE: tunnel/router/tunnel.go constant Name (line 9) | Name = "ROUTER" type Tunnel (line 11) | type Tunnel struct method Name (line 13) | func (t *Tunnel) Name() string { method NewClient (line 17) | func (t *Tunnel) NewClient(ctx context.Context, client tunnel.Client) ... method NewServer (line 21) | func (t *Tunnel) NewServer(ctx context.Context, server tunnel.Server) ... function init (line 25) | func init() { FILE: tunnel/shadowsocks/client.go type Client (line 14) | type Client struct method DialConn (line 19) | func (c *Client) DialConn(address *tunnel.Address, tunnel tunnel.Tunne... method DialPacket (line 30) | func (c *Client) DialPacket(tunnel tunnel.Tunnel) (tunnel.PacketConn, ... method Close (line 34) | func (c *Client) Close() error { function NewClient (line 38) | func NewClient(ctx context.Context, underlay tunnel.Client) (*Client, er... FILE: tunnel/shadowsocks/config.go type ShadowsocksConfig (line 5) | type ShadowsocksConfig struct type Config (line 11) | type Config struct function init (line 17) | func init() { FILE: tunnel/shadowsocks/conn.go type Conn (line 9) | type Conn struct method Read (line 14) | func (c *Conn) Read(p []byte) (n int, err error) { method Write (line 18) | func (c *Conn) Write(p []byte) (n int, err error) { method Close (line 22) | func (c *Conn) Close() error { method Metadata (line 27) | func (c *Conn) Metadata() *tunnel.Metadata { FILE: tunnel/shadowsocks/server.go type Server (line 16) | type Server struct method AcceptConn (line 23) | func (s *Server) AcceptConn(overlay tunnel.Tunnel) (tunnel.Conn, error) { method AcceptPacket (line 55) | func (s *Server) AcceptPacket(t tunnel.Tunnel) (tunnel.PacketConn, err... method Close (line 59) | func (s *Server) Close() error { function NewServer (line 63) | func NewServer(ctx context.Context, underlay tunnel.Server) (*Server, er... FILE: tunnel/shadowsocks/shadowsocks_test.go function TestShadowsocks (line 19) | func TestShadowsocks(t *testing.T) { FILE: tunnel/shadowsocks/tunnel.go constant Name (line 9) | Name = "SHADOWSOCKS" type Tunnel (line 11) | type Tunnel struct method Name (line 13) | func (t *Tunnel) Name() string { method NewClient (line 17) | func (t *Tunnel) NewClient(ctx context.Context, client tunnel.Client) ... method NewServer (line 21) | func (t *Tunnel) NewServer(ctx context.Context, server tunnel.Server) ... function init (line 25) | func init() { FILE: tunnel/simplesocks/client.go constant Connect (line 13) | Connect tunnel.Command = 1 constant Associate (line 14) | Associate tunnel.Command = 3 type Client (line 17) | type Client struct method DialConn (line 21) | func (c *Client) DialConn(addr *tunnel.Address, t tunnel.Tunnel) (tunn... method DialPacket (line 36) | func (c *Client) DialPacket(t tunnel.Tunnel) (tunnel.PacketConn, error) { method Close (line 58) | func (c *Client) Close() error { function NewClient (line 62) | func NewClient(ctx context.Context, underlay tunnel.Client) (*Client, er... FILE: tunnel/simplesocks/conn.go type Conn (line 12) | type Conn struct method Metadata (line 19) | func (c *Conn) Metadata() *tunnel.Metadata { method Write (line 23) | func (c *Conn) Write(payload []byte) (int, error) { type PacketConn (line 40) | type PacketConn struct FILE: tunnel/simplesocks/server.go type Server (line 14) | type Server struct method Close (line 22) | func (s *Server) Close() error { method acceptLoop (line 27) | func (s *Server) acceptLoop() { method AcceptConn (line 64) | func (s *Server) AcceptConn(tunnel.Tunnel) (tunnel.Conn, error) { method AcceptPacket (line 73) | func (s *Server) AcceptPacket(tunnel.Tunnel) (tunnel.PacketConn, error) { function NewServer (line 82) | func NewServer(ctx context.Context, underlay tunnel.Server) (*Server, er... FILE: tunnel/simplesocks/simplesocks_test.go function TestSimpleSocks (line 16) | func TestSimpleSocks(t *testing.T) { FILE: tunnel/simplesocks/tunnel.go constant Name (line 9) | Name = "SIMPLESOCKS" type Tunnel (line 11) | type Tunnel struct method Name (line 13) | func (*Tunnel) Name() string { method NewServer (line 17) | func (*Tunnel) NewServer(ctx context.Context, underlay tunnel.Server) ... method NewClient (line 21) | func (*Tunnel) NewClient(ctx context.Context, underlay tunnel.Client) ... function init (line 25) | func init() { FILE: tunnel/socks/config.go type Config (line 5) | type Config struct function init (line 11) | func init() { FILE: tunnel/socks/conn.go type Conn (line 11) | type Conn struct method Metadata (line 16) | func (c *Conn) Metadata() *tunnel.Metadata { type packetInfo (line 20) | type packetInfo struct type PacketConn (line 25) | type PacketConn struct method ReadFrom (line 34) | func (c *PacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err err... method WriteTo (line 38) | func (c *PacketConn) WriteTo(p []byte, addr net.Addr) (n int, err erro... method Close (line 42) | func (c *PacketConn) Close() error { method WriteWithMetadata (line 47) | func (c *PacketConn) WriteWithMetadata(p []byte, m *tunnel.Metadata) (... method ReadWithMetadata (line 59) | func (c *PacketConn) ReadWithMetadata(p []byte) (int, *tunnel.Metadata... FILE: tunnel/socks/server.go constant Connect (line 20) | Connect tunnel.Command = 1 constant Associate (line 21) | Associate tunnel.Command = 3 constant MaxPacketSize (line 25) | MaxPacketSize = 1024 * 8 type Server (line 28) | type Server struct method AcceptConn (line 42) | func (s *Server) AcceptConn(tunnel.Tunnel) (tunnel.Conn, error) { method AcceptPacket (line 51) | func (s *Server) AcceptPacket(tunnel.Tunnel) (tunnel.PacketConn, error) { method Close (line 60) | func (s *Server) Close() error { method handshake (line 65) | func (s *Server) handshake(conn net.Conn) (*Conn, error) { method connect (line 103) | func (s *Server) connect(conn net.Conn) error { method associate (line 108) | func (s *Server) associate(conn net.Conn, addr *tunnel.Address) error { method packetDispatchLoop (line 115) | func (s *Server) packetDispatchLoop() { method acceptLoop (line 198) | func (s *Server) acceptLoop() { function NewServer (line 240) | func NewServer(ctx context.Context, underlay tunnel.Server) (tunnel.Serv... FILE: tunnel/socks/socks_test.go function TestSocks (line 24) | func TestSocks(t *testing.T) { FILE: tunnel/socks/tunnel.go constant Name (line 9) | Name = "SOCKS" type Tunnel (line 11) | type Tunnel struct method Name (line 13) | func (*Tunnel) Name() string { method NewClient (line 17) | func (*Tunnel) NewClient(context.Context, tunnel.Client) (tunnel.Clien... method NewServer (line 21) | func (*Tunnel) NewServer(ctx context.Context, server tunnel.Server) (t... function init (line 25) | func init() { FILE: tunnel/tls/client.go type Client (line 23) | type Client struct method Close (line 36) | func (c *Client) Close() error { method DialPacket (line 43) | func (c *Client) DialPacket(tunnel.Tunnel) (tunnel.PacketConn, error) { method DialConn (line 47) | func (c *Client) DialConn(_ *tunnel.Address, overlay tunnel.Tunnel) (t... function NewClient (line 87) | func NewClient(ctx context.Context, underlay tunnel.Client) (*Client, er... FILE: tunnel/tls/config.go type Config (line 7) | type Config struct type WebsocketConfig (line 14) | type WebsocketConfig struct type TLSConfig (line 18) | type TLSConfig struct function init (line 38) | func init() { FILE: tunnel/tls/fingerprint/tls.go function ParseCipher (line 9) | func ParseCipher(s []string) []uint16 { FILE: tunnel/tls/server.go type Server (line 31) | type Server struct method Close (line 54) | func (s *Server) Close() error { method acceptLoop (line 71) | func (s *Server) acceptLoop() { method AcceptConn (line 181) | func (s *Server) AcceptConn(overlay tunnel.Tunnel) (tunnel.Conn, error) { method AcceptPacket (line 202) | func (s *Server) AcceptPacket(tunnel.Tunnel) (tunnel.PacketConn, error) { method checkKeyPairLoop (line 206) | func (s *Server) checkKeyPairLoop(checkRate time.Duration, keyPath str... function isDomainNameMatched (line 62) | func isDomainNameMatched(pattern string, domainName string) bool { function loadKeyPair (line 247) | func loadKeyPair(keyPath string, certPath string, password string) (*tls... function NewServer (line 291) | func NewServer(ctx context.Context, underlay tunnel.Server) (*Server, er... FILE: tunnel/tls/tls_test.go function TestDefaultTLSRSA2048 (line 95) | func TestDefaultTLSRSA2048(t *testing.T) { function TestDefaultTLSECC (line 157) | func TestDefaultTLSECC(t *testing.T) { function TestUTLSRSA2048 (line 219) | func TestUTLSRSA2048(t *testing.T) { function TestUTLSECC (line 289) | func TestUTLSECC(t *testing.T) { function TestMatch (line 359) | func TestMatch(t *testing.T) { FILE: tunnel/tls/tunnel.go constant Name (line 9) | Name = "TLS" type Tunnel (line 11) | type Tunnel struct method Name (line 13) | func (t *Tunnel) Name() string { method NewClient (line 17) | func (t *Tunnel) NewClient(ctx context.Context, client tunnel.Client) ... method NewServer (line 21) | func (t *Tunnel) NewServer(ctx context.Context, server tunnel.Server) ... function init (line 25) | func init() { FILE: tunnel/tproxy/config.go type Config (line 8) | type Config struct function init (line 14) | func init() { FILE: tunnel/tproxy/conn.go type Conn (line 14) | type Conn struct method Metadata (line 19) | func (c *Conn) Metadata() *tunnel.Metadata { type packetInfo (line 23) | type packetInfo struct type PacketConn (line 28) | type PacketConn struct method ReadFrom (line 37) | func (c *PacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err err... method WriteTo (line 41) | func (c *PacketConn) WriteTo(p []byte, addr net.Addr) (n int, err erro... method Close (line 45) | func (c *PacketConn) Close() error { method WriteWithMetadata (line 50) | func (c *PacketConn) WriteWithMetadata(p []byte, m *tunnel.Metadata) (... method ReadWithMetadata (line 62) | func (c *PacketConn) ReadWithMetadata(p []byte) (int, *tunnel.Metadata... FILE: tunnel/tproxy/getsockopt.go function getsockopt (line 11) | func getsockopt(fd int, level int, optname int, optval unsafe.Pointer, o... FILE: tunnel/tproxy/getsockopt_i386.go constant GETSOCKOPT (line 11) | GETSOCKOPT = 15 function getsockopt (line 13) | func getsockopt(fd int, level int, optname int, optval unsafe.Pointer, o... FILE: tunnel/tproxy/server.go constant MaxPacketSize (line 19) | MaxPacketSize = 1024 * 8 type Server (line 21) | type Server struct method Close (line 32) | func (s *Server) Close() error { method AcceptConn (line 38) | func (s *Server) AcceptConn(tunnel.Tunnel) (tunnel.Conn, error) { method packetDispatchLoop (line 63) | func (s *Server) packetDispatchLoop() { method AcceptPacket (line 185) | func (s *Server) AcceptPacket(tunnel.Tunnel) (tunnel.PacketConn, error) { function NewServer (line 195) | func NewServer(ctx context.Context, _ tunnel.Server) (*Server, error) { FILE: tunnel/tproxy/tcp.go type Listener (line 17) | type Listener struct method Accept (line 26) | func (listener *Listener) Accept() (net.Conn, error) { method Addr (line 38) | func (listener *Listener) Addr() net.Addr { method Close (line 45) | func (listener *Listener) Close() error { function ListenTCP (line 52) | func ListenTCP(network string, laddr *net.TCPAddr) (net.Listener, error) { constant IP6T_SO_ORIGINAL_DST (line 72) | IP6T_SO_ORIGINAL_DST = 80 constant SO_ORIGINAL_DST (line 73) | SO_ORIGINAL_DST = 80 function getOriginalTCPDest (line 83) | func getOriginalTCPDest(conn *net.TCPConn) (*net.TCPAddr, error) { FILE: tunnel/tproxy/tunnel.go constant Name (line 12) | Name = "TPROXY" type Tunnel (line 14) | type Tunnel struct method Name (line 16) | func (t *Tunnel) Name() string { method NewClient (line 20) | func (t *Tunnel) NewClient(ctx context.Context, client tunnel.Client) ... method NewServer (line 24) | func (t *Tunnel) NewServer(ctx context.Context, server tunnel.Server) ... function init (line 28) | func init() { FILE: tunnel/tproxy/udp.go function ListenUDP (line 20) | func ListenUDP(network string, laddr *net.UDPAddr) (*net.UDPConn, error) { function ReadFromUDP (line 50) | func ReadFromUDP(conn *net.UDPConn, b []byte) (int, *net.UDPAddr, *net.U... function DialUDP (line 104) | func DialUDP(network string, laddr *net.UDPAddr, raddr *net.UDPAddr) (*n... function udpAddrToSocketAddr (line 155) | func udpAddrToSocketAddr(addr *net.UDPAddr) (syscall.Sockaddr, error) { function udpAddrFamily (line 179) | func udpAddrFamily(net string, laddr, raddr *net.UDPAddr) int { FILE: tunnel/transport/client.go type Client (line 17) | type Client struct method Close (line 25) | func (c *Client) Close() error { method DialPacket (line 33) | func (c *Client) DialPacket(tunnel.Tunnel) (tunnel.PacketConn, error) { method DialConn (line 38) | func (c *Client) DialConn(*tunnel.Address, tunnel.Tunnel) (tunnel.Conn... function NewClient (line 49) | func NewClient(ctx context.Context, _ tunnel.Client) (*Client, error) { FILE: tunnel/transport/config.go type Config (line 7) | type Config struct type TransportPluginConfig (line 15) | type TransportPluginConfig struct function init (line 24) | func init() { FILE: tunnel/transport/conn.go type Conn (line 9) | type Conn struct method Metadata (line 13) | func (c *Conn) Metadata() *tunnel.Metadata { FILE: tunnel/transport/server.go type Server (line 21) | type Server struct method Close (line 32) | func (s *Server) Close() error { method acceptLoop (line 40) | func (s *Server) acceptLoop() { method AcceptConn (line 89) | func (s *Server) AcceptConn(overlay tunnel.Tunnel) (tunnel.Conn, error) { method AcceptPacket (line 110) | func (s *Server) AcceptPacket(tunnel.Tunnel) (tunnel.PacketConn, error) { function NewServer (line 115) | func NewServer(ctx context.Context, _ tunnel.Server) (*Server, error) { FILE: tunnel/transport/transport_test.go function TestTransport (line 15) | func TestTransport(t *testing.T) { function TestClientPlugin (line 60) | func TestClientPlugin(t *testing.T) { function TestServerPlugin (line 83) | func TestServerPlugin(t *testing.T) { FILE: tunnel/transport/tunnel.go constant Name (line 9) | Name = "TRANSPORT" type Tunnel (line 11) | type Tunnel struct method Name (line 13) | func (*Tunnel) Name() string { method NewClient (line 17) | func (*Tunnel) NewClient(ctx context.Context, client tunnel.Client) (t... method NewServer (line 21) | func (*Tunnel) NewServer(ctx context.Context, server tunnel.Server) (t... function init (line 25) | func init() { FILE: tunnel/trojan/client.go constant MaxPacketSize (line 22) | MaxPacketSize = 1024 * 8 constant Connect (line 26) | Connect tunnel.Command = 1 constant Associate (line 27) | Associate tunnel.Command = 3 constant Mux (line 28) | Mux tunnel.Command = 0x7f type OutboundConn (line 31) | type OutboundConn struct method Metadata (line 46) | func (c *OutboundConn) Metadata() *tunnel.Metadata { method WriteHeader (line 50) | func (c *OutboundConn) WriteHeader(payload []byte) (bool, error) { method Write (line 72) | func (c *OutboundConn) Write(p []byte) (int, error) { method Read (line 86) | func (c *OutboundConn) Read(p []byte) (int, error) { method Close (line 93) | func (c *OutboundConn) Close() error { type Client (line 98) | type Client struct method Close (line 105) | func (c *Client) Close() error { method DialConn (line 110) | func (c *Client) DialConn(addr *tunnel.Address, overlay tunnel.Tunnel)... method DialPacket (line 136) | func (c *Client) DialPacket(tunnel.Tunnel) (tunnel.PacketConn, error) { function NewClient (line 157) | func NewClient(ctx context.Context, client tunnel.Client) (*Client, erro... FILE: tunnel/trojan/config.go type Config (line 5) | type Config struct type MySQLConfig (line 15) | type MySQLConfig struct type APIConfig (line 19) | type APIConfig struct function init (line 23) | func init() { FILE: tunnel/trojan/packet.go type PacketConn (line 15) | type PacketConn struct method ReadFrom (line 19) | func (c *PacketConn) ReadFrom(payload []byte) (int, net.Addr, error) { method WriteTo (line 23) | func (c *PacketConn) WriteTo(payload []byte, addr net.Addr) (int, erro... method WriteWithMetadata (line 34) | func (c *PacketConn) WriteWithMetadata(payload []byte, metadata *tunne... method ReadWithMetadata (line 54) | func (c *PacketConn) ReadWithMetadata(payload []byte) (int, *tunnel.Me... FILE: tunnel/trojan/server.go type InboundConn (line 23) | type InboundConn struct method Metadata (line 40) | func (c *InboundConn) Metadata() *tunnel.Metadata { method Write (line 44) | func (c *InboundConn) Write(p []byte) (int, error) { method Read (line 51) | func (c *InboundConn) Read(p []byte) (int, error) { method Close (line 58) | func (c *InboundConn) Close() error { method Auth (line 65) | func (c *InboundConn) Auth() error { type Server (line 109) | type Server struct method Close (line 121) | func (s *Server) Close() error { method acceptLoop (line 126) | func (s *Server) acceptLoop() { method AcceptConn (line 185) | func (s *Server) AcceptConn(nextTunnel tunnel.Tunnel) (tunnel.Conn, er... method AcceptPacket (line 204) | func (s *Server) AcceptPacket(tunnel.Tunnel) (tunnel.PacketConn, error) { function NewServer (line 213) | func NewServer(ctx context.Context, underlay tunnel.Server) (*Server, er... FILE: tunnel/trojan/trojan_test.go function TestTrojan (line 20) | func TestTrojan(t *testing.T) { FILE: tunnel/trojan/tunnel.go constant Name (line 9) | Name = "TROJAN" type Tunnel (line 11) | type Tunnel struct method Name (line 13) | func (c *Tunnel) Name() string { method NewClient (line 17) | func (c *Tunnel) NewClient(ctx context.Context, client tunnel.Client) ... method NewServer (line 21) | func (c *Tunnel) NewServer(ctx context.Context, server tunnel.Server) ... function init (line 25) | func init() { FILE: tunnel/tunnel.go type Conn (line 12) | type Conn interface type PacketConn (line 18) | type PacketConn interface type ConnDialer (line 25) | type ConnDialer interface type PacketDialer (line 30) | type PacketDialer interface type ConnListener (line 35) | type ConnListener interface type PacketListener (line 41) | type PacketListener interface type Dialer (line 46) | type Dialer interface type Listener (line 52) | type Listener interface type Client (line 58) | type Client interface type Server (line 64) | type Server interface type Tunnel (line 71) | type Tunnel interface function RegisterTunnel (line 80) | func RegisterTunnel(name string, tunnel Tunnel) { function GetTunnel (line 84) | func GetTunnel(name string) (Tunnel, error) { FILE: tunnel/websocket/client.go type Client (line 15) | type Client struct method DialConn (line 21) | func (c *Client) DialConn(*tunnel.Address, tunnel.Tunnel) (tunnel.Conn... method DialPacket (line 42) | func (c *Client) DialPacket(tunnel.Tunnel) (tunnel.PacketConn, error) { method Close (line 46) | func (c *Client) Close() error { function NewClient (line 50) | func NewClient(ctx context.Context, underlay tunnel.Client) (*Client, er... FILE: tunnel/websocket/config.go type WebsocketConfig (line 5) | type WebsocketConfig struct type Config (line 11) | type Config struct function init (line 17) | func init() { FILE: tunnel/websocket/conn.go type OutboundConn (line 12) | type OutboundConn struct method Metadata (line 17) | func (c *OutboundConn) Metadata() *tunnel.Metadata { method RemoteAddr (line 21) | func (c *OutboundConn) RemoteAddr() net.Addr { type InboundConn (line 26) | type InboundConn struct method Close (line 32) | func (c *InboundConn) Close() error { FILE: tunnel/websocket/server.go type fakeHTTPResponseWriter (line 23) | type fakeHTTPResponseWriter struct method Hijack (line 31) | func (w *fakeHTTPResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter... type Server (line 35) | type Server struct method Close (line 47) | func (s *Server) Close() error { method AcceptConn (line 52) | func (s *Server) AcceptConn(tunnel.Tunnel) (tunnel.Conn, error) { method AcceptPacket (line 146) | func (s *Server) AcceptPacket(tunnel.Tunnel) (tunnel.PacketConn, error) { function NewServer (line 150) | func NewServer(ctx context.Context, underlay tunnel.Server) (*Server, er... FILE: tunnel/websocket/tunnel.go constant Name (line 9) | Name = "WEBSOCKET" type Tunnel (line 11) | type Tunnel struct method Name (line 13) | func (*Tunnel) Name() string { method NewServer (line 17) | func (*Tunnel) NewServer(ctx context.Context, underlay tunnel.Server) ... method NewClient (line 21) | func (*Tunnel) NewClient(ctx context.Context, underlay tunnel.Client) ... function init (line 25) | func init() { FILE: tunnel/websocket/websocket_test.go function TestWebsocket (line 22) | func TestWebsocket(t *testing.T) { function TestRedirect (line 80) | func TestRedirect(t *testing.T) { FILE: url/option.go constant Name (line 16) | Name = "URL" type Websocket (line 18) | type Websocket struct type TLS (line 24) | type TLS struct type Shadowsocks (line 28) | type Shadowsocks struct type Mux (line 34) | type Mux struct type API (line 38) | type API struct type UrlConfig (line 44) | type UrlConfig struct type url (line 58) | type url struct method Name (line 63) | func (u *url) Name() string { method Handle (line 67) | func (u *url) Handle() error { method Priority (line 183) | func (u *url) Priority() int { function init (line 187) | func init() { FILE: url/option_test.go function TestUrl_Handle (line 10) | func TestUrl_Handle(t *testing.T) { FILE: url/share_link.go constant ShareInfoTypeOriginal (line 12) | ShareInfoTypeOriginal = "original" constant ShareInfoTypeWebSocket (line 13) | ShareInfoTypeWebSocket = "ws" type ShareInfo (line 32) | type ShareInfo struct function NewShareInfoFromURL (line 48) | func NewShareInfoFromURL(shareLink string) (info ShareInfo, e error) { function handleTrojanPort (line 203) | func handleTrojanPort(p string) (port uint16, e error) { FILE: url/share_link_test.go function TestHandleTrojanPort_Default (line 13) | func TestHandleTrojanPort_Default(t *testing.T) { function TestHandleTrojanPort_NotNumber (line 19) | func TestHandleTrojanPort_NotNumber(t *testing.T) { function TestHandleTrojanPort_GoodNumber (line 24) | func TestHandleTrojanPort_GoodNumber(t *testing.T) { function TestHandleTrojanPort_InvalidNumber (line 32) | func TestHandleTrojanPort_InvalidNumber(t *testing.T) { function TestNewShareInfoFromURL_Empty (line 41) | func TestNewShareInfoFromURL_Empty(t *testing.T) { function TestNewShareInfoFromURL_RandomCrap (line 46) | func TestNewShareInfoFromURL_RandomCrap(t *testing.T) { function TestNewShareInfoFromURL_NotTrojanGo (line 54) | func TestNewShareInfoFromURL_NotTrojanGo(t *testing.T) { function TestNewShareInfoFromURL_EmptyTrojanHost (line 67) | func TestNewShareInfoFromURL_EmptyTrojanHost(t *testing.T) { function TestNewShareInfoFromURL_BadPassword (line 72) | func TestNewShareInfoFromURL_BadPassword(t *testing.T) { function TestNewShareInfoFromURL_GoodPassword (line 87) | func TestNewShareInfoFromURL_GoodPassword(t *testing.T) { function TestNewShareInfoFromURL_BadPort (line 100) | func TestNewShareInfoFromURL_BadPort(t *testing.T) { function TestNewShareInfoFromURL_BadQuery (line 115) | func TestNewShareInfoFromURL_BadQuery(t *testing.T) { function TestNewShareInfoFromURL_SNI_Empty (line 127) | func TestNewShareInfoFromURL_SNI_Empty(t *testing.T) { function TestNewShareInfoFromURL_SNI_Default (line 132) | func TestNewShareInfoFromURL_SNI_Default(t *testing.T) { function TestNewShareInfoFromURL_SNI_Multiple (line 138) | func TestNewShareInfoFromURL_SNI_Multiple(t *testing.T) { function TestNewShareInfoFromURL_Type_Empty (line 143) | func TestNewShareInfoFromURL_Type_Empty(t *testing.T) { function TestNewShareInfoFromURL_Type_Default (line 148) | func TestNewShareInfoFromURL_Type_Default(t *testing.T) { function TestNewShareInfoFromURL_Type_Invalid (line 154) | func TestNewShareInfoFromURL_Type_Invalid(t *testing.T) { function TestNewShareInfoFromURL_Type_Multiple (line 162) | func TestNewShareInfoFromURL_Type_Multiple(t *testing.T) { function TestNewShareInfoFromURL_Host_Empty (line 167) | func TestNewShareInfoFromURL_Host_Empty(t *testing.T) { function TestNewShareInfoFromURL_Host_Default (line 172) | func TestNewShareInfoFromURL_Host_Default(t *testing.T) { function TestNewShareInfoFromURL_Host_Multiple (line 178) | func TestNewShareInfoFromURL_Host_Multiple(t *testing.T) { function TestNewShareInfoFromURL_Type_WS_Multiple (line 183) | func TestNewShareInfoFromURL_Type_WS_Multiple(t *testing.T) { function TestNewShareInfoFromURL_Path_WS_None (line 188) | func TestNewShareInfoFromURL_Path_WS_None(t *testing.T) { function TestNewShareInfoFromURL_Path_WS_Empty (line 193) | func TestNewShareInfoFromURL_Path_WS_Empty(t *testing.T) { function TestNewShareInfoFromURL_Path_WS_Invalid (line 198) | func TestNewShareInfoFromURL_Path_WS_Invalid(t *testing.T) { function TestNewShareInfoFromURL_Path_Plain_Empty (line 206) | func TestNewShareInfoFromURL_Path_Plain_Empty(t *testing.T) { function TestNewShareInfoFromURL_Encryption_Empty (line 211) | func TestNewShareInfoFromURL_Encryption_Empty(t *testing.T) { function TestNewShareInfoFromURL_Encryption_Unknown (line 216) | func TestNewShareInfoFromURL_Encryption_Unknown(t *testing.T) { function TestNewShareInfoFromURL_Encryption_None (line 221) | func TestNewShareInfoFromURL_Encryption_None(t *testing.T) { function TestNewShareInfoFromURL_Encryption_SS_NotSupportedMethods (line 226) | func TestNewShareInfoFromURL_Encryption_SS_NotSupportedMethods(t *testin... function TestNewShareInfoFromURL_Encryption_SS_NoPassword (line 234) | func TestNewShareInfoFromURL_Encryption_SS_NoPassword(t *testing.T) { function TestNewShareInfoFromURL_Encryption_SS_BadParams (line 239) | func TestNewShareInfoFromURL_Encryption_SS_BadParams(t *testing.T) { function TestNewShareInfoFromURL_Encryption_Multiple (line 244) | func TestNewShareInfoFromURL_Encryption_Multiple(t *testing.T) { function TestNewShareInfoFromURL_Plugin_Empty (line 249) | func TestNewShareInfoFromURL_Plugin_Empty(t *testing.T) { function TestNewShareInfoFromURL_Plugin_Multiple (line 254) | func TestNewShareInfoFromURL_Plugin_Multiple(t *testing.T) { FILE: version/version.go type versionOption (line 13) | type versionOption struct method Name (line 17) | func (*versionOption) Name() string { method Priority (line 21) | func (*versionOption) Priority() int { method Handle (line 25) | func (c *versionOption) Handle() error { function init (line 41) | func init() {