Skip to content
This repository was archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyLearnsToCode authored and yuchanns committed May 13, 2024
1 parent a534ab8 commit b9f6da3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions src/client/repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,13 @@ export const getIPAll = async (
}

function splitIpPort(address: string): [string, string] {
// 首先检查是否IPv6
// check if the address is IPv6
const bracketRegex = /^\[(.*?)]:(\d+)$/;
const v6match = address.match(bracketRegex);
if (v6match) {
return [v6match[1], v6match[2]];
}

// 否则,将地址视为IPv4
const [ip, port] = address.split(":");
return [ip, port];
}
Expand Down
1 change: 0 additions & 1 deletion src/server/sub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const sub = async (
best: boolean, subType: SubType,
proxyFormat: ProxyFormat, isAndroid: boolean,
) => {
// TODO: support IPv6
let ips = await getIPAll(env, randomName)
if (ips.length == 0) {
ips = generateDefaultIPv4()
Expand Down

0 comments on commit b9f6da3

Please sign in to comment.