You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main.py
+33-10Lines changed: 33 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -2,24 +2,26 @@
2
2
3
3
importargparse
4
4
importasyncio
5
-
importrandom
6
5
importlogging
7
6
importos
8
-
importsys
9
-
fromurllib.requestimporturlopen, Request
10
-
fromurllib.errorimportURLError
7
+
importrandom
11
8
importssl
12
-
fromdatetimeimportdatetime
9
+
importsys
10
+
importtextwrap
13
11
importtime
14
12
importtraceback
15
13
16
-
__version__="1.9"
17
-
18
-
os.system("")
14
+
fromurllib.errorimportURLError
15
+
fromdatetimeimportdatetime
16
+
fromurllib.requestimporturlopen, Request
19
17
20
18
ifsys.platform=="win32":
21
19
importwinreg
22
20
21
+
__version__="1.9"
22
+
23
+
os.system("")
24
+
23
25
24
26
classConnectionInfo:
25
27
""" Class to store connection information """
@@ -154,7 +156,7 @@ async def run(self):
154
156
method.
155
157
"""
156
158
157
-
self.print_banner()
159
+
self.print_info()
158
160
ifnotself.quiet:
159
161
asyncio.create_task(self.display_stats())
160
162
try:
@@ -170,10 +172,31 @@ async def run(self):
170
172
asyncio.create_task(self.cleanup_tasks())
171
173
awaitself.server.serve_forever()
172
174
173
-
defprint_banner(self):
175
+
defprint_info(self):
174
176
"""
175
177
Print a banner with the NoDPI logo and information about the proxy.
176
178
"""
179
+
ifsys.platform=="win32":
180
+
os.system("mode con: cols=130")
181
+
182
+
console_width=os.get_terminal_size().columns
183
+
disclaimer="""DISCLAIMER. The developer and/or supplier of this software shall not be liable for any loss or damage, including but not limited to direct, indirect, incidental, punitive or consequential damages arising out of the use of or inability to use this software, even if the developer or supplier has been advised of the possibility of such damages. The developer and/or supplier of this software shall not be liable for any legal consequences arising out of the use of this software. This includes, but is not limited to, violation of laws, rules or regulations, as well as any claims or suits arising out of the use of this software. The user is solely responsible for compliance with all applicable laws and regulations when using this software."""
0 commit comments