mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-29 03:21:42 +00:00
Ported from https://github.com/VOREStation/VOREStation/pull/6451 Code done by Aronai Adds IP reputation checking to detect Tor, proxy, and VPN usage and block it if so configured. It's disabled by default, but if enabled the default settings are to block all VPN/Proxy/Tor to connect unless the player has been a player for 5 days on a 'normal' connection so that people who legitimately sometimes use a VPN for *reasons* can continue to do so. You can also have it check reputations and just log bad ones, without disconnecting the users. Whether or not it allows 'existing' players, the length of time they must have played, what's considered a 'bad' IP score, etc, are configurable. You **must** put an e-mail address if you use this, otherwise the service will likely ban you. This is the e-mail address they will send e-mails to if you're performing too many checks or they need to speak to you. Adds config options, here's a paste from the example config: ``` ## IP Reputation Checking # Enable/disable IP reputation checking (present/nonpresent) #IP_REPUTATION # Set the e-mail address problems can go to for IPR checks (e-mail address) IPR_EMAIL whatever@whatever.com # Above this value, reputation scores are considered 'bad' (number) IPR_BAD_SCORE 1 # If you want the people disconnected. Otherwise it just logs. (present/nonpresent) IPR_BLOCK_BAD_IPS # If players of a certain length of playtime are allowed anyway (REQUIRES DATABASE) (present/nonpresent) IPR_ALLOW_EXISTING # And what that age is (number) IPR_MINIMUM_AGE 5 ``` As you can see, it's off by default, so if you're a downstream this won't change anything for you unless you decide to turn it on. If you want the features, just copypaste the new config lines out of the example and uncomment IP_REPUTATION. Downstreams can replace the /client/proc/update_ip_reputation() proc with your own, if you'd like to substitute your own service! Just set the client's ip_reputation var at the end of your proc.
60 lines
2.0 KiB
Plaintext
60 lines
2.0 KiB
Plaintext
/client
|
|
//////////////////////
|
|
//BLACK MAGIC THINGS//
|
|
//////////////////////
|
|
parent_type = /datum
|
|
////////////////
|
|
//ADMIN THINGS//
|
|
////////////////
|
|
var/datum/admins/holder = null
|
|
var/datum/admins/deadmin_holder = null
|
|
var/buildmode = 0
|
|
|
|
var/last_message = "" //Contains the last message sent by this client - used to protect against copy-paste spamming.
|
|
var/last_message_count = 0 //contins a number of how many times a message identical to last_message was sent.
|
|
var/ircreplyamount = 0
|
|
|
|
/////////
|
|
//OTHER//
|
|
/////////
|
|
var/datum/preferences/prefs = null
|
|
//var/move_delay = 1
|
|
var/moving = null
|
|
var/adminobs = null
|
|
var/area = null
|
|
var/time_died_as_mouse = null //when the client last died as a mouse
|
|
var/datum/tooltip/tooltips = null
|
|
|
|
var/adminhelped = 0
|
|
|
|
///////////////
|
|
//SOUND STUFF//
|
|
///////////////
|
|
var/time_last_ambience_played = 0 // world.time when ambience was played to this client, to space out ambience sounds.
|
|
|
|
////////////
|
|
//SECURITY//
|
|
////////////
|
|
// comment out the line below when debugging locally to enable the options & messages menu
|
|
//control_freak = 1
|
|
|
|
var/received_irc_pm = -99999
|
|
var/irc_admin //IRC admin that spoke with them last.
|
|
var/mute_irc = 0
|
|
var/ip_reputation = 0 //Do we think they're using a proxy/vpn? Only if IP Reputation checking is enabled in config.
|
|
|
|
|
|
////////////////////////////////////
|
|
//things that require the database//
|
|
////////////////////////////////////
|
|
var/player_age = "(Requires database)" //So admins know why it isn't working - Used to determine how old the account is - in days.
|
|
var/related_accounts_ip = "(Requires database)" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this ip
|
|
var/related_accounts_cid = "(Requires database)" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this computer id
|
|
var/account_join_date = "(Requires database)"
|
|
var/account_age = "(Requires database)"
|
|
|
|
preload_rsc = PRELOAD_RSC
|
|
|
|
var/global/obj/screen/click_catcher/void
|
|
|