MCPcopy Create free account

hub / github.com/WANG-lp/socks5-rs / functions

Functions43 in github.com/WANG-lp/socks5-rs

↓ 8 callersFunctionsend_reply
Send a SOCKS5 reply: `VER REP RSV ATYP BND.ADDR BND.PORT`.
src/protocol.rs:188
↓ 8 callersFunctionstart_proxy
(config: Config)
tests/integration.rs:21
↓ 8 callersFunctionwith_timeout
Run a future with a hard deadline so a protocol bug fails fast.
tests/integration.rs:107
↓ 7 callersFunctionunspecified
`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 callersFunctionread_reply
Read a reply (`VER REP RSV ATYP BND.ADDR BND.PORT`) and return (REP, BND).
tests/integration.rs:81
↓ 5 callersFunctiongreet_no_auth
(stream: &mut TcpStream)
tests/integration.rs:56
↓ 5 callersFunctionwrite_request_ipv4
(stream: &mut TcpStream, cmd: u8, addr: SocketAddr)
tests/integration.rs:63
↓ 3 callersFunctionauth_config
()
tests/integration.rs:221
↓ 3 callersFunctionencode_socket_addr
Append the ATYP + ADDR + PORT encoding of a concrete socket address.
src/protocol.rs:172
↓ 3 callersFunctionshort
()
src/protocol.rs:167
↓ 3 callersFunctionstart_tcp_echo
()
tests/integration.rs:30
↓ 2 callersMethodparse
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 callersFunctionserve
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 callersFunctionassociate
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 callersFunctionauthenticate
RFC 1929 username/password verification.
src/connection.rs:115
↓ 1 callersFunctionconnect_target
Connect to a target, trying every resolved address for a host name.
src/connection.rs:207
↓ 1 callersFunctionhandle
Drive a single client connection to completion.
src/connection.rs:46
↓ 1 callersFunctionhandle_connect
Execute a CONNECT request and, on success, splice the two streams together.
src/connection.rs:172
↓ 1 callersFunctionmap_connect_error
Map an outbound connection error to the closest SOCKS5 reply code.
src/connection.rs:227
↓ 1 callersFunctionnegotiate
Method-selection greeting plus, if configured, the auth sub-negotiation.
src/connection.rs:77
↓ 1 callersFunctionread_request
Read `VER CMD RSV ATYP DST.ADDR DST.PORT`.
src/connection.rs:150
↓ 1 callersMethodresolve_first
Resolve to a single socket address, performing DNS for host names.
src/protocol.rs:150
↓ 1 callersFunctionstart_udp_echo
()
tests/integration.rs:44
↓ 1 callersFunctionwrite_request_domain
(stream: &mut TcpStream, cmd: u8, host: &str, port: u16)
tests/integration.rs:73
Functionauth_failure_is_rejected
()
tests/integration.rs:272
Functionauth_required_but_only_no_auth_offered
()
tests/integration.rs:286
Functionauth_success_then_connect
()
tests/integration.rs:248
Functionbind_command_is_not_supported
()
tests/integration.rs:302
Functionconnect_ipv4_relays_data
()
tests/integration.rs:116
Functionconnect_refused_maps_to_reply
()
tests/integration.rs:156
Functionconnect_via_domain_name
()
tests/integration.rs:136
Methoddefault
()
src/connection.rs:31
Methodencode
Append the ATYP + ADDR + PORT encoding of this address to `buf`.
src/protocol.rs:137
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/protocol.rs:159
Functionforward_to_client
Wrap a target's reply in a SOCKS5 UDP header and deliver it to the client.
src/udp.rs:175
Functionforward_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
Functionmain
()
src/main.rs:42
Methodread_from
Read an ATYP-prefixed address (ADDR + PORT) from an async stream.
src/protocol.rs:63
Functionrecv_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
Functionrelay
The bidirectional relay loop. Never returns under normal operation; it is driven to completion by cancellation from [`associate`].
src/udp.rs:77
Functionsubmit_credentials
(stream: &mut TcpStream, user: &[u8], pass: &[u8])
tests/integration.rs:228
Functionudp_associate_relays_datagram
()
tests/integration.rs:176
Functionwait_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