Skip to content

Commit

Permalink
Update _worker.js
Browse files Browse the repository at this point in the history
  • Loading branch information
amclubs authored Nov 5, 2024
1 parent 087b144 commit daefe2d
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions _worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,11 @@ export default {
if (PROXYIP) {
if (httpPattern.test(PROXYIP)) {
let ipUrlTxtAndCsv;
if (PROXYIP.endsWith('.txt')) {
ipUrlTxtAndCsv = await getIpUrlTxtAndCsv(noTLS, PROXYIP, null);

} else if (PROXYIP.endsWith('.csv')) {
if (PROXYIP.endsWith('.csv')) {
ipUrlTxtAndCsv = await getIpUrlTxtAndCsv(noTLS, null, PROXYIP);

} else {
return new Response("PROXYIP是无效的文件类型:", {
headers: {
'Content-Type': 'text/html; charset=UTF-8',
'referer': 'https://www.google.com/search?q=AM科技',
},
});
ipUrlTxtAndCsv = await getIpUrlTxtAndCsv(noTLS, PROXYIP, null);
}
const uniqueIpTxt = [...new Set([...ipUrlTxtAndCsv.txt, ...ipUrlTxtAndCsv.csv])];
proxyIP = uniqueIpTxt[Math.floor(Math.random() * uniqueIpTxt.length)];
Expand Down

0 comments on commit daefe2d

Please sign in to comment.