Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: added tests for WebSocket over Socks proxy (#7235)
- Loading branch information
Showing
6 changed files
with
92 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
declare module 'socksv5' { | ||
import type net from 'net'; | ||
|
||
class Auth { } | ||
|
||
class SocksServer { | ||
listen: net.Server['listen']; | ||
useAuth(auth: Auth): void; | ||
close: net.Server['close']; | ||
} | ||
|
||
type Info = { | ||
srcAddr: string; | ||
srcPort: number; | ||
dstAddr: string; | ||
dstPort: number; | ||
} | ||
|
||
function acceptHandler(intercept: true): net.Socket | undefined; | ||
function acceptHandler(intercept: false): undefined; | ||
export function createServer(cb: (info: Info, accept: typeof acceptHandler, deny: () => void) => void): SocksServer; | ||
|
||
export const auth: { | ||
None: () => Auth | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters