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

Commit

Permalink
fix: remove : from the cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats authored Jun 6, 2021
1 parent 8ed8efa commit f2b1d89
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 f2b1d89

Please sign in to comment.