Facepunch / garrysmod-requests

Feature requests for Garry's Mod
84 stars 24 forks source link

Make gui.OpenURL/connect popup remember if you accept #1751

Open aStonedPenguin opened 3 years ago

aStonedPenguin commented 3 years ago

A popup every time someone wants to read the rules/faq or swap to another server is less than ideal.

A users choice to accept should be remembered or a "trust and accept" button should be added.

robotboy655 commented 3 years ago

Just like the new connect popup on the dev branch does.

Huh?

aStonedPenguin commented 3 years ago

I completely misread the changelog. Edited.

SneakySquid commented 3 years ago

There should be a separate "trust domain" button imo

ghost commented 3 years ago

Games like Multi Theft Auto San Andreas, provide the way to add Domains to a Whitelist, which then are no longer asked for. I dont understand, why this has been added for connect's... openURL ... Okay thats understandable... but joining another server? Has GMod became that bad, that you need to safeguard users??

Xeddius commented 3 years ago

It would make sense to disable this dialog for servers operating under the same domain as this prompt gets annoying really fast when users just want to have fun on the community servers. Constantly spamming a popup when players are trying to transition by choice to one of our other servers is counterintuitive and will harm future revenue we may receive, not to mention losing players, this community is supposed to be fun and it should be seamless. Please patch this or at least add a workaround for server operators running servers under the same domain. I can understand trying to "protect" players, but the cost of being overly restrictive has the unintended side effect of being damaging to server owners as well.

The server community we have built is akin to something like Gmodtower, but unless this issue can be fixed I don't feel comfortable leaving the beta phase.

Perhaps add per-server whitelists based on game server tokens?

ghost commented 3 years ago

Because no one else is prob. going to solve this. I did! Here is the openurl.lua Facepunch only needs to handle the saving of the whitelist. (Maybe a Path where only the MenuLua can write to?).

It adds a Checkbox to the connect requests, and if you check it. It will save the IP/Domain, to never ask again. ( everything can be cleared with the concmd connect_clearwhitelist ).

IPv4 Address will be matched exactly, where as Domain Names will only match to the Domain.TLD, so you can have multiple Servers under "yourdomain.tld" like "server1.yourdomain.tld" and "server2.yourdomain.tld".. Therefore it will only ask you once if you want to allow "yourdomain.tld".

Does ask you to whitelist the entire domain: image

Does match the whitelist Entries accordingly(no trickery possible): image

Also works for IPs: image

If whitelisted, it just directly connects.

meepen commented 3 years ago

You could just make a pull request with that.

On Sat, Apr 24, 2021, 5:17 PM cat6e @.***> wrote:

Because no one else is prob. going to solve this. I did! Here is the openurl.lua https://github.com/catSIXe/fix-gmod-connect/blob/master/openurl.lua Facepunch only needs to handle the saving of the whitelist. (Maybe a Path where only the MenuLua can write to?).

It adds a Checkbox to the connect requests, and if you check it. It will save the IP/Domain, to never ask again. ( everything can be cleared with the concmd connect_clearwhitelist ). IPv4 Address will be matched exactly, where as Domain Names will only match to the Domain.TLD, so you can have multiple Servers under "yourdomain.tld" like "server1.yourdomain.tld" and "server2.yourdomain.tld".. Therefore it will only ask you once if you want to allow "yourdomain.tld".

[image: image] https://user-images.githubusercontent.com/63829136/115973068-a5a6b780-a552-11eb-9106-8d6e96402169.png [image: image] https://user-images.githubusercontent.com/63829136/115973064-9fb0d680-a552-11eb-9d82-3c985cc06dfe.png [image: image] https://user-images.githubusercontent.com/63829136/115973067-a2133080-a552-11eb-8bbc-2a70dc49c4ca.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Facepunch/garrysmod-requests/issues/1751#issuecomment-826154698, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPGKSPCXYBRPNILUXLFDDTTKMYM3ANCNFSM4TT7R5SA .

robotboy655 commented 3 years ago

Server connection confirmation dialog now has a "remember yes" option. Accepting the connection even if you do not tick the "remember yes" checkbox will still remember your choice for the session for the given server, and will grant temporary permission for the target server to send you back as well.

I am hesitant with enabling this for gui.OpenURL, my fear is that you'd first ask them to open some legit URL and then force open some fake Steam looking like website to steal player's credentials or some shit. With a confirmation every time at least the player can think twice. I do not buy the "Rules/FAQ" excuse, you can just as well display this using DHTML, or hell, the in-game UI.