Maverick87Shaka Posted September 26, 2022 Share Posted September 26, 2022 1 hour ago, crow0827 said: Is there any plan to implement local network remote control function? It's too annoying to have to go all the way to the official DCS website to control dedicated server from the remote. You can actually grab the WebGui folder, copy to another computer in your local network. Edit the app.js in js folder and replace all the 127.0.0.1 url matching server url, and of course on server machine you need to allow traffic from the control port within the firewall. But personally, since it will be plain http traffic ( even if it's in your LAN only in theory ), i will not recommend this setup. FlighRIG => CPU: RyZen 5900x | RAM: 64GB Corsair 3000Mhz | GPU: nVIDIA RTX 4090 FE | OS Storage: SSD NVMe Samsung 850 Pro 512GB, DCS Storage: SSD NVMe Sabrent 1TB | Device: Multipurpose-UFC, VirPil T-50, TM WARTHOG Throttle, TrackHat, MFD Cougar with screen. Our Servers => [ITA] Banshee | Krasnodar - PvE | PersianConquest PvE Live Map&Stats | Syria Liberation PvE Conquest Support us on twitch subscribing with amazon prime account linked, it's free! Link to comment Share on other sites More sharing options...
crow0827 Posted October 30, 2022 Share Posted October 30, 2022 On 9/27/2022 at 2:09 AM, Maverick87Shaka said: You can actually grab the WebGui folder, copy to another computer in your local network. Edit the app.js in js folder and replace all the 127.0.0.1 url matching server url, and of course on server machine you need to allow traffic from the control port within the firewall. I tried it with disabled firewall. Server did not respond. Could you try it? Link to comment Share on other sites More sharing options...
Maverick87Shaka Posted October 30, 2022 Share Posted October 30, 2022 16 minutes ago, crow0827 said: I tried it with disabled firewall. Server did not respond. Could you try it? Not sure when was introduced but it looks like is not going to respond anymore from anything that is not localhost. in this scenario the only option that comes to my mind is a reverse proxy to masquerade request as localhost to the gameserver. Not a straightforward solution I know, but it should works, let me know if you want try in this way, I can try to prepare something FlighRIG => CPU: RyZen 5900x | RAM: 64GB Corsair 3000Mhz | GPU: nVIDIA RTX 4090 FE | OS Storage: SSD NVMe Samsung 850 Pro 512GB, DCS Storage: SSD NVMe Sabrent 1TB | Device: Multipurpose-UFC, VirPil T-50, TM WARTHOG Throttle, TrackHat, MFD Cougar with screen. Our Servers => [ITA] Banshee | Krasnodar - PvE | PersianConquest PvE Live Map&Stats | Syria Liberation PvE Conquest Support us on twitch subscribing with amazon prime account linked, it's free! Link to comment Share on other sites More sharing options...
crow0827 Posted October 30, 2022 Share Posted October 30, 2022 Thanks for the quick reply. If it goes through easily with a reverse proxy, I'd be willing to give it a try. It is too much of a burden on the server host if other members cannot access the server management screen when they want to run a server in the community. I don't want to allow the RDP of the server machine to all community members. Link to comment Share on other sites More sharing options...
Maverick87Shaka Posted October 30, 2022 Share Posted October 30, 2022 (edited) 1 hour ago, crow0827 said: I don't want to allow the RDP of the server machine to all community members. This is a good approach, and it's also a really common best practice to do, not only for DCS server 1 hour ago, crow0827 said: If it goes through easily with a reverse proxy, I'd be willing to give it a try. I make a quick and dirty test right now with ngnix used as reverse proxy, and it works, here the steps: Open on DCS game server firewall a TCP port to be used by reverse proxy ( in my test 9087, listen directive ). Configure ngnix to reverse proxy incoming request to the webgui_port specified in the autoexec.cfg file of the server ( in my test 9087 => 8087 ) Here the basic ngnix.conf file: #user nobody; worker_processes 2; error_log logs/error.log debug; pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; index index.html index.htm index.php; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] $status ' '"$request" $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log logs/access.log main; sendfile on; tcp_nopush on; server_names_hash_bucket_size 128; # this seems to be required for some vhosts server { # simple reverse-proxy listen 9087; access_log logs/reverse-proxy.access.log main; # pass requests for dynamic content location / { proxy_buffering off; proxy_pass http://127.0.0.1:8087; } } } Copy the WebGUI folder and edit app.js to point at reverse proxy address and port Since the ngnix server is also a web server, instead of copy webgui folder and use it locally, you can also try to directly host the webgui folder with ngnix, so basically from a user prospective, they just need to connect to a given URL without worrying about grab the webgui folder and other stuff, they can also ignore all the port configuration, because basically you can change one time, and it will be immediately apply for all the DCS server admin/moderator. Let me say, since ngnix is already running, this last option can be a definitely good idea, protecting the url with password, ip whitelist etc. Edited October 30, 2022 by Maverick87Shaka FlighRIG => CPU: RyZen 5900x | RAM: 64GB Corsair 3000Mhz | GPU: nVIDIA RTX 4090 FE | OS Storage: SSD NVMe Samsung 850 Pro 512GB, DCS Storage: SSD NVMe Sabrent 1TB | Device: Multipurpose-UFC, VirPil T-50, TM WARTHOG Throttle, TrackHat, MFD Cougar with screen. Our Servers => [ITA] Banshee | Krasnodar - PvE | PersianConquest PvE Live Map&Stats | Syria Liberation PvE Conquest Support us on twitch subscribing with amazon prime account linked, it's free! Link to comment Share on other sites More sharing options...
crow0827 Posted October 31, 2022 Share Posted October 31, 2022 Maverick I tested the procedure. It works well. Thanks. With hosting web server, I could not understand detail of the operation. Is it completely different from the reverse proxy method? I just hosted the webgui folder and the javascript seems to be working, but it looks the same as when I don't use reverse proxy. Link to comment Share on other sites More sharing options...
Maverick87Shaka Posted October 31, 2022 Share Posted October 31, 2022 (edited) 10 hours ago, crow0827 said: Maverick I tested the procedure. It works well. Thanks. With hosting web server, I could not understand detail of the operation. Is it completely different from the reverse proxy method? I just hosted the webgui folder and the javascript seems to be working, but it looks the same as when I don't use reverse proxy. You actuality need both, if you only use the webgui folder hosting you'll get the same error of trying to use webgui folder locally from any other computer. Reverse-proxy is required to make DCS believe the request comes from the same machine (127.0.0.1), otherwise it will not reply to the request. The method to host the webgui folder just give you more options to control who can actually use that url that you'll provide, you can track the log etc, gives you more options that simply provide a .zip file to your moderators/admins. Even just for any future change, without send over modified javascript again, you just take care of update webgui folder hosted by yourself, and you're ready to go! Edited October 31, 2022 by Maverick87Shaka FlighRIG => CPU: RyZen 5900x | RAM: 64GB Corsair 3000Mhz | GPU: nVIDIA RTX 4090 FE | OS Storage: SSD NVMe Samsung 850 Pro 512GB, DCS Storage: SSD NVMe Sabrent 1TB | Device: Multipurpose-UFC, VirPil T-50, TM WARTHOG Throttle, TrackHat, MFD Cougar with screen. Our Servers => [ITA] Banshee | Krasnodar - PvE | PersianConquest PvE Live Map&Stats | Syria Liberation PvE Conquest Support us on twitch subscribing with amazon prime account linked, it's free! Link to comment Share on other sites More sharing options...
crow0827 Posted November 1, 2022 Share Posted November 1, 2022 I kind of know what to do. But I didn't know how to write the correct configuration file. I need to study up a little. Link to comment Share on other sites More sharing options...
Maverick87Shaka Posted November 1, 2022 Share Posted November 1, 2022 47 minutes ago, crow0827 said: I kind of know what to do. But I didn't know how to write the correct configuration file. I need to study up a little. Let me know if you need help, I can try to prepare a package with everything you need ( host + reverse proxy ) packed to run from ngnix. Put the zip on DCS server, run ngnix and you have everything Fly Safe FlighRIG => CPU: RyZen 5900x | RAM: 64GB Corsair 3000Mhz | GPU: nVIDIA RTX 4090 FE | OS Storage: SSD NVMe Samsung 850 Pro 512GB, DCS Storage: SSD NVMe Sabrent 1TB | Device: Multipurpose-UFC, VirPil T-50, TM WARTHOG Throttle, TrackHat, MFD Cougar with screen. Our Servers => [ITA] Banshee | Krasnodar - PvE | PersianConquest PvE Live Map&Stats | Syria Liberation PvE Conquest Support us on twitch subscribing with amazon prime account linked, it's free! Link to comment Share on other sites More sharing options...
crow0827 Posted November 3, 2022 Share Posted November 3, 2022 (edited) Thank you for your support. I configured as below. DCS server/nginx server: 192.xxx.xxx.100 (example) DCS port 8089: webgui port nginx port 80: hosting C:¥nginx/html/index.html (copied webgui into C:¥nginx/html) webgui app.js: ip: 192.xxx.xxx.100 and port: 8088 are configured in js/app.js nginx port 8088: proxy pass to 127.0.0.1:8089 I checked that the nginx server is working properly and is able to display the webgui page. But, some of 404 errors are displayed on F12 Developper tool. errors are below. &ACTION=GetJSONData: This item is not displayed when accessed from shared webgui folder. encryptedRequest: Requested URL is different from when accessed from shared webgui folder. from hosted page: Requested URL = http://192.xxx.xxx.100/:8088/encryptedRequest from shared webgui folder: Requested URL = http://192.xxx.xxx.100:8088/encryptedRequest I'm in the dark as to whether this difference in behavior is affecting or whether the configuration file is incorrect. nginx configuration file: deleted I found my mistake. I had rewritten 127.0.0.1 to the server address, but not localhost. It is cause of error. After rewrite app.js, web hosted webgui is working well. I know I'm repeating myself, but thanks for your support!!! Note: procedure Rewrite "127.0.0.1" and "localhost" to DCS server address in the "app.js". Rewrite "8088" to reverse proxy port in the "app.js". Launch nginx with webgui and reverse proxy(transport to DCS webgui port). Edited November 3, 2022 by crow0827 Link to comment Share on other sites More sharing options...
craft Posted May 8, 2023 Share Posted May 8, 2023 (edited) Run index.html of webGUI directly is ok, but use http://127.0.0.1:8087 in browser of DCS server is not working; but http://localhost is working, So even i use ipadress to reverse proxy, it is not working and localhost can not use for reverse proxy. How can resolve this problem? Edited May 8, 2023 by craft [sIGPIC]https://forums.eagle.ru/signaturepics/sigpic131197_1.gif[/sIGPIC] http://www.3gofly.com Link to comment Share on other sites More sharing options...
Maverick87Shaka Posted May 8, 2023 Share Posted May 8, 2023 5 hours ago, craft said: Run index.html of webGUI directly is ok, but use http://127.0.0.1:8087 in browser of DCS server is not working; but http://localhost is working, So even i use ipadress to reverse proxy, it is not working and localhost can not use for reverse proxy. How can resolve this problem? What are you talking about? DCS Server doesn't have any embedded webserver FlighRIG => CPU: RyZen 5900x | RAM: 64GB Corsair 3000Mhz | GPU: nVIDIA RTX 4090 FE | OS Storage: SSD NVMe Samsung 850 Pro 512GB, DCS Storage: SSD NVMe Sabrent 1TB | Device: Multipurpose-UFC, VirPil T-50, TM WARTHOG Throttle, TrackHat, MFD Cougar with screen. Our Servers => [ITA] Banshee | Krasnodar - PvE | PersianConquest PvE Live Map&Stats | Syria Liberation PvE Conquest Support us on twitch subscribing with amazon prime account linked, it's free! Link to comment Share on other sites More sharing options...
craft Posted May 8, 2023 Share Posted May 8, 2023 if DCS server doesn't have embedded webserver, I don't know why i can enter WEBGUI through http://localhost; I setup a nginx in DCS server according to the procedure mentioned above post, but it is not working, the error 404 reported; Is it because the app. js modification was incorrect ?Can you please provide a detailed description of the modifications to the app. js file? [sIGPIC]https://forums.eagle.ru/signaturepics/sigpic131197_1.gif[/sIGPIC] http://www.3gofly.com Link to comment Share on other sites More sharing options...
HC_Official Posted May 8, 2023 Share Posted May 8, 2023 (edited) If I want to connect to mine locally (as in on same PC) I use file:///PATH TO DCS SERVER FOLDER/WebGUI/index.html Edited June 12, 2023 by HC_Official No more pre-orders Click here for tutorials for using Virpil Hardware and Software Click here for Virpil Flight equipment dimensions and pictures. . Link to comment Share on other sites More sharing options...
craft Posted June 12, 2023 Share Posted June 12, 2023 On 11/2/2022 at 12:59 AM, Maverick87Shaka said: Let me know if you need help, I can try to prepare a package with everything you need ( host + reverse proxy ) packed to run from ngnix. Put the zip on DCS server, run ngnix and you have everything Fly Safe Could you prepare a package with host + reverse proxy? My DCS server is after route through port map, I host the webgui + reverse proxy on the dcs server, Now within intranet webgui is work well, and cannot visit through internet. But it works through run WEBGUI file directly through change IP address and port of app.js to the domain name and reverse proxy port. [sIGPIC]https://forums.eagle.ru/signaturepics/sigpic131197_1.gif[/sIGPIC] http://www.3gofly.com Link to comment Share on other sites More sharing options...
Recommended Posts