mirror of
https://github.com/go-i2p/go-i2ptunnel.git
synced 2025-12-20 15:15:52 -05:00
add docs
This commit is contained in:
78
lib/core/doc.md
Normal file
78
lib/core/doc.md
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
# i2ptunnel
|
||||||
|
--
|
||||||
|
import "github.com/go-i2p/go-i2ptunnel/lib/core"
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
#### type I2PTunnel
|
||||||
|
|
||||||
|
```go
|
||||||
|
type I2PTunnel interface {
|
||||||
|
// Start the tunnel
|
||||||
|
Start() error
|
||||||
|
// Stop the tunnel
|
||||||
|
Stop() error
|
||||||
|
// Get the tunnel's name
|
||||||
|
Name() string
|
||||||
|
// Get the tunnel's type
|
||||||
|
Type() string
|
||||||
|
// Get the tunnel's I2P address
|
||||||
|
Address() string
|
||||||
|
// Get the tunnel's I2P target. Nil in the case of one-to-many clients like SOCKS5 and HTTP
|
||||||
|
Target() string
|
||||||
|
// Get the tunnel's options
|
||||||
|
Options() map[string]string
|
||||||
|
// 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)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### type I2PTunnelError
|
||||||
|
|
||||||
|
```go
|
||||||
|
type I2PTunnelError struct {
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### func NewError
|
||||||
|
|
||||||
|
```go
|
||||||
|
func NewError(tun I2PTunnel, err error) I2PTunnelError
|
||||||
|
```
|
||||||
|
|
||||||
|
#### func (I2PTunnelError) Error
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i I2PTunnelError) Error() string
|
||||||
|
```
|
||||||
|
|
||||||
|
#### type I2PTunnelStatus
|
||||||
|
|
||||||
|
```go
|
||||||
|
type I2PTunnelStatus string
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
```go
|
||||||
|
const (
|
||||||
|
// Tunnel is running
|
||||||
|
I2PTunnelStatusRunning I2PTunnelStatus = "running"
|
||||||
|
// Tunnel is stopped
|
||||||
|
I2PTunnelStatusStopped I2PTunnelStatus = "stopped"
|
||||||
|
// Tunnel is starting
|
||||||
|
I2PTunnelStatusStarting I2PTunnelStatus = "starting"
|
||||||
|
// Tunnel is stopping
|
||||||
|
I2PTunnelStatusStopping I2PTunnelStatus = "stopping"
|
||||||
|
// Tunnel is failed
|
||||||
|
I2PTunnelStatusFailed I2PTunnelStatus = "failed"
|
||||||
|
// Tunnel is unknown
|
||||||
|
I2PTunnelStatusUnknown I2PTunnelStatus = "unknown"
|
||||||
|
)
|
||||||
|
```
|
||||||
101
lib/http/client/doc.md
Normal file
101
lib/http/client/doc.md
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
# httpclient
|
||||||
|
--
|
||||||
|
import "github.com/go-i2p/go-i2ptunnel/lib/http/client"
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
#### type HTTPClient
|
||||||
|
|
||||||
|
```go
|
||||||
|
type HTTPClient struct {
|
||||||
|
// I2P Connection to listen to the I2P network
|
||||||
|
*onramp.Garlic
|
||||||
|
// The I2P Tunnel config itself
|
||||||
|
i2pconv.TunnelConfig
|
||||||
|
// The tunnel status
|
||||||
|
i2ptunnel.I2PTunnelStatus
|
||||||
|
|
||||||
|
// Error history of the tunnel
|
||||||
|
Errors []i2ptunnel.I2PTunnelError
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### func NewHTTPClient
|
||||||
|
|
||||||
|
```go
|
||||||
|
func NewHTTPClient(config i2pconv.TunnelConfig, samAddr string) (*HTTPClient, error)
|
||||||
|
```
|
||||||
|
NewHTTPClient creates a new HTTP Client tunnel with the given configuration
|
||||||
|
|
||||||
|
#### func (*HTTPClient) Address
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPClient) Address() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P address
|
||||||
|
|
||||||
|
#### func (*HTTPClient) Error
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPClient) Error() error
|
||||||
|
```
|
||||||
|
Get the tunnel's error message
|
||||||
|
|
||||||
|
#### func (*HTTPClient) LocalAddress
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPClient) LocalAddress() (string, string, error)
|
||||||
|
```
|
||||||
|
Get the tunnel's local host:port
|
||||||
|
|
||||||
|
#### func (*HTTPClient) Name
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPClient) Name() string
|
||||||
|
```
|
||||||
|
Get the tunnel's name
|
||||||
|
|
||||||
|
#### func (*HTTPClient) Options
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPClient) Options() map[string]string
|
||||||
|
```
|
||||||
|
Get the tunnel's options
|
||||||
|
|
||||||
|
#### func (*HTTPClient) Start
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPClient) Start() error
|
||||||
|
```
|
||||||
|
Start the tunnel
|
||||||
|
|
||||||
|
#### func (*HTTPClient) Status
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPClient) Status() i2ptunnel.I2PTunnelStatus
|
||||||
|
```
|
||||||
|
Get the tunnel's status
|
||||||
|
|
||||||
|
#### func (*HTTPClient) Stop
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPClient) Stop() error
|
||||||
|
```
|
||||||
|
Stop the tunnel
|
||||||
|
|
||||||
|
#### func (*HTTPClient) Target
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPClient) Target() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P target. Nil in the case of one-to-many clients like SOCKS5
|
||||||
|
and HTTP
|
||||||
|
|
||||||
|
#### func (*HTTPClient) Type
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPClient) Type() string
|
||||||
|
```
|
||||||
|
Get the tunnel's type
|
||||||
105
lib/http/server/doc.md
Normal file
105
lib/http/server/doc.md
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
# httpserver
|
||||||
|
--
|
||||||
|
import "github.com/go-i2p/go-i2ptunnel/lib/http/server"
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
#### type HTTPServer
|
||||||
|
|
||||||
|
```go
|
||||||
|
type HTTPServer struct {
|
||||||
|
// I2P Connection to listen to the I2P network
|
||||||
|
*onramp.Garlic
|
||||||
|
// The I2P Tunnel config itself
|
||||||
|
i2pconv.TunnelConfig
|
||||||
|
// The local HTTP service address
|
||||||
|
net.Addr
|
||||||
|
// The tunnel status
|
||||||
|
i2ptunnel.I2PTunnelStatus
|
||||||
|
// The rate-limiting configuration
|
||||||
|
limitedlistener.LimitedConfig
|
||||||
|
|
||||||
|
// Error history of the tunnel
|
||||||
|
Errors []i2ptunnel.I2PTunnelError
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### func NewHTTPServer
|
||||||
|
|
||||||
|
```go
|
||||||
|
func NewHTTPServer(config i2pconv.TunnelConfig, samAddr string) (*HTTPServer, error)
|
||||||
|
```
|
||||||
|
NewHTTPServer creates a new HTTP Server tunnel with the given configuration
|
||||||
|
|
||||||
|
#### func (*HTTPServer) Address
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPServer) Address() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P address
|
||||||
|
|
||||||
|
#### func (*HTTPServer) Error
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPServer) Error() error
|
||||||
|
```
|
||||||
|
Get the tunnel's error message
|
||||||
|
|
||||||
|
#### func (*HTTPServer) LocalAddress
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPServer) LocalAddress() (string, string, error)
|
||||||
|
```
|
||||||
|
Get the tunnel's local host:port
|
||||||
|
|
||||||
|
#### func (*HTTPServer) Name
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPServer) Name() string
|
||||||
|
```
|
||||||
|
Get the tunnel's name
|
||||||
|
|
||||||
|
#### func (*HTTPServer) Options
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPServer) Options() map[string]string
|
||||||
|
```
|
||||||
|
Get the tunnel's options
|
||||||
|
|
||||||
|
#### func (*HTTPServer) Start
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPServer) Start() error
|
||||||
|
```
|
||||||
|
Start the tunnel
|
||||||
|
|
||||||
|
#### func (*HTTPServer) Status
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPServer) Status() i2ptunnel.I2PTunnelStatus
|
||||||
|
```
|
||||||
|
Get the tunnel's status
|
||||||
|
|
||||||
|
#### func (*HTTPServer) Stop
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPServer) Stop() error
|
||||||
|
```
|
||||||
|
Stop the tunnel
|
||||||
|
|
||||||
|
#### func (*HTTPServer) Target
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPServer) Target() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P target. Nil in the case of one-to-many clients like SOCKS5
|
||||||
|
and HTTP
|
||||||
|
|
||||||
|
#### func (*HTTPServer) Type
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (h *HTTPServer) Type() string
|
||||||
|
```
|
||||||
|
Get the tunnel's type
|
||||||
103
lib/irc/client/doc.md
Normal file
103
lib/irc/client/doc.md
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
# ircclient
|
||||||
|
--
|
||||||
|
import "github.com/go-i2p/go-i2ptunnel/lib/irc/client"
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
#### type IRCClient
|
||||||
|
|
||||||
|
```go
|
||||||
|
type IRCClient struct {
|
||||||
|
// I2P Connection to listen to the I2P network
|
||||||
|
*onramp.Garlic
|
||||||
|
// The I2P Tunnel config itself
|
||||||
|
i2pconv.TunnelConfig
|
||||||
|
// The remote I2P destination target
|
||||||
|
*i2pkeys.I2PAddr
|
||||||
|
// The tunnel status
|
||||||
|
i2ptunnel.I2PTunnelStatus
|
||||||
|
|
||||||
|
// Error history of the tunnel
|
||||||
|
Errors []i2ptunnel.I2PTunnelError
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### func NewIRCClient
|
||||||
|
|
||||||
|
```go
|
||||||
|
func NewIRCClient(config i2pconv.TunnelConfig, samAddr string) (*IRCClient, error)
|
||||||
|
```
|
||||||
|
NewIRCClient creates a new IRC Client tunnel with the given configuration
|
||||||
|
|
||||||
|
#### func (*IRCClient) Address
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCClient) Address() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P address
|
||||||
|
|
||||||
|
#### func (*IRCClient) Error
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCClient) Error() error
|
||||||
|
```
|
||||||
|
Get the tunnel's error message
|
||||||
|
|
||||||
|
#### func (*IRCClient) LocalAddress
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCClient) LocalAddress() (string, string, error)
|
||||||
|
```
|
||||||
|
Get the tunnel's local host:port
|
||||||
|
|
||||||
|
#### func (*IRCClient) Name
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCClient) Name() string
|
||||||
|
```
|
||||||
|
Get the tunnel's name
|
||||||
|
|
||||||
|
#### func (*IRCClient) Options
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCClient) Options() map[string]string
|
||||||
|
```
|
||||||
|
Get the tunnel's options
|
||||||
|
|
||||||
|
#### func (*IRCClient) Start
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCClient) Start() error
|
||||||
|
```
|
||||||
|
Start the tunnel
|
||||||
|
|
||||||
|
#### func (*IRCClient) Status
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCClient) Status() i2ptunnel.I2PTunnelStatus
|
||||||
|
```
|
||||||
|
Get the tunnel's status
|
||||||
|
|
||||||
|
#### func (*IRCClient) Stop
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCClient) Stop() error
|
||||||
|
```
|
||||||
|
Stop the tunnel
|
||||||
|
|
||||||
|
#### func (*IRCClient) Target
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCClient) Target() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P target. Nil in the case of one-to-many clients like SOCKS5
|
||||||
|
and HTTP
|
||||||
|
|
||||||
|
#### func (*IRCClient) Type
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCClient) Type() string
|
||||||
|
```
|
||||||
|
Get the tunnel's type
|
||||||
105
lib/irc/server/doc.md
Normal file
105
lib/irc/server/doc.md
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
# ircserver
|
||||||
|
--
|
||||||
|
import "github.com/go-i2p/go-i2ptunnel/lib/irc/server"
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
#### type IRCServer
|
||||||
|
|
||||||
|
```go
|
||||||
|
type IRCServer struct {
|
||||||
|
// I2P Connection to listen to the I2P network
|
||||||
|
*onramp.Garlic
|
||||||
|
// The I2P Tunnel config itself
|
||||||
|
i2pconv.TunnelConfig
|
||||||
|
// The local IRC service address
|
||||||
|
net.Addr
|
||||||
|
// The tunnel status
|
||||||
|
i2ptunnel.I2PTunnelStatus
|
||||||
|
// The rate-limiting configuration
|
||||||
|
limitedlistener.LimitedConfig
|
||||||
|
|
||||||
|
// Error history of the tunnel
|
||||||
|
Errors []i2ptunnel.I2PTunnelError
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### func NewIRCServer
|
||||||
|
|
||||||
|
```go
|
||||||
|
func NewIRCServer(config i2pconv.TunnelConfig, samAddr string) (*IRCServer, error)
|
||||||
|
```
|
||||||
|
NewIRCServer creates a new IRC Server tunnel with the given configuration
|
||||||
|
|
||||||
|
#### func (*IRCServer) Address
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCServer) Address() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P address
|
||||||
|
|
||||||
|
#### func (*IRCServer) Error
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCServer) Error() error
|
||||||
|
```
|
||||||
|
Get the tunnel's error message
|
||||||
|
|
||||||
|
#### func (*IRCServer) LocalAddress
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCServer) LocalAddress() (string, string, error)
|
||||||
|
```
|
||||||
|
Get the tunnel's local host:port
|
||||||
|
|
||||||
|
#### func (*IRCServer) Name
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCServer) Name() string
|
||||||
|
```
|
||||||
|
Get the tunnel's name
|
||||||
|
|
||||||
|
#### func (*IRCServer) Options
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCServer) Options() map[string]string
|
||||||
|
```
|
||||||
|
Get the tunnel's options
|
||||||
|
|
||||||
|
#### func (*IRCServer) Start
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCServer) Start() error
|
||||||
|
```
|
||||||
|
Start the tunnel
|
||||||
|
|
||||||
|
#### func (*IRCServer) Status
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCServer) Status() i2ptunnel.I2PTunnelStatus
|
||||||
|
```
|
||||||
|
Get the tunnel's status
|
||||||
|
|
||||||
|
#### func (*IRCServer) Stop
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCServer) Stop() error
|
||||||
|
```
|
||||||
|
Stop the tunnel
|
||||||
|
|
||||||
|
#### func (*IRCServer) Target
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCServer) Target() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P target. Nil in the case of one-to-many clients like SOCKS5
|
||||||
|
and HTTP
|
||||||
|
|
||||||
|
#### func (*IRCServer) Type
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (i *IRCServer) Type() string
|
||||||
|
```
|
||||||
|
Get the tunnel's type
|
||||||
94
lib/socks/client/doc.md
Normal file
94
lib/socks/client/doc.md
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
# socks
|
||||||
|
--
|
||||||
|
import "github.com/go-i2p/go-i2ptunnel/lib/socks/client"
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
#### type SOCKS
|
||||||
|
|
||||||
|
```go
|
||||||
|
type SOCKS struct {
|
||||||
|
// I2P Connection to listen to the I2P network
|
||||||
|
*onramp.Garlic
|
||||||
|
// The I2P Tunnel config itself
|
||||||
|
i2pconv.TunnelConfig
|
||||||
|
// The tunnel status
|
||||||
|
i2ptunnel.I2PTunnelStatus
|
||||||
|
|
||||||
|
// Error history of the tunnel
|
||||||
|
Errors []i2ptunnel.I2PTunnelError
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### func (*SOCKS) Address
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (s *SOCKS) Address() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P address
|
||||||
|
|
||||||
|
#### func (*SOCKS) Error
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (s *SOCKS) Error() error
|
||||||
|
```
|
||||||
|
Get the tunnel's error message
|
||||||
|
|
||||||
|
#### func (*SOCKS) LocalAddress
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (s *SOCKS) LocalAddress() (string, string, error)
|
||||||
|
```
|
||||||
|
Get the tunnel's local host:port
|
||||||
|
|
||||||
|
#### func (*SOCKS) Name
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (s *SOCKS) Name() string
|
||||||
|
```
|
||||||
|
Get the tunnel's name
|
||||||
|
|
||||||
|
#### func (*SOCKS) Options
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (s *SOCKS) Options() map[string]string
|
||||||
|
```
|
||||||
|
Get the tunnel's options
|
||||||
|
|
||||||
|
#### func (*SOCKS) Start
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (s *SOCKS) Start() error
|
||||||
|
```
|
||||||
|
Start the tunnel
|
||||||
|
|
||||||
|
#### func (*SOCKS) Status
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (s *SOCKS) Status() i2ptunnel.I2PTunnelStatus
|
||||||
|
```
|
||||||
|
Get the tunnel's status
|
||||||
|
|
||||||
|
#### func (*SOCKS) Stop
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (s *SOCKS) Stop() error
|
||||||
|
```
|
||||||
|
Stop the tunnel
|
||||||
|
|
||||||
|
#### func (*SOCKS) Target
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (s *SOCKS) Target() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P target. Nil in the case of one-to-many clients like SOCKS5
|
||||||
|
and HTTP
|
||||||
|
|
||||||
|
#### func (*SOCKS) Type
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (s *SOCKS) Type() string
|
||||||
|
```
|
||||||
|
Get the tunnel's type
|
||||||
103
lib/tcp/client/doc.md
Normal file
103
lib/tcp/client/doc.md
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
# tcpclient
|
||||||
|
--
|
||||||
|
import "github.com/go-i2p/go-i2ptunnel/lib/tcp/client"
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
#### type TCPClient
|
||||||
|
|
||||||
|
```go
|
||||||
|
type TCPClient struct {
|
||||||
|
// I2P Connection to listen to the I2P network
|
||||||
|
*onramp.Garlic
|
||||||
|
// The I2P Tunnel config itself
|
||||||
|
i2pconv.TunnelConfig
|
||||||
|
// The remote I2P destination target
|
||||||
|
*i2pkeys.I2PAddr
|
||||||
|
// The tunnel status
|
||||||
|
i2ptunnel.I2PTunnelStatus
|
||||||
|
|
||||||
|
// Error history of the tunnel
|
||||||
|
Errors []i2ptunnel.I2PTunnelError
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### func NewTCPClient
|
||||||
|
|
||||||
|
```go
|
||||||
|
func NewTCPClient(config i2pconv.TunnelConfig, samAddr string) (*TCPClient, error)
|
||||||
|
```
|
||||||
|
NewTCPClient creates a new TCP Client tunnel with the given configuration
|
||||||
|
|
||||||
|
#### func (*TCPClient) Address
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPClient) Address() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P address
|
||||||
|
|
||||||
|
#### func (*TCPClient) Error
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPClient) Error() error
|
||||||
|
```
|
||||||
|
Get the tunnel's error message
|
||||||
|
|
||||||
|
#### func (*TCPClient) LocalAddress
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPClient) LocalAddress() (string, string, error)
|
||||||
|
```
|
||||||
|
Get the tunnel's local host:port
|
||||||
|
|
||||||
|
#### func (*TCPClient) Name
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPClient) Name() string
|
||||||
|
```
|
||||||
|
Get the tunnel's name
|
||||||
|
|
||||||
|
#### func (*TCPClient) Options
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPClient) Options() map[string]string
|
||||||
|
```
|
||||||
|
Get the tunnel's options
|
||||||
|
|
||||||
|
#### func (*TCPClient) Start
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPClient) Start() error
|
||||||
|
```
|
||||||
|
Start the tunnel
|
||||||
|
|
||||||
|
#### func (*TCPClient) Status
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPClient) Status() i2ptunnel.I2PTunnelStatus
|
||||||
|
```
|
||||||
|
Get the tunnel's status
|
||||||
|
|
||||||
|
#### func (*TCPClient) Stop
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPClient) Stop() error
|
||||||
|
```
|
||||||
|
Stop the tunnel
|
||||||
|
|
||||||
|
#### func (*TCPClient) Target
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPClient) Target() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P target. Nil in the case of one-to-many clients like SOCKS5
|
||||||
|
and HTTP
|
||||||
|
|
||||||
|
#### func (*TCPClient) Type
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPClient) Type() string
|
||||||
|
```
|
||||||
|
Get the tunnel's type
|
||||||
105
lib/tcp/server/doc.md
Normal file
105
lib/tcp/server/doc.md
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
# tcpserver
|
||||||
|
--
|
||||||
|
import "github.com/go-i2p/go-i2ptunnel/lib/tcp/server"
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
#### type TCPServer
|
||||||
|
|
||||||
|
```go
|
||||||
|
type TCPServer struct {
|
||||||
|
// I2P Connection to listen to the I2P network
|
||||||
|
*onramp.Garlic
|
||||||
|
// The I2P Tunnel config itself
|
||||||
|
i2pconv.TunnelConfig
|
||||||
|
// The local TCP service address
|
||||||
|
net.Addr
|
||||||
|
// The tunnel status
|
||||||
|
i2ptunnel.I2PTunnelStatus
|
||||||
|
// The rate-limiting configuration
|
||||||
|
limitedlistener.LimitedConfig
|
||||||
|
|
||||||
|
// Error history of the tunnel
|
||||||
|
Errors []i2ptunnel.I2PTunnelError
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### func NewTCPServer
|
||||||
|
|
||||||
|
```go
|
||||||
|
func NewTCPServer(config i2pconv.TunnelConfig, samAddr string) (*TCPServer, error)
|
||||||
|
```
|
||||||
|
NewTCPServer creates a new TCP Server tunnel with the given configuration
|
||||||
|
|
||||||
|
#### func (*TCPServer) Address
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPServer) Address() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P address
|
||||||
|
|
||||||
|
#### func (*TCPServer) Error
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPServer) Error() error
|
||||||
|
```
|
||||||
|
Get the tunnel's error message
|
||||||
|
|
||||||
|
#### func (*TCPServer) LocalAddress
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPServer) LocalAddress() (string, string, error)
|
||||||
|
```
|
||||||
|
Get the tunnel's local host:port
|
||||||
|
|
||||||
|
#### func (*TCPServer) Name
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPServer) Name() string
|
||||||
|
```
|
||||||
|
Get the tunnel's name
|
||||||
|
|
||||||
|
#### func (*TCPServer) Options
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPServer) Options() map[string]string
|
||||||
|
```
|
||||||
|
Get the tunnel's options
|
||||||
|
|
||||||
|
#### func (*TCPServer) Start
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPServer) Start() error
|
||||||
|
```
|
||||||
|
Start the tunnel
|
||||||
|
|
||||||
|
#### func (*TCPServer) Status
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPServer) Status() i2ptunnel.I2PTunnelStatus
|
||||||
|
```
|
||||||
|
Get the tunnel's status
|
||||||
|
|
||||||
|
#### func (*TCPServer) Stop
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPServer) Stop() error
|
||||||
|
```
|
||||||
|
Stop the tunnel
|
||||||
|
|
||||||
|
#### func (*TCPServer) Target
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPServer) Target() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P target. Nil in the case of one-to-many clients like SOCKS5
|
||||||
|
and HTTP
|
||||||
|
|
||||||
|
#### func (*TCPServer) Type
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (t *TCPServer) Type() string
|
||||||
|
```
|
||||||
|
Get the tunnel's type
|
||||||
103
lib/udp/client/doc.md
Normal file
103
lib/udp/client/doc.md
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
# udpclient
|
||||||
|
--
|
||||||
|
import "github.com/go-i2p/go-i2ptunnel/lib/udp/client"
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
#### type UDPClient
|
||||||
|
|
||||||
|
```go
|
||||||
|
type UDPClient struct {
|
||||||
|
// I2P Connection to listen to the I2P network
|
||||||
|
*onramp.Garlic
|
||||||
|
// The I2P Tunnel config itself
|
||||||
|
i2pconv.TunnelConfig
|
||||||
|
// The remote I2P destination target
|
||||||
|
*i2pkeys.I2PAddr
|
||||||
|
// The tunnel status
|
||||||
|
i2ptunnel.I2PTunnelStatus
|
||||||
|
|
||||||
|
// Error history of the tunnel
|
||||||
|
Errors []i2ptunnel.I2PTunnelError
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### func NewUDPClient
|
||||||
|
|
||||||
|
```go
|
||||||
|
func NewUDPClient(config i2pconv.TunnelConfig, samAddr string) (*UDPClient, error)
|
||||||
|
```
|
||||||
|
NewUDPClient creates a new UDP Client tunnel with the given configuration
|
||||||
|
|
||||||
|
#### func (*UDPClient) Address
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPClient) Address() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P address
|
||||||
|
|
||||||
|
#### func (*UDPClient) Error
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPClient) Error() error
|
||||||
|
```
|
||||||
|
Get the tunnel's error message
|
||||||
|
|
||||||
|
#### func (*UDPClient) LocalAddress
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPClient) LocalAddress() (string, string, error)
|
||||||
|
```
|
||||||
|
Get the tunnel's local host:port
|
||||||
|
|
||||||
|
#### func (*UDPClient) Name
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPClient) Name() string
|
||||||
|
```
|
||||||
|
Get the tunnel's name
|
||||||
|
|
||||||
|
#### func (*UDPClient) Options
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPClient) Options() map[string]string
|
||||||
|
```
|
||||||
|
Get the tunnel's options
|
||||||
|
|
||||||
|
#### func (*UDPClient) Start
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPClient) Start() error
|
||||||
|
```
|
||||||
|
Start the tunnel
|
||||||
|
|
||||||
|
#### func (*UDPClient) Status
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPClient) Status() i2ptunnel.I2PTunnelStatus
|
||||||
|
```
|
||||||
|
Get the tunnel's status
|
||||||
|
|
||||||
|
#### func (*UDPClient) Stop
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPClient) Stop() error
|
||||||
|
```
|
||||||
|
Stop the tunnel
|
||||||
|
|
||||||
|
#### func (*UDPClient) Target
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPClient) Target() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P target. Nil in the case of one-to-many clients like SOCKS5
|
||||||
|
and HTTP
|
||||||
|
|
||||||
|
#### func (*UDPClient) Type
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPClient) Type() string
|
||||||
|
```
|
||||||
|
Get the tunnel's type
|
||||||
103
lib/udp/server/doc.md
Normal file
103
lib/udp/server/doc.md
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
# udpserver
|
||||||
|
--
|
||||||
|
import "github.com/go-i2p/go-i2ptunnel/lib/udp/server"
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
#### type UDPServer
|
||||||
|
|
||||||
|
```go
|
||||||
|
type UDPServer struct {
|
||||||
|
// I2P Connection to listen to the I2P network
|
||||||
|
*onramp.Garlic
|
||||||
|
// The I2P Tunnel config itself
|
||||||
|
i2pconv.TunnelConfig
|
||||||
|
// The local UDP service address
|
||||||
|
net.Addr
|
||||||
|
// The tunnel status
|
||||||
|
i2ptunnel.I2PTunnelStatus
|
||||||
|
|
||||||
|
// Error history of the tunnel
|
||||||
|
Errors []i2ptunnel.I2PTunnelError
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### func NewUDPServer
|
||||||
|
|
||||||
|
```go
|
||||||
|
func NewUDPServer(config i2pconv.TunnelConfig, samAddr string) (*UDPServer, error)
|
||||||
|
```
|
||||||
|
NewUDPServer creates a new UDP Server tunnel with the given configuration
|
||||||
|
|
||||||
|
#### func (*UDPServer) Address
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPServer) Address() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P address
|
||||||
|
|
||||||
|
#### func (*UDPServer) Error
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPServer) Error() error
|
||||||
|
```
|
||||||
|
Get the tunnel's error message
|
||||||
|
|
||||||
|
#### func (*UDPServer) LocalAddress
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPServer) LocalAddress() (string, string, error)
|
||||||
|
```
|
||||||
|
Get the tunnel's local host:port
|
||||||
|
|
||||||
|
#### func (*UDPServer) Name
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPServer) Name() string
|
||||||
|
```
|
||||||
|
Get the tunnel's name
|
||||||
|
|
||||||
|
#### func (*UDPServer) Options
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPServer) Options() map[string]string
|
||||||
|
```
|
||||||
|
Get the tunnel's options
|
||||||
|
|
||||||
|
#### func (*UDPServer) Start
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPServer) Start() error
|
||||||
|
```
|
||||||
|
Start the tunnel
|
||||||
|
|
||||||
|
#### func (*UDPServer) Status
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPServer) Status() i2ptunnel.I2PTunnelStatus
|
||||||
|
```
|
||||||
|
Get the tunnel's status
|
||||||
|
|
||||||
|
#### func (*UDPServer) Stop
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPServer) Stop() error
|
||||||
|
```
|
||||||
|
Stop the tunnel
|
||||||
|
|
||||||
|
#### func (*UDPServer) Target
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPServer) Target() string
|
||||||
|
```
|
||||||
|
Get the tunnel's I2P target. Nil in the case of one-to-many clients like SOCKS5
|
||||||
|
and HTTP
|
||||||
|
|
||||||
|
#### func (*UDPServer) Type
|
||||||
|
|
||||||
|
```go
|
||||||
|
func (u *UDPServer) Type() string
|
||||||
|
```
|
||||||
|
Get the tunnel's type
|
||||||
Reference in New Issue
Block a user