zhuhaow / NEKit

A toolkit for Network Extension Framework
https://zhuhaow.github.io/NEKit
BSD 3-Clause "New" or "Revised" License
2.84k stars 670 forks source link

How to create socket5 TLS connection via VPN ? #231

Closed dddeee2004 closed 5 years ago

zhuhaow commented 5 years ago

Check how HTTPSAdapter is implemented

dddeee2004 commented 5 years ago

Thank you ,Now I am using SecureHTTPAdapter for the TLS proxy servery,but I can not find where the certificate set,here is my code for your reference: let auth = NEKit.HTTPAuthentication.init(username: "", password: "") let securtehttpadapter = SecureHTTPAdapterFactory.init(serverHost: "10.168.1.243", serverPort: 8801, auth: auth)

服务器端会报错: 2019/03/19 13:51:01 handshake fail, ERR: new methods request fail,ERR: remote error: tls: unknown certificate 应该是证书没有。请问如何设置证书?谢谢