Closed GhostOfSarina closed 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.
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.
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 .
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.
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.
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
Done in my own way ! Cheers
When changed the Vless configuration, the new config didn't show. In these commit I store the public key and remake Vless config.