protocol

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright (C) 2026 by saba <contact me via issue>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

In addition, no derivative work may use the name or imply association with this application without prior consent.

Index

Constants

View Source
const (
	AddrTypeIPv4   = 0x01
	AddrTypeDomain = 0x03
	AddrTypeIPv6   = 0x04
)

AddrType 定义

Variables

This section is empty.

Functions

func ReadAddress

func ReadAddress(r io.Reader) (string, byte, net.IP, error)

ReadAddress 读取 SOCKS5 格式的目标地址 返回: 完整地址字符串 (host:port), 地址类型, IP(如果是域名则为nil), error

func WriteAddress

func WriteAddress(w io.Writer, rawAddr string) error

WriteAddress 将地址写入 Writer (SOCKS5 格式) 输入 rawAddr 为 "host:port"

Types

This section is empty.

Jump to

Keyboard shortcuts

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