summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com/wireguard/config
AgeCommit message (Collapse)Author
2017-08-01Interface: Convert to using Keypair classSamuel Holland
This allows retrieving the public key and generating keypairs, both of which will be exposed in the UI. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-31Profile: Implement deep copyingSamuel Holland
This is a simple, naive implementation that {,de}serializes the profile's state, but it does not depend on the internal representation of Profile or its contained classes. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-31Copyable: New utility interface for deep-copyable classesSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-31Profile: Track connection stateSamuel Holland
Observability is only enabled for isConnected because it is the only mutable property. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-29Profile: Add a blank line before each peer sectionSamuel Holland
This is purely a cosmetic change in the generated config files. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-29Profile: Parse config file to a string per attributeSamuel Holland
This parser should be able to handle any valid WireGuard or wg-quick configuration file. It separates the file into a single interface object and a peer object for each peer. All "[Interface]" sections in the file are combined into the one object. For now, later lines in a block with the same key overwrite earlier lines. This is only relevant for attributes that are lists, such as Address and AllowedIPs, where additional lines may be expected to append to the list. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-29Profile: Add minimal implementationSamuel Holland
This represents a wg-quick profile as two strings: the file name and the file contents. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>