Closed chenfengfeng closed 4 years ago
我想实现的效果是服务器收到的tcp请求,都是ip的请求,而不是现在http的请求。
比如我现在打开一个网页,那么我使用TUNInterface接收到的tcp数据,想实现传到服务器的,也是ip地址,而不是http的域名。 tcp/ip的上一层是http,我的猜想packetFlow拿到的数据应该也是ip加端口的模式吧。
对了,目前的情况是这样的,只有80或者443端口,服务器那边拿到的是域名,其他端口,tcp socket链接的服务器拿到的是ip+端口。
我可能解释的比较乱,不知道能不能理解我的意思
如果使用NEProxySettings的配置的话,是可以全部IP的方式去连接的
https://developer.apple.com/documentation/networkextension/nepackettunnelflow
读出来的就是你要的,直接发过去就好了
我想实现的效果是服务器收到的tcp请求,都是ip的请求,而不是现在http的请求。
比如我现在打开一个网页,那么我使用TUNInterface接收到的tcp数据,想实现传到服务器的,也是ip地址,而不是http的域名。 tcp/ip的上一层是http,我的猜想packetFlow拿到的数据应该也是ip加端口的模式吧。
对了,目前的情况是这样的,只有80或者443端口,服务器那边拿到的是域名,其他端口,tcp socket链接的服务器拿到的是ip+端口。
我可能解释的比较乱,不知道能不能理解我的意思