diff --git a/Makefile b/Makefile index eeac076..417f83f 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ doc: checklist find lib cmd -type d -exec $(HERE)/doc.sh {} \; checklist: - find . -name '*.go' -exec grep --color -C 1 -Hn 'panic("unimplemented")' {} \; 2> /dev/null 1> CHECKLIST.md + find . -name '*.go' -exec grep --color -C 1 -Hn 'panic("unimplemented")' {} \; 2> /dev/null 1> UNIMPLEMENTED.md mobile: go install golang.org/x/mobile/cmd/gomobile@latest diff --git a/UNIMPLEMENTED.md b/UNIMPLEMENTED.md index 79af14c..728f2d6 100644 --- a/UNIMPLEMENTED.md +++ b/UNIMPLEMENTED.md @@ -1,35 +1,14 @@ -./lib/http/client/httpclient.go-82-func (h *HTTPClient) Start() error { -./lib/http/client/httpclient.go:83: panic("unimplemented") -./lib/http/client/httpclient.go-84-} +./lib/http/client/httpclient.go-87-func (h *HTTPClient) Start() error { +./lib/http/client/httpclient.go:88: panic("unimplemented") +./lib/http/client/httpclient.go-89-} -- -./lib/http/client/httpclient.go-92-func (h *HTTPClient) Stop() error { -./lib/http/client/httpclient.go:93: panic("unimplemented") -./lib/http/client/httpclient.go-94-} -./lib/http/server/httpserver.go-88-func (h *HTTPServer) Start() error { -./lib/http/server/httpserver.go:89: panic("unimplemented") -./lib/http/server/httpserver.go-90-} +./lib/http/client/httpclient.go-97-func (h *HTTPClient) Stop() error { +./lib/http/client/httpclient.go:98: panic("unimplemented") +./lib/http/client/httpclient.go-99-} +./lib/irc/client/client.go-80-func (i *IRCClient) Start() error { +./lib/irc/client/client.go:81: panic("unimplemented") +./lib/irc/client/client.go-82-} -- -./lib/http/server/httpserver.go-98-func (h *HTTPServer) Stop() error { -./lib/http/server/httpserver.go:99: panic("unimplemented") -./lib/http/server/httpserver.go-100-} -./lib/irc/client/client.go-75-func (i *IRCClient) Start() error { -./lib/irc/client/client.go:76: panic("unimplemented") -./lib/irc/client/client.go-77-} --- -./lib/irc/client/client.go-85-func (i *IRCClient) Stop() error { -./lib/irc/client/client.go:86: panic("unimplemented") -./lib/irc/client/client.go-87-} -./lib/irc/server/server.go-78-func (i *IRCServer) Start() error { -./lib/irc/server/server.go:79: panic("unimplemented") -./lib/irc/server/server.go-80-} --- -./lib/irc/server/server.go-88-func (i *IRCServer) Stop() error { -./lib/irc/server/server.go:89: panic("unimplemented") -./lib/irc/server/server.go-90-} -./lib/socks/client/socks.go-99-func (s *SOCKS) Start() error { -./lib/socks/client/socks.go:100: panic("unimplemented") -./lib/socks/client/socks.go-101-} --- -./lib/socks/client/socks.go-109-func (s *SOCKS) Stop() error { -./lib/socks/client/socks.go:110: panic("unimplemented") -./lib/socks/client/socks.go-111-} +./lib/irc/client/client.go-90-func (i *IRCClient) Stop() error { +./lib/irc/client/client.go:91: panic("unimplemented") +./lib/irc/client/client.go-92-} diff --git a/lib/core/doc.md b/lib/core/doc.md index bce0751..c9e4d21 100644 --- a/lib/core/doc.md +++ b/lib/core/doc.md @@ -23,12 +23,14 @@ type I2PTunnel interface { Target() string // Get the tunnel's options Options() map[string]string + // Set the tunnel's options + SetOptions(map[string]string) error // Get the tunnel's status Status() I2PTunnelStatus // Get the tunnel's error message Error() error // Get the tunnel's local host:port - LocalAddress() (string, string, error) + LocalAddress() (string, error) } ``` diff --git a/lib/http/client/doc.md b/lib/http/client/doc.md index 038ca54..e63cb69 100644 --- a/lib/http/client/doc.md +++ b/lib/http/client/doc.md @@ -15,6 +15,8 @@ type HTTPClient struct { i2pconv.TunnelConfig // The tunnel status i2ptunnel.I2PTunnelStatus + // The http filtering configuration + httpinspector.Config // Error history of the tunnel Errors []i2ptunnel.I2PTunnelError @@ -46,7 +48,7 @@ Get the tunnel's error message #### func (*HTTPClient) LocalAddress ```go -func (h *HTTPClient) LocalAddress() (string, string, error) +func (h *HTTPClient) LocalAddress() (string, error) ``` Get the tunnel's local host:port diff --git a/lib/http/server/doc.md b/lib/http/server/doc.md index cf7f10c..f5a3467 100644 --- a/lib/http/server/doc.md +++ b/lib/http/server/doc.md @@ -19,6 +19,8 @@ type HTTPServer struct { i2ptunnel.I2PTunnelStatus // The rate-limiting configuration limitedlistener.LimitedConfig + // The http filtering configuration + httpinspector.Config // Error history of the tunnel Errors []i2ptunnel.I2PTunnelError @@ -50,7 +52,7 @@ Get the tunnel's error message #### func (*HTTPServer) LocalAddress ```go -func (h *HTTPServer) LocalAddress() (string, string, error) +func (h *HTTPServer) LocalAddress() (string, error) ``` Get the tunnel's local host:port diff --git a/lib/irc/client/doc.md b/lib/irc/client/doc.md index a626de3..97cc77d 100644 --- a/lib/irc/client/doc.md +++ b/lib/irc/client/doc.md @@ -17,6 +17,8 @@ type IRCClient struct { *i2pkeys.I2PAddr // The tunnel status i2ptunnel.I2PTunnelStatus + // The IRC filtering configuration + ircinspector.Config // Error history of the tunnel Errors []i2ptunnel.I2PTunnelError @@ -48,7 +50,7 @@ Get the tunnel's error message #### func (*IRCClient) LocalAddress ```go -func (i *IRCClient) LocalAddress() (string, string, error) +func (i *IRCClient) LocalAddress() (string, error) ``` Get the tunnel's local host:port diff --git a/lib/irc/server/doc.md b/lib/irc/server/doc.md index 9feb357..9b6264b 100644 --- a/lib/irc/server/doc.md +++ b/lib/irc/server/doc.md @@ -19,6 +19,8 @@ type IRCServer struct { i2ptunnel.I2PTunnelStatus // The rate-limiting configuration limitedlistener.LimitedConfig + // The IRC filtering configuration + ircinspector.Config // Error history of the tunnel Errors []i2ptunnel.I2PTunnelError @@ -50,7 +52,7 @@ Get the tunnel's error message #### func (*IRCServer) LocalAddress ```go -func (i *IRCServer) LocalAddress() (string, string, error) +func (i *IRCServer) LocalAddress() (string, error) ``` Get the tunnel's local host:port diff --git a/lib/socks/client/doc.md b/lib/socks/client/doc.md index 7999c98..7403436 100644 --- a/lib/socks/client/doc.md +++ b/lib/socks/client/doc.md @@ -15,6 +15,8 @@ type SOCKS struct { i2pconv.TunnelConfig // The tunnel status i2ptunnel.I2PTunnelStatus + // SOCKS5 server instance + *socks5.Server // Error history of the tunnel Errors []i2ptunnel.I2PTunnelError @@ -39,7 +41,7 @@ Get the tunnel's error message #### func (*SOCKS) LocalAddress ```go -func (s *SOCKS) LocalAddress() (string, string, error) +func (s *SOCKS) LocalAddress() (string, error) ``` Get the tunnel's local host:port @@ -78,6 +80,13 @@ func (s *SOCKS) Stop() error ``` Stop the tunnel +#### func (*SOCKS) TCPHandle + +```go +func (s *SOCKS) TCPHandle(_ *socks5.Server, conn *net.TCPConn, req *socks5.Request) error +``` +TCPHandle implements socks5.Handler. + #### func (*SOCKS) Target ```go @@ -92,3 +101,10 @@ and HTTP func (s *SOCKS) Type() string ``` Get the tunnel's type + +#### func (*SOCKS) UDPHandle + +```go +func (s *SOCKS) UDPHandle(_ *socks5.Server, addr *net.UDPAddr, data *socks5.Datagram) error +``` +UDPHandle implements socks5.Handler. diff --git a/lib/tcp/client/doc.md b/lib/tcp/client/doc.md index 2cff793..0983ec9 100644 --- a/lib/tcp/client/doc.md +++ b/lib/tcp/client/doc.md @@ -48,7 +48,7 @@ Get the tunnel's error message #### func (*TCPClient) LocalAddress ```go -func (t *TCPClient) LocalAddress() (string, string, error) +func (t *TCPClient) LocalAddress() (string, error) ``` Get the tunnel's local host:port diff --git a/lib/tcp/server/doc.md b/lib/tcp/server/doc.md index 783e370..7af8440 100644 --- a/lib/tcp/server/doc.md +++ b/lib/tcp/server/doc.md @@ -50,7 +50,7 @@ Get the tunnel's error message #### func (*TCPServer) LocalAddress ```go -func (t *TCPServer) LocalAddress() (string, string, error) +func (t *TCPServer) LocalAddress() (string, error) ``` Get the tunnel's local host:port diff --git a/lib/udp/client/doc.md b/lib/udp/client/doc.md index 944ec9b..3c6b9b5 100644 --- a/lib/udp/client/doc.md +++ b/lib/udp/client/doc.md @@ -48,7 +48,7 @@ Get the tunnel's error message #### func (*UDPClient) LocalAddress ```go -func (u *UDPClient) LocalAddress() (string, string, error) +func (u *UDPClient) LocalAddress() (string, error) ``` Get the tunnel's local host:port diff --git a/lib/udp/server/doc.md b/lib/udp/server/doc.md index 883c2b8..17cd253 100644 --- a/lib/udp/server/doc.md +++ b/lib/udp/server/doc.md @@ -48,7 +48,7 @@ Get the tunnel's error message #### func (*UDPServer) LocalAddress ```go -func (u *UDPServer) LocalAddress() (string, string, error) +func (u *UDPServer) LocalAddress() (string, error) ``` Get the tunnel's local host:port