Skip to content

Commit

Permalink
Apply patch provided by @rain2fog in adrienverge#801
Browse files Browse the repository at this point in the history
pppd → tun interface + embedded PPP code
  • Loading branch information
DimitriPapadopoulos committed Feb 19, 2021
1 parent d6ba9db commit 478c125
Show file tree
Hide file tree
Showing 5 changed files with 1,070 additions and 17 deletions.
5 changes: 5 additions & 0 deletions src/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,11 @@ static int parse_xml_config(struct tunnel *tunnel, const char *buffer)
if (!gateway)
log_warn("No gateway address, using interface for routing\n");

if (tunnel->use_tun) {
tunnel->ipv4.ip_addr.s_addr = inet_addr(gateway);
tunnel->ipv4.peer_addr.s_addr = inet_addr("192.0.2.1");
}

// The dns search string
val = buffer;
while ((val = xml_find('<', "dns", val, 2))) {
Expand Down
Loading

0 comments on commit 478c125

Please sign in to comment.