-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Port of Fake Webserver #15
Comments
the camera only tries to connect to port 80. If you want to use a different port you can either redirect the connection to the chosen port via TCP rules or run a reverse proxy on port 80 pointing to your desired port, e.g.to use port 9900 set nginx like this:
|
Thanks for your fast answer, i haven't thought about writing a nginx entry for the Edit: found this in nginx log:
i was using port 82 instead of 9900 (of course in reverse proxy settings too), but that shouldn't change anything. |
You need to change the HTTP_PORT setting in both src/v720_http.py and src/fake_srv.py, and set the same port in the nginx proxy_pass directive, then check if you can connect to the port you chose using a browser like. Using port 82 needs root privileges to the user running the python3 command, that's a "low" port. Your error message says it failed connecting to port 82 and you said you put the server on port 9900. Double check your configs are coherent then tell nginx to reload the configuration and restart the python3 server |
Sorry, still doesn't work. I retried with port 9900. The nginx error from the log appeared only, after my python server process was closed, so some signal must have found its way to the process. Yet, still no "Found device" appears with this setup. To summarize:
I ran the python-script with root and without root, both with the same outcome. Port 9900 is open, according to nmap. As soon as i use the unchanged scripts and disable my nginx process, everything works as intended and the cam shows up... |
Well, you need to by steps. Start everything then try to connect from same machine where the server runs to http://127.0.0.1/:<your_port>/dev/list If this works then the server is up and running, next step, check if nginx is doing his job well. If this displays the list of devices, even empty, means that nginx is ok too. If once proving that both are ok the cam stil does not connect start the server with For me it works, so the problem should not be in the method, just in the implementation. |
Yes, the nginx is up and running and shows [] under devlist.
Yet there is still no connection... I also tried shutting down my nginx and running a clean docker nginx with only the provided server-block. Same outcome. No difference with the latest version, which included your push. Sooner or later i will check with another device and another network. EDIT: i made it work by using another device. First i was testing it on my main Computer, which is running Manjaro. My second device uses debian, everything worked on the first try with it. I am still curious about the reason, why it didn't work. But as my problem is solved, i will now close the issue. Thanks for your help! |
Heyhey, very neat work! Everything works as intended for me. As far as i've understood, you created an extra distinct AP for the camera. I chose to connect it to my main network and block internet access through the router.
Is it possible to use a different port for the webserver? I tried to change the Port in
src/v720_http.py
(andsrc/fake_srv.py
), but when i run the server withpython3 src/a9_naxclow.py -s
, i get an open port and a running webserver, but no Found Device.Thanks for any help!
The text was updated successfully, but these errors were encountered: