-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve stability of finding server port
- Loading branch information
1 parent
06e40eb
commit e3e62d3
Showing
2 changed files
with
4 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
__author__ = "duc_tin" | ||
__copyright__ = "Copyright 2015+, duc_tin" | ||
__license__ = "GPLv2" | ||
__version__ = "1.0" | ||
__version__ = "1.20" | ||
__maintainer__ = "duc_tin" | ||
__email__ = "[email protected]" | ||
|
||
|
@@ -58,7 +58,7 @@ def __init__(self, data): | |
self.proto = 'tcp' if '\r\nproto tcp\r\n' in self.config_data else 'udp' | ||
port = re.findall('remote .+ \d+', self.config_data) | ||
if not port: | ||
self.port = 0 | ||
self.port = '0' | ||
else: | ||
self.port = port[0].split()[-1] | ||
|
||
|
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
__author__ = "duc_tin" | ||
__copyright__ = "Copyright 2015+, duc_tin" | ||
__license__ = "GPLv2" | ||
__version__ = "1.1" | ||
__version__ = "1.20" | ||
__maintainer__ = "duc_tin" | ||
__email__ = "[email protected]" | ||
|
||
|
@@ -59,11 +59,10 @@ def __init__(self, data): | |
self.proto = 'tcp' if '\r\nproto tcp\r\n' in self.config_data else 'udp' | ||
port = re.findall('remote .+ \d+', self.config_data) | ||
if not port: | ||
self.port = 0 | ||
self.port = '0' | ||
else: | ||
self.port = port[0].split()[-1] | ||
|
||
|
||
def write_file(self, use_proxy='no', proxy=None, port=None): | ||
txt_data = self.config_data | ||
if use_proxy == 'yes': | ||
|