letheanVPN / lthn-app-vpn

Client/Server dVPN
https://www.lt.hn
European Union Public License 1.2
36 stars 16 forks source link

lthn-easy-deploy-node.sh does not set provider name in sdp.json #118

Open ronnylov opened 4 years ago

ronnylov commented 4 years ago

This is a suggestion to make the setup easier.

Using this script to setup exit node: https://github.com/LetheanMovement/lethean-vpn/blob/bug/limosek/dpkg-easy-install/server/easy-deploy-node.sh

On line 128: https://github.com/LetheanMovement/lethean-vpn/blob/bug/limosek/dpkg-easy-install/server/easy-deploy-node.sh#L128

--sdp-provider-name EasyProvider \

It results that /etc/lthn/sdp.json file get following line: "name": "EasyProvider",

I always change this line to the name of my exit node in sdp.json. So it would be good to add a variable in the script to set it there (or use it as environmental variable) before running the script.

Further down in the script there is on line 132 and 133:

     --sdp-service-type proxy --sdp-service-cost 0.001 --sdp-service-dlspeed 1 --sdp-service-ulspeed 1 \
     --sdp-service-prepaid-mins 10 --sdp-service-verifications 0

We could have variables for cost, download speed and upload speed. I think we can hard code --sdp-service-prepaid-mins to 30 instead of 10 because ten minutes for first payment period is a bit short as default value. Could use variable here too but I don't think it is necessary, better to set working defaults.

The sdp.json file also get this line as default: "terms": "{providerterms}", Not sure if this also can be set through the "lvmgmt --generate-sdp" function by the script?

I can try modify the script and create a PR. Just writing the issue to remember it.

ronnylov commented 4 years ago

In addition the generated /etc/lthn/dispatcher.ini file contain following lines by default:

provider-name=Provider
provider-terms=Some Terms

If we have variables in easy-deploy-node.sh for privder name and terms it could also put this info in dispatcher.ini