I hereby claim:
- I am vadimgush on github.
- I am vadimgush (https://keybase.io/vadimgush) on keybase.
- I have a public key ASAvDPiollJpGryY0yXyXDv0krsmPfoqVWG8NBZmuZ4rZgo
To claim this, I am signing this object:
public static class Decoder { | |
public void test() throws Exception { | |
// AmneziaWG client key which starts with "vpn://" is just a Base64 encoded and compressed JSON configuration file | |
final var encoded = "vpn://<insert your client key>".replace("vpn://", ""); | |
// They use Base64 URL encoder. Inside of the Base64 encoded string is a compressed data. | |
final var compressed = ByteBuffer.wrap(Base64.getUrlDecoder().decode(encoded)); | |
// Data is compressed using QT qCompress function, which uses zlib and adds a 4 byte header to the compressed data | |
final var header = new byte[4]; // The header is 32-bit unsigned integer representing the size of uncompressed data | |
compressed.get(header); // This will remove 4 byte header from the buffer |
I hereby claim:
To claim this, I am signing this object: