deathline94 / sing-REALITY-Box

One click REALITY installer on sing-box core
Apache License 2.0
244 stars 355 forks source link

print vless configuration in Modify part #6

Closed GhostOfSarina closed 1 year ago

GhostOfSarina commented 1 year ago

When changed the Vless configuration, the new config didn't show. In these commit I store the public key and remake Vless config.

deathline94 commented 1 year ago

wont merge this . i thought about this way and option from beginning and i almost coded it but it imposes a huge security threat . saving public/private keys in a plain text ? too risky.

GhostOfSarina commented 1 year ago

We can save it with Asymmetric Encryption. Encrypting and Decrypting Files in Linux if we use GPG method we need another password :))

But we need public key for regenerate the configuration.

deathline94 commented 1 year ago

You are absolutely right ! we need that option ! i tried many ways , even tried to save it inside the config file (reality.json) but sing-box doesnt like unknown values in its config files . tell you what , ill keep thinking about it until i come up with something i like , if ididnt , ill go down this route . generate and save it to a file ... _btw , thank you for being so active these past days and taking an interest in this topics and my work ! good job mate .

GhostOfSarina commented 1 year ago

Have you ever used gpg --list-keys? https://linuxhint.com/export-import-keys-with-gpg/

We can store all parameters in the GPG list. It's more secure.

GhostOfSarina commented 1 year ago

I used Openssl to encrypt public key. We can also get key from the users, but I prefer use IP address for encrypt the data.

deathline94 commented 1 year ago

using openssl to get public key from privae key is a good idea albeit it needs the privatekey to be saved in a file already . also encrytion using gpg is less desirable . i'll probably end up saving the key-pair in a file and add couple more options tonight or early morning , then archive the whole thing in favour of that other sing-box reality script

deathline94 commented 1 year ago

Done in my own way ! Cheers