Przeglądaj źródła

Update 'README.md'

Andrej Studen 2 lat temu
rodzic
commit
49989efabd
1 zmienionych plików z 23 dodań i 0 usunięć
  1. 23 0
      README.md

+ 23 - 0
README.md

@@ -20,3 +20,26 @@ Run `open_port.sh` to modify firewall to accept connection on the designated por
 
 Run `start.sh` to start the server. Look for output/log at `$HOME/logs/socketServer.log`.
 
+### Debugging
+
+#### Open port
+
+To check whether packets from client reach the host, use 
+
+```bash
+tcpdump 'sudo tcpdump -i enp68s0 'tcp port 8000' -v
+```
+
+This prints traffic to port 8000, say. Also helpful for determining actual IP address of the request; sometimes the actual source is behind a firewall and the IP could be mangled.
+
+This address should be added to the `$IPCLIENT` address list in `env.sh` for `open_port.sh` to allow connections.
+
+#### Allowed origins
+
+Websockets further limits allowed connections to clients listed in `websocketServer.py`. The origin is part of the `send.py` makeup - adjust it so that `websocketServer.py` will take it as trustworthy. 
+
+The error associated with mis-configuration is 
+
+```bash
+websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 403
+```