-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor(service): make calls more generic * fix(interfaces): make inbounds a list * fix(marznode): backends should be a dictionary * fixes and improvements * feat(backends): version * refactor(xray-config): make it swallow errors * feat(backends): add backend stats to check if a backend is running * feat(hysteria): send empty bytes in case of eof * fix(service): give the backend configuration correctly * fix(xray): close the stream on after reading eof/start when starting xray * fix(hysteria): restarting * fix(service): restarting a backend correctly * improve(backend-restart): make backends save their config, and acquire a lock for restarting
- Loading branch information
1 parent
f8280e9
commit e44d93b
Showing
17 changed files
with
520 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import re | ||
import subprocess | ||
|
||
|
||
def get_version(hysteria_path: str) -> str | None: | ||
""" | ||
get xray version by running its executable | ||
:param hysteria_path: | ||
:return: xray version | ||
""" | ||
cmd = [hysteria_path, "version"] | ||
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode() | ||
pattern = r"Version:\s*v(\d+\.\d+\.\d+)" | ||
match = re.search(pattern, output) | ||
if match: | ||
return match.group(1) | ||
else: | ||
return None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.