RoboSats / robosats

A simple and private bitcoin exchange
https://learn.robosats.com
GNU Affero General Public License v3.0
712 stars 141 forks source link

RoboSats should link to Amboss .onion site under Tor Browser #841

Closed kristapsk closed 1 year ago

kristapsk commented 1 year ago

Describe the bug RoboSats "Stats For Nerds" currently has link to https://amboss.space/node/0282eb467bc073833a039940392592bf10cf338a830ba4e392c1667d7697654c7e. But if opening that under Tor Browser, it immediately redirects to http://amboss5jfdzzblty5dr5zaig5twvkgsla6y5xuy6s5c5ogpjfcqgltid.onion/.

Expected behavior Link to http://amboss5jfdzzblty5dr5zaig5twvkgsla6y5xuy6s5c5ogpjfcqgltid.onion/node/0282eb467bc073833a039940392592bf10cf338a830ba4e392c1667d7697654c7e when running under Tor Browser instead.

kristapsk commented 1 year ago

Also, node pubkey looks wrong, new invoices are paid to 02187352cc4b1856b9604e0a79e1bc9b301be7e0c14acbbb8c29f7051d507127d7 not 0282eb467bc073833a039940392592bf10cf338a830ba4e392c1667d7697654c7e.

Reckless-Satoshi commented 1 year ago

Hey @kristapsk , thanks for reporting!

immediately redirects to http://amboss5jfdzzblty5dr5zaig5twvkgsla6y5xuy6s5c5ogpjfcqgltid.onion/.

I see, I guess this redirect to the onion site is something they have implemented recently. The fix is straight forward, we can detect if the origin is "Tor" and if so, use the onion site instead to build the Amboss URL.

Also, node pubkey looks wrong, new invoices are paid to 02187352cc4b1856b9604e0a79e1bc9b301be7e0c14acbbb8c29f7051d507127d7 not 0282eb467bc073833a039940392592bf10cf338a830ba4e392c1667d7697654c7e.

Does not strictly relates to issues in the codebase, but a misconfiguration on the .env file of the experimental coordinator after decommissioning the previous LND node (RIP). It is solved now, thanks for reporting too.