Closed Bazimek closed 2 years ago
This is strange, i can connect without problems,
ensure that you aren't connecting with ssl, because if you are using https then you can't connect to a socket without ssl like rust server.
I have on my website https turned on but when I go to the website with Rust Monitor it automaticly go to http not https so it should work? But it is just do nothing when I click on connect.
neither shows the spinner of connection? check if in the chrome inspector (right click, inspect website), in the tab of networking, check if show an error connecting to your server IP.
I used this link http://rustmon.tandilserver.com/#/connector to connect to my server and works fine.
Can you send me your link to try connect to my server?
In the last update i added some features, but I don't touch the connection websocket code.
I have on my website https turned on but when I go to the website with Rust Monitor it automaticly go to http not https so it should work? But it is just do nothing when I click on connect.
Yes, if you use http:// without ssl even if you support ssl, then should work
check if you have web rcon enabled in rust server command line, rcon.web true
Yes I have like from rcon.io I can normally connect or with other rcon tools.
I can connect without problems :(
Can you test it from this rcon.gamearea.cz?
I can't access to that url without use ssl, because this page automatically redirect me to https:// with an invalid ssl.
If you have invalid ssl you are using SSL and i think, that is the problem i think.
let me create an update in order to try fix it.
Oh thank you for your work and help. :-) This is the best rcon tool and I love it.
Well I updated now the script adding instructions to connect from a website with https (in the connection page), but i'm not sure why your website automatically try to connect to a wss:// and this is making problems.
Try to fix your ssl and update the script in order to fix the problem.
If you have implemented new feature and you want to share with us, you can send me the source with new features and I will try to add that features to the project.
I added in the last updates (days ago), new features like, chat mute, and sub-menu to order the actions like add mods, and I added flags to see from where is the ip, and "tags" in server configuration popup.
I am using the last version from there, and the SSL is normally working on my website and other subwebsites. The website needs to be made for ssl/https. I have valid SSL certificate active on this domain.
but in this case, when i open your website I get an invalid ssl:
And your server is automatically adding this:
wss, but in the code says ws://
and in the tandilserver versions, i can connect and see connection to:
as you see, for an unknown reason, your website is adding wsS to the connection string, and that is strange, idk why that happens.
Yes you are right, you have the last version srry.
I'm trying to find a reason that explain why your website is adding a "S" in the connection string, because that happens only in your website :(
You are right, I found something with the SSL. Give me a minute for the certifiace on this subdomain.
I'm would like to add a map with position of players, but I don't know how can i do that :(
Oh I think that wont be possible without oxide plugin on the server.
OK the SSL is now working for me, but still can't connect.
I have a question, why are you running a development version?, how do you host the project?
are you using "ng build --prod" to build the distributables files? or are you using "ng build" only?, because Angular recommends to you to use the flag --prod in order to build to production.
I think that is the only one difference between your website and mine, and idk why in your website i can't connect but in my website i can, i think it is because one script is changing the connection schema from "ws://" to "wss://", can be because you are using development version.
check that.
Sorry but the problem it's really strange :(, if that is not the problem, can be the webserver or some like that, one security header or so.
I used npm build --prod I think, the ng build --prod just open some new file or something for me. And I host it in my hosting provider (the files from dist folder).
okay, I suspect that you didn't use --prod in the last update, because when I opened the javascript console in your website, I saw this message from angular framework:
Angular is running in the development mode. Call enableProdMode() to enable the production mode.
That means you aren't using production, I'm viewing the angular web page in order to check if the flag --prod has changed to another flag, but can you try to rebuild the project using that flag?
And maybe that is the problem.
When I use ng build --prod it just open some text editor? Give me a sec.
try this: npm run buildprod
that worked for me.
I run npm run build -- --prod it did something, but still can't connect.
I Build it from beggining now correctly with ng build --prod .. but still it is not working for me :(
Okay, i found the problem, I see in firefox that the server (your apache or webserver) is sending "Content-Security-Policy" header:
content-security-policy: upgrade-insecure-requests;
And as say in this post: https://stackoverflow.com/questions/31950470/what-is-the-upgrade-insecure-requests-http-header
This can be the reason because the websocket is trying to use ssl with rust ip,
My server headers that works:
Your server headers that doesn't work:
I think that can be fixed with a configuration in apache in a .htaccess file:
Header unset Content-Security-Policy
or
Header always unset Content-Security-Policy
Then remember to allow the use of insecure content (the connection to rust server rcon is insecured) following this article:
https://www.damirscorner.com/blog/posts/20210528-AllowingInsecureWebsocketConnections.html
I think you added the .htaccess, now i can connect from firefox, but from chrome i can't because i think that have a cache o some like that, because when I try in other pc, i can connect without a problem, check the photo:
Yes I added to the subdomain the htaccess but it does not work for me. I am using Edge.
yes it's because your browser is saving your headers and ignoring deletion,
As you see, you can't do nothing to fix that in your browser, i think you can try to change the domain to rcon2 or so, or use other browser.
Or you can add a proxy like nginx reverse proxy, to add wss to your rust server.
Thank you, I did the tutorial from your website then I turn off the SSL and it can atleast connect now. :-) Thank you.
It just does not do anything maybe because of some Rust update?