summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2025-07-30 23:51:01 +0800
committerXiao Pan <xyz@flylightning.xyz>2025-07-30 23:51:01 +0800
commit7c67155e639f02d0d04df985eedc09262915b23c (patch)
tree58d9ac9c3d67f3dec4326015b700ae4319d8d9bc /etc
parenta0565e2f8e2a8fcb547c81a982eb4f39532c17fd (diff)
use distcc via wg to insp, use mimic
phosh-osk-stub no need, now named as stevia is a dependency of phosh, stevia is default osk now need linux headers for mimic to build and work tcpdump useful so I add
Diffstat (limited to 'etc')
-rw-r--r--etc/conf.d/distccd-armv82
-rw-r--r--etc/makepkg.conf15
l---------etc/mimic/enu1u2c2.conf1
-rw-r--r--etc/mimic/wlan0.conf42
l---------etc/mimic/wwu1i4.conf1
-rw-r--r--etc/nftables.conf3
-rw-r--r--etc/services1
l---------etc/systemd/system/multi-user.target.wants/mimic@enu1u2c2.service1
l---------etc/systemd/system/multi-user.target.wants/mimic@wlan0.service1
l---------etc/systemd/system/multi-user.target.wants/mimic@wwu1i4.service1
10 files changed, 63 insertions, 5 deletions
diff --git a/etc/conf.d/distccd-armv8 b/etc/conf.d/distccd-armv8
index daefd9fe..298e69b0 100644
--- a/etc/conf.d/distccd-armv8
+++ b/etc/conf.d/distccd-armv8
@@ -5,4 +5,4 @@
# using the --allow switch. See the distccd manpage for more info.
#
-DISTCC_ARGS="--allow-private --log-level info --log-file /tmp/distccd-armv8.log --port 3636"
+DISTCC_ARGS="--allow 10.0.0.1/32 --log-level info --log-file /tmp/distccd-armv8.log --port 49710"
diff --git a/etc/makepkg.conf b/etc/makepkg.conf
index 112058ce..541847f0 100644
--- a/etc/makepkg.conf
+++ b/etc/makepkg.conf
@@ -42,7 +42,11 @@ CHOST="aarch64-unknown-linux-gnu"
# -march (or -mcpu) builds exclusively for an architecture
# -mtune optimizes for an architecture, but builds for whole processor family
CPPFLAGS=""
-CFLAGS="-march=native -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions \
+# https://wiki.archlinux.org/title/Distcc#For_use_with_makepkg suggest "The
+# -march=native flag cannot be used in the CFLAGS and CXXFLAGS variables,
+# otherwise distccd will not distribute work to other machines." I want to use
+# distcc to let xyzinsp help compile, so I do not use -march=native on pp
+CFLAGS="-march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security \
-fstack-clash-protection \
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
@@ -69,11 +73,16 @@ DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
#-- check: Run the check() function if present in the PKGBUILD
#-- sign: Generate PGP signature file
#
-BUILDENV=(!distcc color !ccache check !sign)
+BUILDENV=(distcc color !ccache check !sign)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
-#DISTCC_HOSTS=""
+# I choose to use default --jobs on insp distccd-armv8, it is max insp threads
+# 4 + 2 = 6, I choose to use that here also.
+# https://wiki.archlinux.org/title/Distcc#For_use_with_makepkg suggest this
+# number to be insp's max number of threads, but I would like to use a higher
+# number to encourage pp distcc to use insp
+DISTCC_HOSTS="10.0.0.1:49710/6"
#
#-- Specify a directory for package building.
#BUILDDIR=/tmp/makepkg
diff --git a/etc/mimic/enu1u2c2.conf b/etc/mimic/enu1u2c2.conf
new file mode 120000
index 00000000..74ec9c19
--- /dev/null
+++ b/etc/mimic/enu1u2c2.conf
@@ -0,0 +1 @@
+wlan0.conf \ No newline at end of file
diff --git a/etc/mimic/wlan0.conf b/etc/mimic/wlan0.conf
new file mode 100644
index 00000000..68160109
--- /dev/null
+++ b/etc/mimic/wlan0.conf
@@ -0,0 +1,42 @@
+# This is an example configuration for Mimic. For each interface, you may
+# create <interface>.conf in /etc/mimic and in the following format to
+# pass arguments to Mimic's systemd service (mimic@<interface>.service).
+#
+# Each configuration should be in the format of `key=value`. There might be
+# whitespaces between key, '=' and value, and should be kept in one line. Empty
+# lines and ones that start with '#' are ignored.
+
+# Sets log verbosity. Log level equal to or higher (in number) than log
+# verbosity will be discarded. Both number and string matching log levels are
+# accepted. Number must be greater than or equal to 0. Defaults to info (2).
+#
+# Log levels:
+# 0 - error (cannot be discarded)
+# 1 - warn
+# 2 - info
+# 3 - debug
+# 4 - trace
+#log.verbosity = trace
+
+# Specify link layer type, can be 'eth' (Ethernet) or 'none' (no L2 header,
+# like PPP or TUN). Defaults to 'eth'.
+#link_type = eth
+
+# Force XDP attach mode, either 'skb' or 'native'. Defaults to 'native' if
+# target interface supports it, or 'skb'.
+#xdp_mode = skb
+
+# Use libxdp instead of libbpf to load XDP program. libxdp supports chaining
+# multiple XDP programs on one interface. Mimic loads libxdp dynamically using
+# dlopen. Defaults to false.
+#use_libxdp = false
+
+# Whether to always use maximum window size in TCP packets. Defaults to false.
+#max_window = false
+
+# Specifies which packets should be processed by Mimic. Can be set more
+# than once to allow parallel rules (OR'ed).
+#
+# Filter format follows `(local|remote)=IP:port`. For IPv6, IP addresses
+# need to be surrounded by square brackets. See below for examples.
+filter = remote=104.224.159.210:54635
diff --git a/etc/mimic/wwu1i4.conf b/etc/mimic/wwu1i4.conf
new file mode 120000
index 00000000..74ec9c19
--- /dev/null
+++ b/etc/mimic/wwu1i4.conf
@@ -0,0 +1 @@
+wlan0.conf \ No newline at end of file
diff --git a/etc/nftables.conf b/etc/nftables.conf
index b3b58a2c..e70f2073 100644
--- a/etc/nftables.conf
+++ b/etc/nftables.conf
@@ -23,7 +23,8 @@ table inet my_table {
tcp dport ssh accept
tcp dport qrcp accept
udp dport mdns accept
- #tcp dport iperf3 accept
+ tcp dport iperf3 accept
+ udp dport wireguard accept
pkttype host limit rate 5/second counter reject with icmpx type admin-prohibited
counter comment "count any other traffic"
diff --git a/etc/services b/etc/services
index c46a5712..f762e50f 100644
--- a/etc/services
+++ b/etc/services
@@ -11521,4 +11521,5 @@ nusdp-disc 49001/udp
inspider 49150/tcp
# my services
qrcp 49153/tcp
+wireguard 49432/udp
iperf3 53497/tcp
diff --git a/etc/systemd/system/multi-user.target.wants/mimic@enu1u2c2.service b/etc/systemd/system/multi-user.target.wants/mimic@enu1u2c2.service
new file mode 120000
index 00000000..dce9a731
--- /dev/null
+++ b/etc/systemd/system/multi-user.target.wants/mimic@enu1u2c2.service
@@ -0,0 +1 @@
+/usr/lib/systemd/system/mimic@.service \ No newline at end of file
diff --git a/etc/systemd/system/multi-user.target.wants/mimic@wlan0.service b/etc/systemd/system/multi-user.target.wants/mimic@wlan0.service
new file mode 120000
index 00000000..dce9a731
--- /dev/null
+++ b/etc/systemd/system/multi-user.target.wants/mimic@wlan0.service
@@ -0,0 +1 @@
+/usr/lib/systemd/system/mimic@.service \ No newline at end of file
diff --git a/etc/systemd/system/multi-user.target.wants/mimic@wwu1i4.service b/etc/systemd/system/multi-user.target.wants/mimic@wwu1i4.service
new file mode 120000
index 00000000..dce9a731
--- /dev/null
+++ b/etc/systemd/system/multi-user.target.wants/mimic@wwu1i4.service
@@ -0,0 +1 @@
+/usr/lib/systemd/system/mimic@.service \ No newline at end of file