pub struct RemoteNetstack { /* private fields */ }Expand description
Async LazyCat RemoteSocks network stack.
Implementations§
Source§impl RemoteNetstack
impl RemoteNetstack
Sourcepub fn new(hserver: HServerClient, location: impl Into<RemoteLocation>) -> Self
pub fn new(hserver: HServerClient, location: impl Into<RemoteLocation>) -> Self
Resolve proxy endpoints through HPortalSys for the requested location.
Sourcepub fn fixed(endpoint: RemoteSocksEndpoint) -> Self
pub fn fixed(endpoint: RemoteSocksEndpoint) -> Self
Use a fixed RemoteSocks proxy endpoint.
Sourcepub fn with_endpoint_resolver<F, Fut>(resolver: F) -> Self
pub fn with_endpoint_resolver<F, Fut>(resolver: F) -> Self
Use an asynchronous endpoint resolver compatible with the Go SDK’s dynamic address factory.
Sourcepub const fn with_dial_timeout(self, dial_timeout: Duration) -> Self
pub const fn with_dial_timeout(self, dial_timeout: Duration) -> Self
Override the default 60-second proxy connection deadline.
Source§impl RemoteNetstack
impl RemoteNetstack
Sourcepub async fn connect_tcp(
&self,
address: SocksAddress,
) -> Result<RemoteTcpStream, Error>
pub async fn connect_tcp( &self, address: SocksAddress, ) -> Result<RemoteTcpStream, Error>
Connect to a TCP or custom-network address through RemoteSocks.
§Errors
Returns endpoint resolution, proxy connection, SOCKS negotiation, or command reply errors.
Sourcepub async fn bind_tcp(
&self,
address: SocksAddress,
) -> Result<RemoteTcpListener, Error>
pub async fn bind_tcp( &self, address: SocksAddress, ) -> Result<RemoteTcpListener, Error>
Bind a TCP or custom-network listener through RemoteSocks.
This method waits for the first SOCKS BIND reply. Call
RemoteTcpListener::accept to wait for the second reply carrying the
connecting peer address.
§Errors
Returns endpoint resolution, proxy connection, SOCKS negotiation, or first-stage BIND reply errors.
Source§impl RemoteNetstack
impl RemoteNetstack
Sourcepub async fn udp_associate(
&self,
target: SocksAddress,
) -> Result<RemoteUdpSocket, Error>
pub async fn udp_associate( &self, target: SocksAddress, ) -> Result<RemoteUdpSocket, Error>
Create a standard RFC 1928 UDP association with a fixed default target.
The TCP control stream remains open for the lifetime of the returned
socket. Closing it causes receive operations to return
Error::RemoteSocksControlClosed.
§Errors
Returns endpoint resolution, SOCKS negotiation, relay address, socket binding, or control-stream errors.
Sourcepub async fn connect_udp(
&self,
target: SocksAddress,
) -> Result<RemoteUdpSocket, Error>
pub async fn connect_udp( &self, target: SocksAddress, ) -> Result<RemoteUdpSocket, Error>
Connect a UDP peer using the LazyCat 0xe2 stream extension.
Domain targets are resolved locally, matching the official Go SDK.
§Errors
Returns endpoint resolution, DNS, SOCKS negotiation, address, or framed transport errors.
Sourcepub async fn bind_udp(
&self,
address: SocksAddress,
) -> Result<RemoteUdpSocket, Error>
pub async fn bind_udp( &self, address: SocksAddress, ) -> Result<RemoteUdpSocket, Error>
Bind a UDP socket using the LazyCat 0xe3 stream extension.
Use RemoteUdpSocket::send_to and RemoteUdpSocket::recv_from with
the returned socket because it has no fixed peer.
§Errors
Returns endpoint resolution, DNS, SOCKS negotiation, address, or framed transport errors.
Trait Implementations§
Source§impl Clone for RemoteNetstack
impl Clone for RemoteNetstack
Auto Trait Implementations§
impl !RefUnwindSafe for RemoteNetstack
impl !UnwindSafe for RemoteNetstack
impl Freeze for RemoteNetstack
impl Send for RemoteNetstack
impl Sync for RemoteNetstack
impl Unpin for RemoteNetstack
impl UnsafeUnpin for RemoteNetstack
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request