Revision e5f5c961
Added by Steve Beaver over 4 years ago
src/etc/inc/wg.inc | ||
---|---|---|
26 | 26 |
require_once("globals.inc"); |
27 | 27 |
require_once('config.inc'); |
28 | 28 |
|
29 |
// Create public and private keys |
|
30 |
function wgCreateKeys() { |
|
31 |
global $config; |
|
32 |
|
|
33 |
// ToDo Inset wireguard magic to create public and private keys |
|
34 |
// Debug |
|
35 |
$pubkey = "xTIBA5rboUvnH4htodjb6e697QjLERt1NAB4mZqp8Dg="; |
|
36 |
$privkey = "yAnz5TF+lXXJte14tji3zlMNq+hd2rYUIgJBgB3fBmk="; |
|
37 |
|
|
38 |
$config['wireguard']['fwpubkey'] = $pubkey; |
|
39 |
$config['wireguard']['fwprivkey'] = $privkey; |
|
40 |
|
|
41 |
write_config("Wireguard keys created"); |
|
42 |
} |
|
43 |
|
|
29 | 44 |
// Return the next wireguard interface name that is not currently in use |
30 | 45 |
function nextFreeWGInterfaceName() { |
31 | 46 |
global $config; |
Also available in: Unified diff
Revised tunnel table, added firewall key display, added key generation code