-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reworked bash script #11
base: main
Are you sure you want to change the base?
Conversation
Minor corrections
Minor fix
Tidy up
Reworked script: 1- made curls quit 2- changed logic to handle failed api calls 3- storing successfull apiurl in token.json to be used in future runs 4- added generation of config files for obfuscated and double servers 5- cleaned up print outs much cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comment and let me know if you think it can be done or not?
It is a suggestion :)
@@ -17,12 +17,10 @@ read_config() { | |||
sswg_log=${config_folder}/sswg.log | |||
|
|||
baseurl_1="https://api.surfshark.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move them to a json config file so every time a url changes we just change that file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eid mubarrak.
The urls ? Probably I can. e=Explain how you want it to work and ill see what I can do :;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move them to a json config file so every time a url changes we just change that file?
Thinking about your comment, the way I have it setup now is during the login (which is done during a full run no prarameters) it goes through the urls and will save the succesfull url with the token.json file. So when u run script again with the renew parameter (-n) it will use the same url.
Hello @yazdan I can move whatever you feel to be read from a json file. I will have to rework some logic to guard against someone not putting these values. |
Reworked script:
1- made curls output quieter
2- changed logic to handle failed api calls
3- storing successfull apiurl in token.json to be used in future runs
4- added generation of config files for obfuscated and double servers
5- cleaned up print outs much cleaner.