Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
0ba42fc0
Commit
0ba42fc0
authored
Feb 28, 2026
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check-vpn-status: add Cloudflare WARP detection via warp-cli status
Co-Authored-By:
Claude Opus 4.6
<
noreply@anthropic.com
>
parent
42146ceb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
check-vpn-status.sh
router/check-vpn-status.sh
+11
-0
No files found.
router/check-vpn-status.sh
View file @
0ba42fc0
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
# OpenConnect — process alive + vpns/tun interface UP
# OpenConnect — process alive + vpns/tun interface UP
# AmneziaWG/WireGuard — awg0/wg0 interface UP + recent handshake
# AmneziaWG/WireGuard — awg0/wg0 interface UP + recent handshake
# Xray — process alive + listening on SOCKS port
# Xray — process alive + listening on SOCKS port
# Cloudflare WARP — warp-cli status → Connected
#
#
# Install: copy to /usr/local/bin/check-vpn-status.sh
# Install: copy to /usr/local/bin/check-vpn-status.sh
# Telegraf config (add to existing telegraf.conf):
# Telegraf config (add to existing telegraf.conf):
...
@@ -103,6 +104,16 @@ if pgrep -x xray >/dev/null 2>&1; then
...
@@ -103,6 +104,16 @@ if pgrep -x xray >/dev/null 2>&1; then
exit
0
exit
0
fi
fi
# --- Cloudflare WARP ---
if
pgrep
-x
warp-svc
>
/dev/null 2>&1
;
then
if
warp-cli
--accept-tos
status 2>/dev/null |
grep
-q
'Status update: Connected'
;
then
echo
'vpn_status type="warp",connected=1i'
else
echo
'vpn_status type="warp",connected=0i'
fi
exit
0
fi
# --- GRE ---
# --- GRE ---
if
ip
link
show gre1
>
/dev/null 2>&1
;
then
if
ip
link
show gre1
>
/dev/null 2>&1
;
then
# GRE is stateless — link UP is the only reliable indicator
# GRE is stateless — link UP is the only reliable indicator
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment