Advertisement
dragonbane

TaxiShare ToDo

Sep 12th, 2018
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.63 KB | None | 0 0
  1. ToDo:
  2.  
  3. -Links: https://pastebin.com/DvACCnfw
  4.  
  5. //Socker Security:
  6. -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
  7.  
  8. Ongoing:
  9. -Test all connection scenarios
  10.  
  11. Mid priority:
  12.  
  13. -Builde final version in --prod --release mode for faster startup time
  14.  
  15.  
  16.  
  17. //Security and Bans:
  18. -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
  19. -Add IPs who exceed rate limits to ban list automatically and count/increase infractions. If infractions go over 2 also trigger banUser function
  20. -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
  21. -Periodically also ensure that no rides are marked as active which creators have been banned. If some exist, set them to aborted asap
  22. -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
  23. -Dont show rides from users who are deleted/disabled on firebase
  24.  
  25.  
  26.  
  27. //Other Stuff:
  28.  
  29. -New postGreSQL config:
  30. https://pgtune.leopard.in.ua/#/
  31. # DB Version: 10
  32. # OS Type: linux
  33. # DB Type: web
  34. # Total Memory (RAM): 4 GB
  35. # CPUs num: 2
  36. # Data Storage: ssd
  37.  
  38. max_connections = 200
  39. shared_buffers = 1GB
  40. effective_cache_size = 3GB
  41. maintenance_work_mem = 256MB
  42. checkpoint_completion_target = 0.7
  43. wal_buffers = 16MB
  44. default_statistics_target = 100
  45. random_page_cost = 1.1
  46. effective_io_concurrency = 200
  47. work_mem = 5242kB
  48. min_wal_size = 1GB
  49. max_wal_size = 2GB
  50. max_worker_processes = 2
  51. max_parallel_workers_per_gather = 1
  52. max_parallel_workers = 2
  53.  
  54.  
  55. Global variables, callbacks, Observables: https://forum.ionicframework.com/t/solved-ionic-navcontroller-pop-with-params/58104/19
  56.  
  57. chrome-devtools://devtools/remote/serve_rev/@8daf58f7f40d22013c59388236c8e71e1117cb2c/inspector.html?remoteFrontend=true&dockSide=undocked
  58. file:///android_asset/www/index.html
  59. chrome://inspect/#devices
  60.  
  61.  
  62. OSMNames Stuff:
  63.  
  64. Commands:
  65. - zcat planet-latest_geonames.tsv.gz | awk -F '\t' -v OFS='\t' 'NR == 1 || $16 == "de"' > germany.tsv
  66. - 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
  67. - Swapping Tabs: awk -F $'\t' ' { t = $1; $1 = $3; $3 = t; print; } ' OFS=$'\t' dataOrig.tsv > dataFinal.tsv
  68.  
  69. -Places docker port uses port 1200:80
  70. -Path: /var/lib/docker/overlay2/f067fb11d1fa9e34b62a7e370417c3fb19ceb9f6e6b4b55477cb62c257435426
  71. -sudo docker kill 3ed8a6165a07
  72. -sudo docker logs 3ed8a6165a07
  73. sudo docker run -d --name klokantech-osmnames-sphinxsearch -v /home/ubuntu/osmnamesPlaces/:/data/ -p 1200:80 klokantech/osmnames-sphinxsearch
  74. sudo docker run -d -v /home/ubuntu/osmnamesPlaces/:/data/ -p 1200:80 klokantech/osmnames-sphinxsearch
  75. 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