debugstuff

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2022 License: LGPL-2.1 Imports: 9 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatMockTransportInfo

func FormatMockTransportInfo(
	scheme string,
	uri url.URL,
	proxy *url.URL,
	ctx_closed bool,
	key ed25519.PrivateKey,
) string

func MockConn

func MockConn() net.Conn

func MockConnContent

func MockConnContent() []byte

func MockConnTooShortContent

func MockConnTooShortContent() []byte

func MockConnWrongVerContent

func MockConnWrongVerContent() []byte

func MockPubKey

func MockPubKey() []byte

func MockTooShortConn

func MockTooShortConn() net.Conn

func MockWrongVerConn

func MockWrongVerConn() net.Conn

func ReadMockTransportInfo

func ReadMockTransportInfo(conn net.Conn) string

func ReadMockTransportInfoAfterHeader

func ReadMockTransportInfoAfterHeader(conn net.Conn) string

Types

type MockTransport

type MockTransport struct {
	Scheme    string
	SecureLvl uint
}

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

type MockTransportListener

type MockTransportListener struct {
	// contains filtered or unexported fields
}

func (*MockTransportListener) Accept

func (l *MockTransportListener) Accept() (net.Conn, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL