Skip to content
This repository was archived by the owner on Aug 16, 2025. It is now read-only.

Commit 29a4775

Browse files
author
RadKesvat
committed
support for isfaketls attribiute
1 parent 846d402 commit 29a4775

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tunnel.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ let ssl_ctx = newContext(verifyMode = CVerifyPeer)
1717

1818
proc ssl_connect(con: Connection, ip: string, port: int, sni: string){.async.} =
1919
wrapSocket(ssl_ctx, con.socket)
20+
con.isfakessl = true
2021
var fc = 0
2122
while true:
2223
if fc > 6:
@@ -64,6 +65,7 @@ proc poolFrame(count : uint = 0) =
6465
if globals.log_conn_create: echo &"[createNewCon] registered a new connection to the pool"
6566
context.outbound.register con
6667
)
68+
6769

6870
var i = context.outbound.connections.len()
6971
while i.uint32 < (if count == 0 :globals.pool_size else: count):
@@ -87,8 +89,6 @@ proc processConnection(client: Connection) {.async.} =
8789
if globals.log_conn_destory: echo "[processRemote] closed client & remote"
8890
client.close()
8991
if not remote.isNil():
90-
if remote.isTrusted:
91-
remote.socket.isSsl = true
9292
remote.close()
9393

9494

0 commit comments

Comments
 (0)