mirror of
https://github.com/baoweise-bot/aimili-vpngate.git
synced 2026-09-07 08:46:44 +08:00
fix: handle EOF in input polling, add SSL cert path, reduce concurrent workers, and correct routing filter logic
This commit is contained in:
+3
-2
@@ -760,13 +760,14 @@ def getch():
|
||||
try:
|
||||
old_settings = termios.tcgetattr(fd)
|
||||
except termios.error:
|
||||
return sys.stdin.read(1)
|
||||
ch = sys.stdin.read(1)
|
||||
return ch if ch else "q"
|
||||
try:
|
||||
tty.setraw(sys.stdin.fileno())
|
||||
ch = sys.stdin.read(1)
|
||||
finally:
|
||||
termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
|
||||
return ch
|
||||
return ch if ch else "q"
|
||||
|
||||
def getch_timeout(timeout=1.0):
|
||||
import select
|
||||
|
||||
Reference in New Issue
Block a user