Skip to content

Commit

Permalink
support for isfaketls attribiute
Browse files Browse the repository at this point in the history
  • Loading branch information
RadKesvat committed Jun 17, 2023
1 parent 846d402 commit 29a4775
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tunnel.nim
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ let ssl_ctx = newContext(verifyMode = CVerifyPeer)

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


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


Expand Down

0 comments on commit 29a4775

Please sign in to comment.