Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
W
warp-script
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
MisakaNo の 小破站
warp-script
Commits
b0f9a5ca
Commit
b0f9a5ca
authored
11 months ago
by
MisakaNo の 小破站
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
e8f202d5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
warp.sh
+9
-11
9 additions, 11 deletions
warp.sh
with
9 additions
and
11 deletions
warp.sh
+
9
−
11
View file @
b0f9a5ca
...
...
@@ -228,21 +228,18 @@ check_endpoint() {
# 根据 VPS 的出站 IP 情况,生成对应的优选 Endpoint IP 段列表
check_ip
# 生成优选 Endpoint IP 文件
if
[[
-n
$ipv4
]]
;
then
yxprefix
=
""
else
yxprefix
=
"-ipv6"
fi
# 将生成的 IP 段列表放到 ip.txt 里,待程序优选
echo
${
temp
[@]
}
|
sed
-e
's/ /\n/g'
|
sort
-u
>
ip.txt
# 取消 Linux 自带的线程限制,以便生成优选 Endpoint IP
ulimit
-n
102400
# 给 Endpoint IP 优选工具赋予权限
chmod
+x warp
# 启动 WARP Endpoint IP 优选工具
chmod
+x warp
&&
./warp
$yxprefix
if
[[
-n
$ipv4
]]
;
then
./warp
else
./warp
-ipv6
fi
# 将 result.csv 文件的优选 Endpoint IP 提取出来,放置到 best_endpoint 变量中备用
best_endpoint
=
$(
cat
result.csv |
sed
-n
2p |
awk
-F
','
'{print $1}'
)
...
...
@@ -2222,6 +2219,7 @@ menu() {
show_info
echo
""
read
-rp
"请输入选项 [0-14]: "
menu_input
case
$menu_input
in
1
)
select_wgcf
;;
2
)
uninstall_wgcf
;;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment