Commit Graph

96 Commits

Author SHA1 Message Date
Emma Miler 28b50b3ee1
Add deprecation notice (#93) 2022-11-21 15:02:32 +01:00
Jack 0393b472d4
More rigorous checks for returning failing Stryder auth response (#88)
* narrow down where stryder error originated and why it happened

* more rigorous response checks

* Catch rejected promises properly and return for bad statusCode

* improve code maybe

* formatting

* fix respawn's json and add status check (and fix uri check?)

* extra check for the case when stryder doesnt give a status in its json
2022-10-03 21:25:30 +02:00
Jack b45ff0ef26
More descriptive errors for stryder response (#85) 2022-09-01 17:26:50 +02:00
GeckoEidechse db8457a5fd
Return status code and headers on HTTP error (#86)
This allows for checking status code and or headers for more info why
request may have failed.

Co-authored-by: Alystrasz <contact@remyraes.com>
2022-08-18 23:04:27 +02:00
GeckoEidechse 6ecd6088fc
Cast environment variable to number (#82)
It's a string otherwise so setting `ORIGIN_ENABLE=0` results in `"0"` which is `true`.
2022-08-03 00:52:07 +02:00
H0L0theBard 63baa00f30
Added text alternatives to images (#81) 2022-07-16 02:00:08 +02:00
Anjan Nair e2481cbc7a
Added Dockerfile (#73)
* Added Dockerfile

* Docker brought back to root

* Updated Dockerfile, node version and ENTRYPOINT usage

* Added .dockerignore

* Alpine image docker

* Change suggested image name

* Add note about podman
2022-07-14 23:55:34 +02:00
Barnaby 0950d1a385
Reject non-string values in server/update_values (#74) 2022-05-13 01:32:47 +02:00
Barnaby ebe505beb5
Move setting heartbeat so it can't be changed by the request data (#68) 2022-05-08 14:40:57 +02:00
ASpoonPlaysGames 1cc3feb5dd
Encode usernames so that they are valid URI strings (#70) 2022-05-08 14:29:01 +02:00
Emma Miler fa4fd6c9c0
Guard against duplicate ports (#67)
* Guard against duplicate ports

* remove trailing space

* block instead of replacing

* remove trailing spaces
2022-05-04 22:48:36 +02:00
Barnaby 0bc5863459
Query game port on server create (#63)
* Query game port on server create

Seems to work okay with real game servers

* Only warn on wrong line endings instead of error
2022-05-04 22:39:14 +02:00
Barnaby 5c1249e9d8
Fix modInfo not iterable maybe (#62) 2022-05-04 13:10:34 +02:00
Barnaby acfc170d59
uid<->username lookup routes (#36) 2022-04-12 18:43:14 -03:00
Barnaby 78942467a0
Read player data endpoints (#48)
* player info and pdata endpoints
* add loadout and stats
* ratelimit category + name
2022-04-05 18:46:56 -03:00
Barnaby 23f6cf87ce
add a couple icons and remove material icons font (#50) 2022-04-04 19:16:21 -03:00
taskinoz 810fc45d88
Added download size to main download button (#56) 2022-03-31 18:50:43 -03:00
taskinoz 7ab217d518
Added redirect for thunderstore (#54)
* Changed Discord redirect to vanity URL

* Added redirect for /thunderstore

* Updated comment

* Changed mods link to /thunderstore
2022-03-27 12:44:10 +02:00
Emma Miler eb6ce2b43e
Update discord invite to use vanity url (#53) 2022-03-27 12:42:51 +02:00
Barnaby 9b803eb093
Minimum launcher version for client and server auth (#55)
* require minimum version
enforced on client and server auth with ms

* Use semver.gte instead of checking number explicitly
Should be morer eadable as well

* Dev version is always allowed regardless of version requirement
The idea being that contributors can compile source from source without having to change version number
By default source code is version `0.0.0+dev`
2022-03-26 02:27:56 +01:00
Barnaby 737c637c9f
Proper name spoofing protection (API change, no actual protection!) (#42)
* Working username fetching and db field
also sends the username in authenticate_incoming_player

* Update dev.env

* Switch from using puppeteer to just http

* Fix indentation

* fail open instead of closed

if i’m not mistaken, failing every time they auth will result in username being “null”, otherwise will remain as the previous value

* should make the default username in db be empty string

* Fix username fetch (added missing package)

* Format

* eslint pain

* eslint pain episode 2

* switch to async func over promise

* i removed by accident, makes it work again

* allow origin stuff to be disabled

* Add persistent sid cookie

* remove newline in sid.cookie

* automatic db upgrading using dbSchema.json

* Catch origin auth error

* Nicely do this instead

* Save non-authed state when failing
2022-03-24 21:22:12 +00:00
hummusbird 85c0cd2966
Limit max players to 32 (#46) 2022-03-08 21:45:32 -03:00
Barnaby a57adf994f
fix verify on revive ghost server (#47)
* fix verify on revive ghost server

* Add this cause undefined return fucks it up
2022-03-08 23:49:38 +00:00
Barnaby 82da2b9784
Catch bad request response (#44) 2022-03-07 01:15:11 +00:00
Barnaby 2c69c0a137
Add ghost server logic (#41)
Allows servers to reregister with the same id without any change to launcher code
2022-03-04 19:45:22 -03:00
Barnaby e42eaf6888
fix mistakenly commented function that breaks game server auth (#43) 2022-03-03 22:33:46 +00:00
Barichello b391f0c4ab
Add eslint CI check 2022-02-26 18:50:45 -03:00
Barichello 860f667e5b
Implement returning of failure error codes 2022-02-26 16:25:30 -03:00
Barichello 155ed9006d
Add eslint ignore to specific cases 2022-02-26 16:25:30 -03:00
Northstar 1d8eb277cc
Format project 2022-02-26 15:43:05 -03:00
Barichello 8c5e6e151e
Chmod husky script 2022-02-26 15:30:27 -03:00
Barichello cfff493143
Add errorcodes.js 2022-02-26 15:30:10 -03:00
Barichello c12ad09ae8
Add debug vscode config 2022-02-26 15:29:25 -03:00
Tristan Kennedy 5db24c6871 Added Open Graph meta 2022-02-23 23:51:21 -03:00
Tristan Kennedy 0343e3d1a8 Compressed promo image and added a version to display with Open Graph 2022-02-23 23:51:21 -03:00
Barnaby cf501d07d7
Fix proxy list? Also make multipart registration global (#38)
* Change a few minor things
This might've worked, from my testing there were no problems

* a

* fix proxy list maybe?
2022-02-24 01:03:08 +00:00
Barnaby a8cd0a3ae7
Change a few minor things (#35)
This might've worked, from my testing there were no problems
2022-02-23 20:38:48 +00:00
Barnaby 401c8a48a8
Change to use Date.now() + indent fix (#34)
Seems to be working okay
2022-02-22 18:04:33 +00:00
Emma Miler afbea69843
Add caching to /client/servers (#30)
* Caching

* Update serverlist.js

* Re-add husky

* Add the actual code and fix update_values
2022-02-21 01:05:08 +00:00
Barnaby 9532804e7d
Update background video for web landing page (#33)
* Add landing page to master server

Would display at https://northstar.tf/ by default instead of the github

Also makes eslint ignore web cause it thinks it's nodejs :trollface:

* Instead of removing github redirect, just move it

now at northstar.tf/github

* Add help section below installation and change to use redirects instead of hard links

* Make background video smaller

(14.5MB -> 7.13MB)

* Add description below logo

I know the code looks jank but trust me, it near perfectly replicates the tf|2 logo

* Fix kerning (enable caps lock :trollface:)

* Slight adjustment to titanfall divider position

* Remove frontline font, isn't even in the folder anymore

* test preload stuff

might work, might not

* Only preload font

* Add catch to the download url fetch, log cause why not

* Add funny obfuscated log

Actually says: console.log("Interested in modding? Join the Discord ("+location.href+"discord) and have a look at the modding docs ("+"https://r2northstar.readthedocs.io/"+")")

* warn instead of log

* Change blur slightly

* New background video

* Update NorthstarPromoPoster.jpg
2022-02-21 01:03:18 +00:00
Barnaby b9e9af0c35
Add web landing page (#32) 2022-02-20 20:02:36 -03:00
Barnaby 6d3784e26c
use trusted proxy list instead of cloudflare proxy header cause it works better (#23)
* use trusted proxy list

comes with cfaddresses.txt cause i know bob uses cloudflare
added support for # comments to the file cause why not

* Fix indentation 

thanks fucked github mobile editor
2022-02-12 22:48:52 +00:00
BobTheBob 6dc957ad3b
Merge pull request #25 from barnabwhy/fix-update-current-server
Fix DB creation for auth IP checks
2022-01-26 19:28:26 +00:00
Barnaby 95ca547a38
Fix DB creation for auth IP checks 2022-01-26 19:25:09 +00:00
Barnaby 0654d159e1
Ratelimit endpoints (#20) 2022-01-23 17:35:45 -03:00
BobTheBob 1ad019523c
Merge pull request #22 from barnabwhy/fix-update-current-server
Update player current server on client/auth_with_server
2022-01-20 00:17:31 +00:00
Barnaby 489f203eba
up :( ... ip :) 2022-01-19 17:19:18 +00:00
Barnaby c69890a47a require ip to be the same as the last auth ip for write_persistence
(untested but should work, gave bob a script to add the lastAuthIp column to the db)
2022-01-19 16:48:18 +00:00
Barnaby a09eb3e9a8 update player current server on client/auth_with_server
fixes a very bad involving pdata
2022-01-19 14:46:25 +00:00
BobTheBob d38c0c99be
Merge pull request #21 from connorsullivan/main
Add optional env variable to get client IP from a custom header
2022-01-19 04:13:25 +00:00