Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) Bytes() (up, down uint64)
- func (c *Client) Close() error
- func (c *Client) Done() <-chan struct{}
- func (c *Client) ListenUDP() (net.PacketConn, error)
- func (c *Client) Open(target string) (net.Conn, error)
- func (c *Client) Probe(ctx context.Context) error
- func (c *Client) Session() *mux.Session
- type Config
- type Endpoint
Constants ¶
View Source
const TunIP = "198.18.0.1"
TunIP is the synthetic IPv4 the GUI and utun use. Trojan has no overlay lease.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client dials Trojan TCP (+ TLS / REALITY / XHTTP) per Open.
func (*Client) ListenUDP ¶
func (c *Client) ListenUDP() (net.PacketConn, error)
ListenUDP opens one Trojan UDP ASSOCIATE stream.
type Endpoint ¶
type Endpoint struct {
Addr string // host:port
Password string
SNI string
TLS bool
Reality bool
Insecure bool
Network string // tcp, xhttp, …
Fingerprint string
PublicKey string
ShortID string
Path string
Host string
Mode string
}
Endpoint is the server address and TLS options extracted from a URL.
Click to show internal directories.
Click to hide internal directories.