terasu

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

README

TeRaSu (TRS)

よの光遍く空へ照しつつ

土棲むものは孰れか見ゆや

counter

Usage

tls.Client(terasu.NewConn(conn), &tls.Config{
    ServerName: host,
}).Handshake()

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultFirstFragmentLen = 4

DefaultFirstFragmentLen ...

Functions

This section is empty.

Types

type Conn

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

Conn remote: real server; local: relay

func NewConn added in v1.0.1

func NewConn(conn net.Conn) *Conn

NewConn wraps *net.TCPConn (net.Conn must be *net.TCPConn)

func (*Conn) Close added in v1.0.1

func (conn *Conn) Close() error

Close closes the connection.

func (*Conn) LocalAddr added in v1.0.1

func (conn *Conn) LocalAddr() net.Addr

LocalAddr returns the local network address.

func (*Conn) Read added in v1.0.1

func (conn *Conn) Read(b []byte) (int, error)

Read is recv

func (*Conn) ReadFrom added in v1.0.1

func (conn *Conn) ReadFrom(r io.Reader) (n int64, err error)

ReadFrom when client want to send to server, detect and split.

func (*Conn) RemoteAddr added in v1.0.1

func (conn *Conn) RemoteAddr() net.Addr

RemoteAddr returns the remote network address.

func (*Conn) SetDeadline added in v1.0.1

func (conn *Conn) SetDeadline(t time.Time) error

SetDeadline sets the read and write deadlines associated with the connection.

func (*Conn) SetReadDeadline added in v1.0.1

func (conn *Conn) SetReadDeadline(t time.Time) error

SetReadDeadline sets the deadline for future Read calls.

func (*Conn) SetWriteDeadline added in v1.0.1

func (conn *Conn) SetWriteDeadline(t time.Time) error

SetWriteDeadline sets the deadline for future Write calls.

func (*Conn) Write added in v1.0.1

func (conn *Conn) Write(b []byte) (int, error)

Write is send

func (*Conn) WriteTo added in v1.0.1

func (conn *Conn) WriteTo(w io.Writer) (int64, error)

WriteTo remote response and releay it to local client without any change.

Directories

Path Synopsis
Package main provides the main entry point for terasu.
Package main provides the main entry point for terasu.
Package dns with DoT/DoH supports
Package dns with DoT/DoH supports
Package http is a wrapper around the standard http library with enhanced DNS resolution and TLS handling capabilities.
Package http is a wrapper around the standard http library with enhanced DNS resolution and TLS handling capabilities.
Package http2 is the same as the standard http lib with HTTP2 client support
Package http2 is the same as the standard http lib with HTTP2 client support
Package http3 is the same as the standard http lib with HTTP3 client support
Package http3 is the same as the standard http lib with HTTP3 client support
Package ip contains IP-related configs
Package ip contains IP-related configs

Jump to

Keyboard shortcuts

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