ProxyServer
open class ProxyServer: NSObject, TunnelDelegate
The base proxy server class.
This proxy does not listen on any port.
-
The port of proxy server.
Declaration
Swift
open let port: Port -
The address of proxy server.
Declaration
Swift
open let address: IPAddress? -
The type of the proxy server.
This can be set to anything describing the proxy server.
Declaration
Swift
open let type: String -
The description of proxy server.
Declaration
Swift
open override var description: String -
Undocumented
Declaration
Swift
open class ProxyServer: NSObject, TunnelDelegate -
Undocumented
Declaration
Swift
open class ProxyServer: NSObject, TunnelDelegate -
Start the proxy server.
Throws
The error occured when starting the proxy server.Declaration
Swift
open func start() throws -
Stop the proxy server.
Declaration
Swift
open func stop() -
Delegate method when the proxy server accepts a new ProxySocket from local.
When implementing a concrete proxy server, e.g., HTTP proxy server, the server should listen on some port and then wrap the raw socket in a corresponding ProxySocket subclass, then call this method.
Declaration
Swift
func didAcceptNewSocket(_ socket: ProxySocket)Parameters
socketThe accepted proxy socket.
-
Delegate method when a tunnel closed. The server will remote it internally.
Declaration
Swift
func tunnelDidClose(_ tunnel: Tunnel)Parameters
tunnelThe closed tunnel.
View on GitHub
ProxyServer Class Reference