Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ToDo:
- -Links: https://pastebin.com/DvACCnfw
- //Socker Security:
- -Changes to the user profile and creation of new rides update restricted_until. Only allow further critical actions if last call was 20 seconds or more in the past
- Ongoing:
- -Test all connection scenarios
- Mid priority:
- -Builde final version in --prod --release mode for faster startup time
- //Security and Bans:
- -Maintain IP block list in DB. Socket io checks against on authentication with socket.handshake.address. If more than 2 infractions trigger banUser function which disconnects the socket, bans the user in the DB if he is not already banned and disables the account in firebase if not already disabled as well as adding the current socket ip to the ban list with an infraction count of 3 and a new expiration time in 30 days. If user passes the infractions check, check banned flag next, if that fails also trigger banUser function
- -Add IPs who exceed rate limits to ban list automatically and count/increase infractions. If infractions go over 2 also trigger banUser function
- -Periodically node triggers a check on the DB to verify that all of the currently connected sockets userIds are not banned. If any of them is banned call the banUser function to ban the ip and disconnect the socket
- -Periodically also ensure that no rides are marked as active which creators have been banned. If some exist, set them to aborted asap
- -To manually ban a user call a script which disables the userID in firebase and flags the user as banned in the DB (dont delete as it allows them to re-create the same account). Automatic check will disconnect the socket soon after
- -Dont show rides from users who are deleted/disabled on firebase
- //Other Stuff:
- -New postGreSQL config:
- https://pgtune.leopard.in.ua/#/
- # DB Version: 10
- # OS Type: linux
- # DB Type: web
- # Total Memory (RAM): 4 GB
- # CPUs num: 2
- # Data Storage: ssd
- max_connections = 200
- shared_buffers = 1GB
- effective_cache_size = 3GB
- maintenance_work_mem = 256MB
- checkpoint_completion_target = 0.7
- wal_buffers = 16MB
- default_statistics_target = 100
- random_page_cost = 1.1
- effective_io_concurrency = 200
- work_mem = 5242kB
- min_wal_size = 1GB
- max_wal_size = 2GB
- max_worker_processes = 2
- max_parallel_workers_per_gather = 1
- max_parallel_workers = 2
- Global variables, callbacks, Observables: https://forum.ionicframework.com/t/solved-ionic-navcontroller-pop-with-params/58104/19
- chrome-devtools://devtools/remote/serve_rev/@8daf58f7f40d22013c59388236c8e71e1117cb2c/inspector.html?remoteFrontend=true&dockSide=undocked
- file:///android_asset/www/index.html
- chrome://inspect/#devices
- OSMNames Stuff:
- Commands:
- - zcat planet-latest_geonames.tsv.gz | awk -F '\t' -v OFS='\t' 'NR == 1 || $16 == "de"' > germany.tsv
- - zcat planet-latest_housenumbers.tsv.gz | awk -F '\t' -v OFS='\t' 'NR == 1 || ($6 > 47.3024876979 && $6 < 54.983104153 && $5 > 5.98865807458 && $5 < 15.0169958839)' > germany_numbers.tsv
- - Swapping Tabs: awk -F $'\t' ' { t = $1; $1 = $3; $3 = t; print; } ' OFS=$'\t' dataOrig.tsv > dataFinal.tsv
- -Places docker port uses port 1200:80
- -Path: /var/lib/docker/overlay2/f067fb11d1fa9e34b62a7e370417c3fb19ceb9f6e6b4b55477cb62c257435426
- -sudo docker kill 3ed8a6165a07
- -sudo docker logs 3ed8a6165a07
- sudo docker run -d --name klokantech-osmnames-sphinxsearch -v /home/ubuntu/osmnamesPlaces/:/data/ -p 1200:80 klokantech/osmnames-sphinxsearch
- sudo docker run -d -v /home/ubuntu/osmnamesPlaces/:/data/ -p 1200:80 klokantech/osmnames-sphinxsearch
- sudo docker run -d -v /home/ubuntu/taxiShared/osmnamesPlaces/osmnames-sphinxsearch/data/input/:/data/input/ -p 1200:80 klokantech/osmnames-sphinxsearch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement