Documentation
¶
Overview ¶
introducer is a simple obfuscated proxy that points to an instance of the menshen API. The upstream API can be publicly available or not.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClientFromIntroducer ¶
func NewHTTPClientFromIntroducer(introducer *Introducer) (*http.Client, error)
NewHTTPClientFromIntroducer returns an http.Client that will use the passed introducer.
Types ¶
type Introducer ¶
type Introducer struct { Type string // currently only obfsvpnintro is supported Addr string // host/ip of proxy - can have a port, e.g. proxy.menshen.net:4430 Cert string // obfs4 proxy cert FQDN string // hostname of menshen hostname the proxy server should connect to KCP bool // use obfs4 with kcp Auth string // credentials for menshen authentication to get private gateways/bridges }
Introducer has everything we need to instantiate a http.Client that dials to the obfuscated introducer.
func NewIntroducerFromURL ¶
func NewIntroducerFromURL(introducerURL string) (*Introducer, error)
NewIntroducerFromURL returns a new Introducer after parsing the passed URL. It will also return an error if it was not possible to parse the URL correctly.
func (*Introducer) URL ¶
func (i *Introducer) URL() string
URL produces the canonical URL for this introducer. We need to make sure to use this URL in the internal storage, so that we can ensure equality regardless of parameter order.
func (*Introducer) Validate ¶
func (i *Introducer) Validate() error
Validate returns true if all the fields in this Introducer are like expected.