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.
Index ¶
- func FormatMockTransportInfo(scheme string, uri url.URL, proxy *url.URL, ctx_closed bool, ...) string
- func MockConn() net.Conn
- func MockConnContent() []byte
- func MockConnTooShortContent() []byte
- func MockConnWrongVerContent() []byte
- func MockPubKey() []byte
- func MockTooShortConn() net.Conn
- func MockWrongVerConn() net.Conn
- func ReadMockTransportInfo(conn net.Conn) string
- func ReadMockTransportInfoAfterHeader(conn net.Conn) string
- type MockTransport
- type MockTransportListener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatMockTransportInfo ¶
func MockConnContent ¶
func MockConnContent() []byte
func MockConnTooShortContent ¶
func MockConnTooShortContent() []byte
func MockConnWrongVerContent ¶
func MockConnWrongVerContent() []byte
func MockPubKey ¶
func MockPubKey() []byte
func MockTooShortConn ¶
func MockWrongVerConn ¶
func ReadMockTransportInfo ¶
Types ¶
type MockTransport ¶
func (MockTransport) Connect ¶
func (t MockTransport) Connect( ctx context.Context, uri url.URL, proxy *url.URL, key ed25519.PrivateKey, ) (static.ConnResult, error)
func (MockTransport) GetScheme ¶
func (t MockTransport) GetScheme() string
func (MockTransport) Listen ¶
func (t MockTransport) Listen(ctx context.Context, uri url.URL, key ed25519.PrivateKey) (static.TransportListener, error)
type MockTransportListener ¶
type MockTransportListener struct {
// contains filtered or unexported fields
}
func (*MockTransportListener) AcceptConn ¶
func (l *MockTransportListener) AcceptConn() (static.ConnResult, error)
func (*MockTransportListener) Addr ¶
func (l *MockTransportListener) Addr() net.Addr
func (*MockTransportListener) Close ¶
func (l *MockTransportListener) Close() error