Replace NEKit dependency with reduced subset
This commit is contained in:
24
GlassVPN/zhuhaow-NEKit/ProxyServer/GCDHTTPProxyServer.swift
Executable file
24
GlassVPN/zhuhaow-NEKit/ProxyServer/GCDHTTPProxyServer.swift
Executable file
@@ -0,0 +1,24 @@
|
||||
import Foundation
|
||||
|
||||
/// The HTTP proxy server.
|
||||
public final class GCDHTTPProxyServer: GCDProxyServer {
|
||||
/**
|
||||
Create an instance of HTTP proxy server.
|
||||
|
||||
- parameter address: The address of proxy server.
|
||||
- parameter port: The port of proxy server.
|
||||
*/
|
||||
override public init(address: IPAddress?, port: Port) {
|
||||
super.init(address: address, port: port)
|
||||
}
|
||||
|
||||
/**
|
||||
Handle the new accepted socket as a HTTP proxy connection.
|
||||
|
||||
- parameter socket: The accepted socket.
|
||||
*/
|
||||
override public func handleNewGCDSocket(_ socket: GCDTCPSocket) {
|
||||
let proxySocket = HTTPProxySocket(socket: socket)
|
||||
didAcceptNewSocket(proxySocket)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user