forked from opusb/tpclash2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flatcar.butane.yaml
83 lines (77 loc) · 2.34 KB
/
flatcar.butane.yaml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
variant: flatcar
version: 1.0.0
kernel_arguments:
should_not_exist:
- flatcar.autologin
passwd:
users:
- name: root
# openssl passwd -6 -salt SALT PASSWORD
password_hash: $6$kovacs$.UwiKUJuLYO/.y7Qcxi/owx2H3dSy3GeX9j5NEyglpdWlGjSJZ0ITcN7NJk3yuXeU.MUYzw/sbZmG/tkVQD0j0
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMskC9phaoO1WJkQOvXcUxH+DlG8u/2u1ReMXOO9vkbW [email protected]
storage:
links:
- path: /etc/localtime
target: ../usr/share/zoneinfo/Asia/Shanghai
files:
# Update policy
- path: /etc/flatcar/update.conf
mode: 0420
contents:
inline: |
REBOOT_STRATEGY=reboot
LOCKSMITHD_REBOOT_WINDOW_START=10:30
LOCKSMITHD_REBOOT_WINDOW_LENGTH=1h
# Set hostname
- path: /etc/hostname
mode: 0644
contents:
inline: tpclash
# Set static ip
- path: /etc/systemd/network/25-xnet.network
contents:
inline: |
[Match]
Name=en*
[Network]
DHCP=no
NTP=time.windows.com time.apple.com
[Address]
Address=192.168.1.11/24
[Route]
Destination=0.0.0.0/0
Gateway=192.168.1.1
# Fix clash `tun.auto-route`
- path: /etc/systemd/resolved.conf.d/25-xnet.conf
contents:
inline: |
[Resolve]
DNS=223.5.5.5
DNS=119.29.29.29
Domains=~.
DNSStubListener=no
systemd:
units:
- name: tpclash.service
enabled: true
contents: |
[Unit]
Description=Transparent proxy tool for Clash
After=network-online.target
Wants=network-online.target
[Service]
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker stop tpclash
ExecStartPre=-/usr/bin/docker rm tpclash
ExecStartPre=/usr/bin/docker pull mritd/tpclash
ExecStart=/usr/bin/docker run --tty \
--privileged \
--network host \
--name tpclash \
-v /data:/data \
-v /run:/run \
mritd/tpclash tpclash \
--config https://example.com/clash.yaml
[Install]
WantedBy=multi-user.target