{"action":"created","comment":{"url":"https://api.github.com/repos/systemd/systemd/pulls/comments/156809128","pull_request_review_id":83347303,"id":156809128,"diff_hunk":"@@ -0,0 +1,103 @@\n+#pragma once\n+\n+/***\n+  This file is part of systemd.\n+\n+  Copyright 2016 Jörg Thalheim <joerg@thalheim.io>\n+\n+  systemd is free software; you can redistribute it and/or modify it\n+  under the terms of the GNU Lesser General Public License as published by\n+  the Free Software Foundation; either version 2.1 of the License, or\n+  (at your option) any later version.\n+\n+  systemd is distributed in the hope that it will be useful, but\n+  WITHOUT ANY WARRANTY; without even the implied warranty of\n+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n+  Lesser General Public License for more details.\n+\n+  You should have received a copy of the GNU Lesser General Public License\n+  along with systemd; If not, see <http://www.gnu.org/licenses/>.\n+***/\n+\n+typedef struct Wireguard Wireguard;\n+\n+#include \"netdev.h\"\n+#include \"sd-resolve.h\"\n+#include \"wireguard-netlink.h\"\n+\n+#ifndef IFNAMSIZ\n+#define IFNAMSIZ 16\n+#endif\n+\n+typedef struct WireguardIpmask {\n+        uint16_t family;\n+        union {\n+                struct in_addr ip4;\n+                struct in6_addr ip6;\n+        };\n+        uint8_t cidr;\n+\n+        LIST_FIELDS(struct WireguardIpmask, ipmasks);\n+} WireguardIpmask;\n+\n+typedef struct WireguardPeer {\n+        uint8_t public_key[WG_KEY_LEN];\n+        uint8_t preshared_key[WG_KEY_LEN];\n+        uint32_t flags;\n+\n+        union {\n+          struct sockaddr addr;\n+          struct sockaddr_in addr4;\n+          struct sockaddr_in6 addr6;\n+        } endpoint; /* Get/Set */\n+\n+        uint16_t persistent_keepalive_interval;\n+\n+        LIST_HEAD(WireguardIpmask, ipmasks);\n+        LIST_FIELDS(struct WireguardPeer, peers);\n+} WireguardPeer;\n+\n+typedef struct WireguardEndpoint {\n+        char *host;\n+        char *port;","path":"src/network/netdev/wireguard.h","position":62,"original_position":62,"commit_id":"26ea0a488485ed66cf2cd145ec23f6aeb29ce0b0","original_commit_id":"87a4bea2949a9a131a503d71fb1486ad5ee1a294","user":{"login":"Mic92","id":96200,"avatar_url":"https://avatars3.githubusercontent.com/u/96200?v=4","gravatar_id":"","url":"https://api.github.com/users/Mic92","html_url":"https://github.com/Mic92","followers_url":"https://api.github.com/users/Mic92/followers","following_url":"https://api.github.com/users/Mic92/following{/other_user}","gists_url":"https://api.github.com/users/Mic92/gists{/gist_id}","starred_url":"https://api.github.com/users/Mic92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mic92/subscriptions","organizations_url":"https://api.github.com/users/Mic92/orgs","repos_url":"https://api.github.com/users/Mic92/repos","events_url":"https://api.github.com/users/Mic92/events{/privacy}","received_events_url":"https://api.github.com/users/Mic92/received_events","type":"User","site_admin":false},"body":"Service names were previously resolved to ports. \r\nHowever this was removed later due feedback in this pull request.","created_at":"2017-12-13T22:50:35Z","updated_at":"2017-12-13T22:50:36Z","html_url":"https://github.com/systemd/systemd/pull/4191#discussion_r156809128","pull_request_url":"https://api.github.com/repos/systemd/systemd/pulls/4191","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/systemd/systemd/pulls/comments/156809128"},"html":{"href":"https://github.com/systemd/systemd/pull/4191#discussion_r156809128"},"pull_request":{"href":"https://api.github.com/repos/systemd/systemd/pulls/4191"}},"in_reply_to_id":156345781},"pull_request":{"url":"https://api.github.com/repos/systemd/systemd/pulls/4191","id":86053844,"html_url":"https://github.com/systemd/systemd/pull/4191","diff_url":"https://github.com/systemd/systemd/pull/4191.diff","patch_url":"https://github.com/systemd/systemd/pull/4191.patch","issue_url":"https://api.github.com/repos/systemd/systemd/issues/4191","number":4191,"state":"open","locked":false,"title":"networkd: add support for wireguard vpn","user":{"login":"Mic92","id":96200,"avatar_url":"https://avatars3.githubusercontent.com/u/96200?v=4","gravatar_id":"","url":"https://api.github.com/users/Mic92","html_url":"https://github.com/Mic92","followers_url":"https://api.github.com/users/Mic92/followers","following_url":"https://api.github.com/users/Mic92/following{/other_user}","gists_url":"https://api.github.com/users/Mic92/gists{/gist_id}","starred_url":"https://api.github.com/users/Mic92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mic92/subscriptions","organizations_url":"https://api.github.com/users/Mic92/orgs","repos_url":"https://api.github.com/users/Mic92/repos","events_url":"https://api.github.com/users/Mic92/events{/privacy}","received_events_url":"https://api.github.com/users/Mic92/received_events","type":"User","site_admin":false},"body":"This pull request adds support for wireguard in systemd-networkd. This is work\nin progress and I want to open a discussion about inclusion of this feature\nbefore putting too much effort in it.\n## What is [WireGuard](https://www.wireguard.io/):\n- WireGuard is a new kernel-builtin vpn with modern fast cryptography\n- it competes with IPsec and Openvpn and beats both in terms of throughput, latency and usability\n## Why I want to include support for WireGuard into systemd-networkd:\n\nWireGuard implements a new interface type called \"wireguard\".\nWireGuard itself ships a command line util called `wg` for key management,\nbut lacks of support to configure ip addresses and routes on the interface.\nMy pull request intend to close this gap by implementing key management as\nwell as the new interface type in systemd-networkd.\n## Status of the WireGuard project:\n- it is an out-of-tree kernel module (>= linux v4.1) and packaged already for\n  the following distribution: Debian, Fedora, Archlinux, OpenSUSE, Gentoo,\n  NixOS, Openwrt, (Ubuntu as PPA)\n- the code is production ready\n- the protocol is still under development and review. Once it reaches 1.0, developers will attempt to upstream the kernel implementation into mainline\n\n_Questions to systemd maintainers_:\n\nUnder what prerequisits wireguard support would be applicable for beeing merged?\n\n_Questions to wireguard team (@zx2c4)_:\n\nWireGuard keys are managed via ioctl, is this API public?\nIf not, is header file [uapi.h](https://git.zx2c4.com/WireGuard/tree/src/uapi.h)\npublic or will there be a netlink interface in future, which can be extented\nbackward-compatible?\n\ncc: @steigr\n","created_at":"2016-09-20T20:50:59Z","updated_at":"2017-12-13T22:50:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1bb1523edb49443627e1fb04bbb35b46acd5a5d1","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/systemd/systemd/pulls/4191/commits","review_comments_url":"https://api.github.com/repos/systemd/systemd/pulls/4191/comments","review_comment_url":"https://api.github.com/repos/systemd/systemd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/systemd/systemd/issues/4191/comments","statuses_url":"https://api.github.com/repos/systemd/systemd/statuses/26ea0a488485ed66cf2cd145ec23f6aeb29ce0b0","head":{"label":"Mic92:master","ref":"master","sha":"26ea0a488485ed66cf2cd145ec23f6aeb29ce0b0","user":{"login":"Mic92","id":96200,"avatar_url":"https://avatars3.githubusercontent.com/u/96200?v=4","gravatar_id":"","url":"https://api.github.com/users/Mic92","html_url":"https://github.com/Mic92","followers_url":"https://api.github.com/users/Mic92/followers","following_url":"https://api.github.com/users/Mic92/following{/other_user}","gists_url":"https://api.github.com/users/Mic92/gists{/gist_id}","starred_url":"https://api.github.com/users/Mic92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mic92/subscriptions","organizations_url":"https://api.github.com/users/Mic92/orgs","repos_url":"https://api.github.com/users/Mic92/repos","events_url":"https://api.github.com/users/Mic92/events{/privacy}","received_events_url":"https://api.github.com/users/Mic92/received_events","type":"User","site_admin":false},"repo":{"id":66374068,"name":"systemd","full_name":"Mic92/systemd","owner":{"login":"Mic92","id":96200,"avatar_url":"https://avatars3.githubusercontent.com/u/96200?v=4","gravatar_id":"","url":"https://api.github.com/users/Mic92","html_url":"https://github.com/Mic92","followers_url":"https://api.github.com/users/Mic92/followers","following_url":"https://api.github.com/users/Mic92/following{/other_user}","gists_url":"https://api.github.com/users/Mic92/gists{/gist_id}","starred_url":"https://api.github.com/users/Mic92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mic92/subscriptions","organizations_url":"https://api.github.com/users/Mic92/orgs","repos_url":"https://api.github.com/users/Mic92/repos","events_url":"https://api.github.com/users/Mic92/events{/privacy}","received_events_url":"https://api.github.com/users/Mic92/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mic92/systemd","description":"systemd upstream","fork":true,"url":"https://api.github.com/repos/Mic92/systemd","forks_url":"https://api.github.com/repos/Mic92/systemd/forks","keys_url":"https://api.github.com/repos/Mic92/systemd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mic92/systemd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mic92/systemd/teams","hooks_url":"https://api.github.com/repos/Mic92/systemd/hooks","issue_events_url":"https://api.github.com/repos/Mic92/systemd/issues/events{/number}","events_url":"https://api.github.com/repos/Mic92/systemd/events","assignees_url":"https://api.github.com/repos/Mic92/systemd/assignees{/user}","branches_url":"https://api.github.com/repos/Mic92/systemd/branches{/branch}","tags_url":"https://api.github.com/repos/Mic92/systemd/tags","blobs_url":"https://api.github.com/repos/Mic92/systemd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mic92/systemd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mic92/systemd/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mic92/systemd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mic92/systemd/statuses/{sha}","languages_url":"https://api.github.com/repos/Mic92/systemd/languages","stargazers_url":"https://api.github.com/repos/Mic92/systemd/stargazers","contributors_url":"https://api.github.com/repos/Mic92/systemd/contributors","subscribers_url":"https://api.github.com/repos/Mic92/systemd/subscribers","subscription_url":"https://api.github.com/repos/Mic92/systemd/subscription","commits_url":"https://api.github.com/repos/Mic92/systemd/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mic92/systemd/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mic92/systemd/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mic92/systemd/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mic92/systemd/contents/{+path}","compare_url":"https://api.github.com/repos/Mic92/systemd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mic92/systemd/merges","archive_url":"https://api.github.com/repos/Mic92/systemd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mic92/systemd/downloads","issues_url":"https://api.github.com/repos/Mic92/systemd/issues{/number}","pulls_url":"https://api.github.com/repos/Mic92/systemd/pulls{/number}","milestones_url":"https://api.github.com/repos/Mic92/systemd/milestones{/number}","notifications_url":"https://api.github.com/repos/Mic92/systemd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mic92/systemd/labels{/name}","releases_url":"https://api.github.com/repos/Mic92/systemd/releases{/id}","deployments_url":"https://api.github.com/repos/Mic92/systemd/deployments","created_at":"2016-08-23T14:23:28Z","updated_at":"2016-08-23T14:23:35Z","pushed_at":"2017-12-13T21:55:44Z","git_url":"git://github.com/Mic92/systemd.git","ssh_url":"git@github.com:Mic92/systemd.git","clone_url":"https://github.com/Mic92/systemd.git","svn_url":"https://github.com/Mic92/systemd","homepage":"http://www.freedesktop.org/wiki/Software/systemd/","size":80161,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"systemd:master","ref":"master","sha":"2de2abad62d4f23f7d9af0c3871f9955896d085c","user":{"login":"systemd","id":1918868,"avatar_url":"https://avatars0.githubusercontent.com/u/1918868?v=4","gravatar_id":"","url":"https://api.github.com/users/systemd","html_url":"https://github.com/systemd","followers_url":"https://api.github.com/users/systemd/followers","following_url":"https://api.github.com/users/systemd/following{/other_user}","gists_url":"https://api.github.com/users/systemd/gists{/gist_id}","starred_url":"https://api.github.com/users/systemd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systemd/subscriptions","organizations_url":"https://api.github.com/users/systemd/orgs","repos_url":"https://api.github.com/users/systemd/repos","events_url":"https://api.github.com/users/systemd/events{/privacy}","received_events_url":"https://api.github.com/users/systemd/received_events","type":"Organization","site_admin":false},"repo":{"id":32873313,"name":"systemd","full_name":"systemd/systemd","owner":{"login":"systemd","id":1918868,"avatar_url":"https://avatars0.githubusercontent.com/u/1918868?v=4","gravatar_id":"","url":"https://api.github.com/users/systemd","html_url":"https://github.com/systemd","followers_url":"https://api.github.com/users/systemd/followers","following_url":"https://api.github.com/users/systemd/following{/other_user}","gists_url":"https://api.github.com/users/systemd/gists{/gist_id}","starred_url":"https://api.github.com/users/systemd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systemd/subscriptions","organizations_url":"https://api.github.com/users/systemd/orgs","repos_url":"https://api.github.com/users/systemd/repos","events_url":"https://api.github.com/users/systemd/events{/privacy}","received_events_url":"https://api.github.com/users/systemd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/systemd/systemd","description":"🐧 ⚙️ – systemd System and Service Manager ","fork":false,"url":"https://api.github.com/repos/systemd/systemd","forks_url":"https://api.github.com/repos/systemd/systemd/forks","keys_url":"https://api.github.com/repos/systemd/systemd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/systemd/systemd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/systemd/systemd/teams","hooks_url":"https://api.github.com/repos/systemd/systemd/hooks","issue_events_url":"https://api.github.com/repos/systemd/systemd/issues/events{/number}","events_url":"https://api.github.com/repos/systemd/systemd/events","assignees_url":"https://api.github.com/repos/systemd/systemd/assignees{/user}","branches_url":"https://api.github.com/repos/systemd/systemd/branches{/branch}","tags_url":"https://api.github.com/repos/systemd/systemd/tags","blobs_url":"https://api.github.com/repos/systemd/systemd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/systemd/systemd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/systemd/systemd/git/refs{/sha}","trees_url":"https://api.github.com/repos/systemd/systemd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/systemd/systemd/statuses/{sha}","languages_url":"https://api.github.com/repos/systemd/systemd/languages","stargazers_url":"https://api.github.com/repos/systemd/systemd/stargazers","contributors_url":"https://api.github.com/repos/systemd/systemd/contributors","subscribers_url":"https://api.github.com/repos/systemd/systemd/subscribers","subscription_url":"https://api.github.com/repos/systemd/systemd/subscription","commits_url":"https://api.github.com/repos/systemd/systemd/commits{/sha}","git_commits_url":"https://api.github.com/repos/systemd/systemd/git/commits{/sha}","comments_url":"https://api.github.com/repos/systemd/systemd/comments{/number}","issue_comment_url":"https://api.github.com/repos/systemd/systemd/issues/comments{/number}","contents_url":"https://api.github.com/repos/systemd/systemd/contents/{+path}","compare_url":"https://api.github.com/repos/systemd/systemd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/systemd/systemd/merges","archive_url":"https://api.github.com/repos/systemd/systemd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/systemd/systemd/downloads","issues_url":"https://api.github.com/repos/systemd/systemd/issues{/number}","pulls_url":"https://api.github.com/repos/systemd/systemd/pulls{/number}","milestones_url":"https://api.github.com/repos/systemd/systemd/milestones{/number}","notifications_url":"https://api.github.com/repos/systemd/systemd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/systemd/systemd/labels{/name}","releases_url":"https://api.github.com/repos/systemd/systemd/releases{/id}","deployments_url":"https://api.github.com/repos/systemd/systemd/deployments","created_at":"2015-03-25T15:27:27Z","updated_at":"2017-12-13T21:36:00Z","pushed_at":"2017-12-13T21:55:46Z","git_url":"git://github.com/systemd/systemd.git","ssh_url":"git@github.com:systemd/systemd.git","clone_url":"https://github.com/systemd/systemd.git","svn_url":"https://github.com/systemd/systemd","homepage":"http://www.freedesktop.org/wiki/Software/systemd/","size":81132,"stargazers_count":2501,"watchers_count":2501,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1041,"mirror_url":null,"archived":false,"open_issues_count":781,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":1041,"open_issues":781,"watchers":2501,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/systemd/systemd/pulls/4191"},"html":{"href":"https://github.com/systemd/systemd/pull/4191"},"issue":{"href":"https://api.github.com/repos/systemd/systemd/issues/4191"},"comments":{"href":"https://api.github.com/repos/systemd/systemd/issues/4191/comments"},"review_comments":{"href":"https://api.github.com/repos/systemd/systemd/pulls/4191/comments"},"review_comment":{"href":"https://api.github.com/repos/systemd/systemd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/systemd/systemd/pulls/4191/commits"},"statuses":{"href":"https://api.github.com/repos/systemd/systemd/statuses/26ea0a488485ed66cf2cd145ec23f6aeb29ce0b0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Mic92"}}