Documentation ¶
Index ¶
Constants ¶
const DefaultWgKeepAlive = 25 * time.Second
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirectNoProxy ¶ added in v0.16.0
type DirectNoProxy struct { // RemoteWgListenPort is a WireGuard port of a remote peer. // It is used instead of the hardcoded 51820 port. RemoteWgListenPort int // contains filtered or unexported fields }
DirectNoProxy is used when there is no need for a proxy between ICE and WireGuard. This is possible in either of these cases: - peers are in the same local network - one of the peers has a public static IP (host) DirectNoProxy will just update remote peer with a remote host and fixed WireGuard port (r.g. 51820). In order DirectNoProxy to work, WireGuard port has to be fixed for the time being.
func NewDirectNoProxy ¶ added in v0.16.0
func NewDirectNoProxy(config Config, remoteWgPort int) *DirectNoProxy
NewDirectNoProxy creates a new DirectNoProxy with a provided config and remote peer's WireGuard listen port
func (*DirectNoProxy) Close ¶ added in v0.16.0
func (p *DirectNoProxy) Close() error
Close removes peer from the WireGuard interface
func (*DirectNoProxy) Start ¶ added in v0.16.0
func (p *DirectNoProxy) Start(remoteConn net.Conn) error
Start just updates WireGuard peer with the remote IP and default WireGuard port
func (*DirectNoProxy) Type ¶ added in v0.16.0
func (p *DirectNoProxy) Type() Type
Type returns the type of this proxy
type DummyProxy ¶
type DummyProxy struct {
// contains filtered or unexported fields
}
DummyProxy just sends pings to the RemoteKey peer and reads responses
func NewDummyProxy ¶
func NewDummyProxy(remote string) *DummyProxy
func (*DummyProxy) Close ¶
func (p *DummyProxy) Close() error
func (*DummyProxy) Type ¶
func (p *DummyProxy) Type() Type
type NoProxy ¶
type NoProxy struct {
// contains filtered or unexported fields
}
NoProxy is used just to configure WireGuard without any local proxy in between. Used when the WireGuard interface is userspace and uses bind.ICEBind
func NewNoProxy ¶
NewNoProxy creates a new NoProxy with a provided config
type WireGuardProxy ¶ added in v0.16.0
type WireGuardProxy struct {
// contains filtered or unexported fields
}
WireGuardProxy proxies
func NewWireGuardProxy ¶ added in v0.16.0
func NewWireGuardProxy(config Config) *WireGuardProxy
func (*WireGuardProxy) Close ¶ added in v0.16.0
func (p *WireGuardProxy) Close() error
func (*WireGuardProxy) Start ¶ added in v0.16.0
func (p *WireGuardProxy) Start(remoteConn net.Conn) error
func (*WireGuardProxy) Type ¶ added in v0.16.0
func (p *WireGuardProxy) Type() Type