Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/WANG-lp/socks5-rs
/ functions
Functions
43 in github.com/WANG-lp/socks5-rs
⨍
Functions
43
◇
Types & classes
4
↓ 8 callers
Function
send_reply
Send a SOCKS5 reply: `VER REP RSV ATYP BND.ADDR BND.PORT`.
src/protocol.rs:188
↓ 8 callers
Function
start_proxy
(config: Config)
tests/integration.rs:21
↓ 8 callers
Function
with_timeout
Run a future with a hard deadline so a protocol bug fails fast.
tests/integration.rs:107
↓ 7 callers
Function
unspecified
`0.0.0.0:0` — used as the BND.ADDR/BND.PORT in replies where we have no meaningful address to report (e.g. error replies).
src/protocol.rs:49
↓ 6 callers
Function
read_reply
Read a reply (`VER REP RSV ATYP BND.ADDR BND.PORT`) and return (REP, BND).
tests/integration.rs:81
↓ 5 callers
Function
greet_no_auth
(stream: &mut TcpStream)
tests/integration.rs:56
↓ 5 callers
Function
write_request_ipv4
(stream: &mut TcpStream, cmd: u8, addr: SocketAddr)
tests/integration.rs:63
↓ 3 callers
Function
auth_config
()
tests/integration.rs:221
↓ 3 callers
Function
encode_socket_addr
Append the ATYP + ADDR + PORT encoding of a concrete socket address.
src/protocol.rs:172
↓ 3 callers
Function
short
()
src/protocol.rs:167
↓ 3 callers
Function
start_tcp_echo
()
tests/integration.rs:30
↓ 2 callers
Method
parse
Parse an ATYP-prefixed address from the front of an in-memory buffer (used for UDP datagram headers). Returns the address and the number of bytes it o
src/protocol.rs:98
↓ 2 callers
Function
serve
Accept connections from `listener` forever, handling each one on its own task. Only fatal listener errors propagate; transient `accept` failures are l
src/lib.rs:20
↓ 1 callers
Function
associate
Handle a UDP ASSOCIATE request that arrived on the control connection `ctrl`. `peer` is the client's TCP address; its IP is used to accept only datagr
src/udp.rs:30
↓ 1 callers
Function
authenticate
RFC 1929 username/password verification.
src/connection.rs:115
↓ 1 callers
Function
connect_target
Connect to a target, trying every resolved address for a host name.
src/connection.rs:207
↓ 1 callers
Function
handle
Drive a single client connection to completion.
src/connection.rs:46
↓ 1 callers
Function
handle_connect
Execute a CONNECT request and, on success, splice the two streams together.
src/connection.rs:172
↓ 1 callers
Function
map_connect_error
Map an outbound connection error to the closest SOCKS5 reply code.
src/connection.rs:227
↓ 1 callers
Function
negotiate
Method-selection greeting plus, if configured, the auth sub-negotiation.
src/connection.rs:77
↓ 1 callers
Function
read_request
Read `VER CMD RSV ATYP DST.ADDR DST.PORT`.
src/connection.rs:150
↓ 1 callers
Method
resolve_first
Resolve to a single socket address, performing DNS for host names.
src/protocol.rs:150
↓ 1 callers
Function
start_udp_echo
()
tests/integration.rs:44
↓ 1 callers
Function
write_request_domain
(stream: &mut TcpStream, cmd: u8, host: &str, port: u16)
tests/integration.rs:73
Function
auth_failure_is_rejected
()
tests/integration.rs:272
Function
auth_required_but_only_no_auth_offered
()
tests/integration.rs:286
Function
auth_success_then_connect
()
tests/integration.rs:248
Function
bind_command_is_not_supported
()
tests/integration.rs:302
Function
connect_ipv4_relays_data
()
tests/integration.rs:116
Function
connect_refused_maps_to_reply
()
tests/integration.rs:156
Function
connect_via_domain_name
()
tests/integration.rs:136
Method
default
()
src/connection.rs:31
Method
encode
Append the ATYP + ADDR + PORT encoding of this address to `buf`.
src/protocol.rs:137
Method
fmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/protocol.rs:159
Function
forward_to_client
Wrap a target's reply in a SOCKS5 UDP header and deliver it to the client.
src/udp.rs:175
Function
forward_to_remote
Parse a client datagram (`RSV RSV FRAG ATYP DST.ADDR DST.PORT DATA`) and forward its payload to the requested target.
src/udp.rs:131
Function
main
()
src/main.rs:42
Method
read_from
Read an ATYP-prefixed address (ADDR + PORT) from an async stream.
src/protocol.rs:63
Function
recv_opt
`recv_from` on an optional socket. When the socket is absent the future never resolves, so it contributes nothing to the `select!`.
src/udp.rs:119
Function
relay
The bidirectional relay loop. Never returns under normal operation; it is driven to completion by cancellation from [`associate`].
src/udp.rs:77
Function
submit_credentials
(stream: &mut TcpStream, user: &[u8], pass: &[u8])
tests/integration.rs:228
Function
udp_associate_relays_datagram
()
tests/integration.rs:176
Function
wait_until_closed
Resolve once the control connection is half-closed or errors. The client is not expected to send anything on it during the association, so any receive
src/udp.rs:66