util  Check-in [99704cfae0]

Overview
Comment:add wgsync base
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 99704cfae0a492846c04837dec52233f9418d65b105eff882151a32466352f91
User & Date: lexi on 2022-10-31 21:27:27
Other Links: manifest | tags
Context
2022-10-31
23:37
fix lack of alignment and small max file size for mkup; check in missing files check-in: 7bafdb9f90 user: lexi tags: trunk
21:27
add wgsync base check-in: 99704cfae0 user: lexi tags: trunk
2022-10-27
20:04
add soda check-in: 0d4aa1c43a user: lexi tags: trunk
Changes

Added wgsync/makefile version [b1a751a53e].





























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
pq-inc != pkg-config --cflags libpq
pq-lib != pkg-config --libs libpq

cc-flags = -std=c2x $(pq-inc)
ld-flags = $(pq-lib)

B = build

# link rule 
.PHONY: wgsync
$B/wgsync: $B/wgsync.o $B/wireguard.o | $B/
	$(CC) $(ld-flags) $^ -o $@

# build rules 
$B/%.o: src/%.c | $B/
	$(CC) $(cc-flags) -c $< -o $@

$B/wireguard.o: ext/wglib/wireguard.c ext/wglib/wireguard.h | $B/
	$(CC) -std=c11 -c $< -o $@

# dep listings
$B/wgsync.o: ext/wglib/wireguard.h

# fetch rules
%/:
	mkdir -p $@

wg-lib-uri = https://git.zx2c4.com/wireguard-tools/plain/contrib/embeddable-wg-library
ext/wglib/%: | ext/wglib/
	curl $(wg-lib-uri)/$* >$@

Added wgsync/src/wgsync.c version [dbf75c60c6].











>
>
>
>
>
1
2
3
4
5
#include <libpq-fe.h>

int main(int argc, char** argv) {
	return 0;
}

Added wgsync/wgsync.ct version [2440d0cfbb].





>
>
1
2
# wgsync
wgsync is a utility used to sync VPN keys and rules between the kernel and a postgres database. it can run either as a oneshot utility or a daemon that re-syncs the configuration every time a signal is sent.