Documentation ¶
Overview ¶
Ytl Copyright (C) 2022 DomesticMoth <silkmoth@protonmail.com>
This file is part of Ytl.
Ytl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
Ytl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Ytl Copyright (C) 2022 DomesticMoth <silkmoth@protonmail.com>
This file is part of Ytl.
Ytl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
Ytl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Ytl Copyright (C) 2022 DomesticMoth <silkmoth@protonmail.com>
This file is part of Ytl.
Ytl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
Ytl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Ytl Copyright (C) 2022 DomesticMoth <silkmoth@protonmail.com>
This file is part of Ytl.
Ytl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
Ytl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Index ¶
- func KeyFromOptionalKey(key ed25519.PrivateKey) ed25519.PrivateKey
- type ConnManager
- func (c *ConnManager) Connect(uri url.URL) (*YggConn, error)
- func (c *ConnManager) ConnectCtx(ctx context.Context, uri url.URL) (*YggConn, error)
- func (c *ConnManager) ConnectTimeout(uri url.URL, timeout time.Duration) (*YggConn, error)
- func (c *ConnManager) Listen(uri url.URL) (ygg YggListener, err error)
- type DeduplicationManager
- type ProxyManager
- type ProxyMapping
- type YggConn
- func (y *YggConn) Close() (err error)
- func (y *YggConn) GetPublicKey() (ed25519.PublicKey, error)
- func (y *YggConn) GetVer() (*static.ProtoVersion, error)
- func (y *YggConn) LocalAddr() net.Addr
- func (y *YggConn) Read(b []byte) (n int, err error)
- func (y *YggConn) RemoteAddr() net.Addr
- func (y *YggConn) SetDeadline(t time.Time) (err error)
- func (y *YggConn) SetReadDeadline(t time.Time) (err error)
- func (y *YggConn) SetWriteDeadline(t time.Time) (err error)
- func (y *YggConn) Write(b []byte) (n int, err error)
- type YggListener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KeyFromOptionalKey ¶
func KeyFromOptionalKey(key ed25519.PrivateKey) ed25519.PrivateKey
Types ¶
type ConnManager ¶
type ConnManager struct {
// contains filtered or unexported fields
}
func NewConnManager ¶
func NewConnManager( ctx context.Context, key ed25519.PrivateKey, proxy *ProxyManager, dm *DeduplicationManager, allowList *static.AllowList, ) *ConnManager
func NewConnManagerWithTransports ¶
func NewConnManagerWithTransports( ctx context.Context, key ed25519.PrivateKey, proxy *ProxyManager, dm *DeduplicationManager, allowList *static.AllowList, transports []static.Transport, ) *ConnManager
func (*ConnManager) ConnectCtx ¶
func (*ConnManager) ConnectTimeout ¶
func (*ConnManager) Listen ¶
func (c *ConnManager) Listen(uri url.URL) (ygg YggListener, err error)
type DeduplicationManager ¶
type DeduplicationManager struct {
// contains filtered or unexported fields
}
func NewDeduplicationManager ¶
func NewDeduplicationManager(secureMode bool, blockKey ed25519.PublicKey) *DeduplicationManager
type ProxyManager ¶
type ProxyManager struct {
// contains filtered or unexported fields
}
func NewProxyManager ¶
func NewProxyManager(defaultProxy *url.URL, mapping []ProxyMapping) ProxyManager
type YggConn ¶
type YggConn struct {
// contains filtered or unexported fields
}
func ConnToYggConn ¶
func (*YggConn) RemoteAddr ¶
type YggListener ¶
type YggListener struct {
// contains filtered or unexported fields
}
func (*YggListener) Accept ¶
func (y *YggListener) Accept() (ygg YggConn, err error)
Accept waits for and returns the next connection to the listener.
func (*YggListener) Addr ¶
func (y *YggListener) Addr() net.Addr
Addr returns the listener's network address.
func (*YggListener) Close ¶
func (y *YggListener) Close() error
Close closes the listener. Any blocked Accept operations will be unblocked and return errors.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Ytl Copyright (C) 2022 DomesticMoth <silkmoth@protonmail.com>
|
Ytl Copyright (C) 2022 DomesticMoth <silkmoth@protonmail.com> |
Ytl Copyright (C) 2022 DomesticMoth <silkmoth@protonmail.com>
|
Ytl Copyright (C) 2022 DomesticMoth <silkmoth@protonmail.com> |
Ytl Copyright (C) 2022 DomesticMoth <silkmoth@protonmail.com>
|
Ytl Copyright (C) 2022 DomesticMoth <silkmoth@protonmail.com> |
Ytl Copyright (C) 2022 DomesticMoth <silkmoth@protonmail.com>
|
Ytl Copyright (C) 2022 DomesticMoth <silkmoth@protonmail.com> |
Ytl Copyright (C) 2022 DomesticMoth <silkmoth@protonmail.com>
|
Ytl Copyright (C) 2022 DomesticMoth <silkmoth@protonmail.com> |