Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #59 from Kikobeats/patch-1
Browse files Browse the repository at this point in the history
fix: remove : from the cases
  • Loading branch information
Kikobeats authored Jun 8, 2021
2 parents 8ed8efa + f2b1d89 commit a2547a4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ function parseSocksProxy(
// figure out if we want socks v4 or v5, based on the "protocol" used.
// Defaults to 5.
if (opts.protocol) {
switch (opts.protocol) {
case 'socks4:':
switch (opts.protocol.replace(':', '')) {
case 'socks4':
lookup = true;
// pass through
case 'socks4a:':
case 'socks4a':
type = 4;
break;
case 'socks5:':
case 'socks5':
lookup = true;
// pass through
case 'socks:': // no version specified, default to 5h
case 'socks5h:':
case 'socks': // no version specified, default to 5h
case 'socks5h':
type = 5;
break;
default:
Expand Down

0 comments on commit a2547a4

Please sign in to comment.