(secret_key, verbose_mode)
| 112 | s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) |
| 113 | try: |
| 114 | # Use a public DNS server to find the most likely outbound IP |
| 115 | s.connect(('8.8.8.8', 80)) |
| 116 | IP = s.getsockname()[0] |
| 117 | except Exception: |
| 118 | IP = '127.0.0.1' |
| 119 | finally: |
| 120 | s.close() |
| 121 | return IP |
| 122 | |
| 123 | def start_server_process(secret_key, verbose_mode, allow_lan=False): |