-
-
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
lthnvpnc (client) should inform user of amount LTHN required for payment #101
Comments
Client has no chance to know how much to pay because it does not know how long to stay connected. |
Just informing the user of the per-minute cost (as stated in SDP) would be sufficient. Anything using lthnvpnc can calculate the total on its own. |
I think the problem was that if I did pay less than the amount for the whole first payment period (as example 3 LTHN if price is 0.1/min and 30 mins) then it never connected. The CLI client could inform user of minimum payment to be able to connect. sdp.json have the info needed to calculate this. |
PR created, see #115. Sample output: proxy client lthnvpnc connect 9f6b6575a10a0ab2879b535513c58204e15548c1624432ee54175ae4fea048c1/1C
INFO:audit:action=START,type=SERVICE,obj=lthnvpnc,
WARNING:lthnvpnc:Waiting for local proxy...
WARNING:lthnvpnc:Local proxy OK
WARNING:lthnvpnc:Waiting for remote proxy...
WARNING:lthnvpnc:Remote proxy is connected.
WARNING:lthnvpnc:Now you need to pay to provider's wallet. The cost of service is 0.05000000 LTHN per minute. The minimum initial payment is 30 minutes, for a total of 1.50000000 LTHN.
INFO:audit:action=NEED_PAYMENT,type=PROVIDER_WALLET,wallet=iz68Yp2ymS64Dh11aoAUYyVsJzeHkYN5iKSR4fxhSVVR5m5YLbPuMJti3SWz9g446iWTiRvqJ4Z32LiRzSMuQukM2nVsUWe7y,paymentid=1CAC5FFCAF7B68F0,cost_per_min=0.05000000,
WARNING:lthnvpnc:Waiting for payment to settle... vpn client lthnvpnc connect 9f6b6575a10a0ab2879b535513c58204e15548c1624432ee54175ae4fea048c1/2A
INFO:audit:action=START,type=SERVICE,obj=lthnvpnc,
WARNING:lthnvpnc:Started service BASIC no malware[9F6B6575A10A0AB2879B535513C58204E15548C1624432EE54175AE4FEA048C1_2A]
WARNING:lthnvpnc:Now you need to pay to provider's wallet. The cost of service is 0.10000000 LTHN per minute. The minimum initial payment is 30 minutes, for a total of 3.00000000 LTHN.
INFO:audit:action=NEED_PAYMENT,type=PROVIDER_WALLET,wallet=iz68Yp2ymS64Dh11aoAUYyVsJzeHkYN5iKSR4fxhSVVR5m5YLbPuMJti3SWz9g446iWTiRvqJ4Z32LiRzSMuQukM2nVsUWe7y,paymentid=2A96E4760E13B1F0,cost_per_min=0.10000000, |
Currently, lthnvpnc only instructs users to pay a provider but does not specify an amount needed. It should at least notify user of the initial required payment and subsequent payment amounts.
Current output:
The text was updated successfully, but these errors were encountered: