# blocks

id: 20240220155406-voba4du
parent_id: 20240220155352-vpsps34
root_id: 20240220152630-qly715s
hash: 0657622
box: 20240220152634-yy4s6nv
path: /20240220152630-qly715s.sy
hpath: /docker部署
type: c
ial: {: id="20240220155406-voba4du" updated="20240220155420"}
created: 20240220155406
updated: 20240220155420
content:
docker run -d --name=wxedge --restart=always --privileged --net=host  --tmpfs /run --tmpfs /tmp -v /home:/storage:rw  registry.hub.docker.com/onething1/wxedge

markdown:
```
docker run -d --name=wxedge --restart=always --privileged --net=host  --tmpfs /run --tmpfs /tmp -v /home:/storage:rw  registry.hub.docker.com/onething1/wxedge
```


id: 20240220153709-u8j87pm
parent_id: 20240220154943-lup3omh
root_id: 20240220152630-qly715s
hash: 2b5cc3f
box: 20240220152634-yy4s6nv
path: /20240220152630-qly715s.sy
hpath: /docker部署
type: c
ial: {: id="20240220153709-u8j87pm" updated="20240220155439"}
created: 20240220153709
updated: 20240220155439
content:
docker run -d --name=xunlei --hostname=mynas --net=host -v /mnt/sdb1/xunlei:/xunlei/data -v /mnt/sdb1/downloads:/xunlei/downloads --restart=unless-stopped --privileged cnk3x/xunlei:latest

markdown:
```
docker run -d --name=xunlei --hostname=mynas --net=host -v /mnt/sdb1/xunlei:/xunlei/data -v /mnt/sdb1/downloads:/xunlei/downloads --restart=unless-stopped --privileged cnk3x/xunlei:latest
```


id: 20240220153858-ktmo36h
parent_id: 20240220155038-p3qa1po
root_id: 20240220152630-qly715s
hash: ec8ca36
box: 20240220152634-yy4s6nv
path: /20240220152630-qly715s.sy
hpath: /docker部署
type: c
ial: {: id="20240220153858-ktmo36h" updated="20240220155513"}
created: 20240220153858
updated: 20240220155513
content:
docker run --name=webdav -d -e USERNAME=test -e PASSWORD=test -v /路径:/webdav -p 8920:80 idelsink/webdav

markdown:
```
docker run --name=webdav -d -e USERNAME=test -e PASSWORD=test -v /路径:/webdav -p 8920:80 idelsink/webdav
```


id: 20240220155612-wqdfr69
parent_id: 20240220155604-x6es5tu
root_id: 20240220152630-qly715s
hash: b8f7244
box: 20240220152634-yy4s6nv
path: /20240220152630-qly715s.sy
hpath: /docker部署
type: c
ial: {: id="20240220155612-wqdfr69" updated="20240220155702"}
created: 20240220155612
updated: 20240220155702
content:
version: "3.3"
  
services:
  db:
    image: mysql:8.0
    volumes:
      - ./db_data:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: wordpress
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpress
  
  wordpress:
    depends_on:
      - db
    image: wordpress:latest
    volumes:
      - ./wordpress_data:/var/www/html
    ports:
      - "10001:80"
    restart: always
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
      WORDPRESS_DB_NAME: wordpress
volumes:
  db_data: {}
  wordpress_data: {}

markdown:
```
version: "3.3"
  
services:
  db:
    image: mysql:8.0
    volumes:
      - ./db_data:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: wordpress
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpress
  
  wordpress:
    depends_on:
      - db
    image: wordpress:latest
    volumes:
      - ./wordpress_data:/var/www/html
    ports:
      - "10001:80"
    restart: always
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
      WORDPRESS_DB_NAME: wordpress
volumes:
  db_data: {}
  wordpress_data: {}
```


id: 20240220162134-8r9rubv
parent_id: 20240220162142-9xvv7w5
root_id: 20240220162043-1k7wzbt
hash: 9a667e0
box: 20240220161248-rpjn91w
path: /20240220162043-1k7wzbt.sy
hpath: /大年初一
type: video
ial: {: id="20240220162134-8r9rubv" updated="20240220162156"}
created: 20240220162134
updated: 20240220162156
markdown:
<video controls="controls" src="assets/sd1707474498_2-20240220162144-2s38snm.mp4" data-src="assets/sd1707474498_2-20240220162144-2s38snm.mp4"></video>


id: 20240220162255-selmcbl
parent_id: 20240220162200-uxkl8lq
root_id: 20240220162043-1k7wzbt
hash: dab201e
box: 20240220161248-rpjn91w
path: /20240220162043-1k7wzbt.sy
hpath: /大年初一
type: p
ial: {: id="20240220162255-selmcbl" updated="20240220162255"}
created: 20240220162255
updated: 20240220162255
content:
​c7ee84e0a9b1f4247d1312abe32e8ea3-1024x768 assets/c7ee84e0a9b1f4247d1312abe32e8ea3-1024x768-20240220162305-y6854vo.jpeg ​

markdown:
​![c7ee84e0a9b1f4247d1312abe32e8ea3-1024x768](assets/c7ee84e0a9b1f4247d1312abe32e8ea3-1024x768-20240220162305-y6854vo.jpeg)​


id: 20240220192743-y6tmxig
parent_id: 20240220161308-qgrvt1j
root_id: 20240220161308-qgrvt1j
hash: 90a1b57
box: 20240220161248-rpjn91w
path: /20240220161308-qgrvt1j.sy
hpath: /初三苍南一日游
type: audio
ial: {: id="20240220192743-y6tmxig" updated="20240220192743"}
created: 20240220192743
updated: 20240220192743
markdown:
<audio controls="controls" src="assets/何等恩典钢琴版-20240220192743-xqcqbjs.mp3" data-src="assets/何等恩典钢琴版-20240220192743-xqcqbjs.mp3"></audio>


id: 20240220155932-zumdr2s
parent_id: 20240220154246-8oljawt
root_id: 20240220154235-itgmehu
hash: dff76da
box: 20240220152634-yy4s6nv
path: /20240220154235-itgmehu.sy
hpath: /混杂配置
type: c
ial: {: id="20240220155932-zumdr2s" updated="20240220155949" heading-fold="1"}
created: 20240220155932
updated: 20240220155949
content:
user  root;
worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    server {
        listen       85;
        server_name  localhost;
        charset utf-8;
        location / {
            root   /home;
            autoindex on;
            autoindex_exact_size off;
            auth_basic 'pxx';
            auth_basic_user_file /opt/nginx/conf/htpasswd;
         }
         location ~* ^.*\.txt$ {
                 return 404;
         }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
    include /opt/nginx/*.conf;
}

markdown:
```
user  root;
worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    server {
        listen       85;
        server_name  localhost;
        charset utf-8;
        location / {
            root   /home;
            autoindex on;
            autoindex_exact_size off;
            auth_basic 'pxx';
            auth_basic_user_file /opt/nginx/conf/htpasswd;
         }
         location ~* ^.*\.txt$ {
                 return 404;
         }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
    include /opt/nginx/*.conf;
}
```


id: 20240312082321-21tl7me
parent_id: 20240312081751-nqn7qhs
root_id: 20240312081751-nqn7qhs
hash: a5116e4
box: 20240220161248-rpjn91w
path: /20240312081751-nqn7qhs.sy
hpath: /农历2月2，俗称龙抬头。
type: p
ial: {: id="20240312082321-21tl7me" updated="20240312083038"}
created: 20240312082321
updated: 20240312083038
content:
晚上的雾气笼罩着荣安府，将自己置身与伸手不见五指的澡堂中，也犹如自己的记忆若现若隐。有了这样的环境，我晚上睡觉的时候也梦到了一条盘踞在天边的青龙，很轻舞，它在我的头顶上飞过，我能清晰的看到它的鳍与鳞。我觉得它就是用纸做的风筝，过于灵动，没有一点肉感。

markdown:
晚上的雾气笼罩着荣安府，将自己置身与伸手不见五指的澡堂中，也犹如自己的记忆若现若隐。有了这样的环境，我晚上睡觉的时候也梦到了一条盘踞在天边的青龙，很轻舞，它在我的头顶上飞过，我能清晰的看到它的鳍与鳞。我觉得它就是用纸做的风筝，过于灵动，没有一点肉感。


id: 20240312081751-nqn7qhs
root_id: 20240312081751-nqn7qhs
hash: 508afe1
box: 20240220161248-rpjn91w
path: /20240312081751-nqn7qhs.sy
hpath: /农历2月2，俗称龙抬头。
content: 农历2月2，俗称龙抬头。
fcontent: 农历2月2，俗称龙抬头。
type: d
created: 20240312081751
updated: 20240312083316
ial:
{: icon="1f600" id="20240312081751-nqn7qhs" title="农历2月2，俗称龙抬头。" title-img="background-image:linear-gradient(120deg, #a6c0fe 0%, #f68084 100%)" updated="20240312083316"}


id: 20240312081915-0jiuxeh
parent_id: 20240312081751-nqn7qhs
root_id: 20240312081751-nqn7qhs
hash: 2dd477c
box: 20240220161248-rpjn91w
path: /20240312081751-nqn7qhs.sy
hpath: /农历2月2，俗称龙抬头。
type: p
ial: {: id="20240312081915-0jiuxeh" updated="20240312083316"}
created: 20240312081915
updated: 20240312083316
content:
​31bd2be297b9886bb59777ebbbdbcf29 assets/31bd2be297b9886bb59777ebbbdbcf29-20240312083236-t5djybu.jpeg ​​IMG_0390 assets/IMG_0390-20240312081915-6e0otf3.jpeg ​

markdown:
​![31bd2be297b9886bb59777ebbbdbcf29](assets/31bd2be297b9886bb59777ebbbdbcf29-20240312083236-t5djybu.jpeg)​​![IMG_0390](assets/IMG_0390-20240312081915-6e0otf3.jpeg)​


id: 20240317203903-isifv80
parent_id: 20240317203654-xatqdu5
root_id: 20240317203654-xatqdu5
hash: c9fd8f7
box: 20240317203650-sh7upi0
path: /20240317203654-xatqdu5.sy
hpath: /创建 clash 应用程序
type: c
ial: {: id="20240317203903-isifv80" updated="20240317203911"}
created: 20240317203903
updated: 20240317203911
content:
cd ~/.local/share/applications
touch clash.desktop
[Desktop Entry]
Name=clash for windows
Icon=~/Documents/clash.png
Exec=~/Downloads/clash/cfw
Type=Application
chmod +x clash.desktop

markdown:
```
cd ~/.local/share/applications
touch clash.desktop
[Desktop Entry]
Name=clash for windows
Icon=~/Documents/clash.png
Exec=~/Downloads/clash/cfw
Type=Application
chmod +x clash.desktop
```


id: 20240321211212-sx462o2
parent_id: 20240321211212-ofbfc3b
root_id: 20240321211212-ofbfc3b
hash: d060e90
box: 20240317203650-sh7upi0
path: /20240321211212-ofbfc3b.sy
hpath: /ngixn 自动index
type: c
ial: {: id="20240321211212-sx462o2" updated="20240321211557"}
created: 20240321211212
updated: 20240321211557
content:
user  root;
worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    server {
        listen       85;
        server_name  localhost;
        charset utf-8;
        location / {
            root   /home;
            autoindex on;
 #           autoindex_exact_size off;
 #           auth_basic 'pxx';
 #           auth_basic_user_file /opt/nginx/conf/htpasswd;
         }
         location ~* ^.*\.txt$ {
                 return 404;
         }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
    include /opt/nginx/*.conf;
}

markdown:
```
user  root;
worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    server {
        listen       85;
        server_name  localhost;
        charset utf-8;
        location / {
            root   /home;
            autoindex on;
 #           autoindex_exact_size off;
 #           auth_basic 'pxx';
 #           auth_basic_user_file /opt/nginx/conf/htpasswd;
         }
         location ~* ^.*\.txt$ {
                 return 404;
         }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
    include /opt/nginx/*.conf;
}
```


id: 20240220152641-a9yogy5
parent_id: 20240220154513-n5298wz
root_id: 20240220152630-qly715s
hash: 37917ad
box: 20240220152634-yy4s6nv
path: /20240220152630-qly715s.sy
hpath: /docker部署
type: c
ial: {: id="20240220152641-a9yogy5" updated="20240402202827"}
created: 20240220152641
updated: 20240402202827
content:
docker run -d  -v /mnt/sata3-3/soft/images/siyuan:/siyuan/workspace -p 2000:6806  b3log/siyuan --workspace=/siyuan/workspace/ --accessAuthCode=www
docker run -d -v /root/siyuan:/siyuan/workspace  -e PUID=$UID  -e PGID=$GID  -p 6806:6806 b3log/siyuan  --workspace=/siyuan/workspace/ --accessAuthCode=xxx

markdown:
```
docker run -d  -v /mnt/sata3-3/soft/images/siyuan:/siyuan/workspace -p 2000:6806  b3log/siyuan --workspace=/siyuan/workspace/ --accessAuthCode=www
docker run -d -v /root/siyuan:/siyuan/workspace  -e PUID=$UID  -e PGID=$GID  -p 6806:6806 b3log/siyuan  --workspace=/siyuan/workspace/ --accessAuthCode=xxx
```


id: 20240220155833-eunf6a7
parent_id: 20240220154636-cinpkx9
root_id: 20240220152630-qly715s
hash: 67c60fd
box: 20240220152634-yy4s6nv
path: /20240220152630-qly715s.sy
hpath: /docker部署
type: c
ial: {: id="20240220155833-eunf6a7" updated="20240402210401"}
created: 20240220155833
updated: 20240402210401
content:
version: '3'

services:
    db:
        image: postgres:latest
        restart: unless-stopped
        environment:
            - POSTGRES_PASSWORD=joplin
            - POSTGRES_USER=joplin
            - POSTGRES_DB=joplin
    app:
        image: joplin/server:latest
        depends_on:
            - db
        ports:
            - "22300:22300"
        restart: unless-stopped
        environment:
            - APP_PORT=22300
            - APP_BASE_URL=http://192.168.0.183:22300
            - DB_CLIENT=pg
            - POSTGRES_PASSWORD=joplin
            - POSTGRES_DATABASE=joplin
            - POSTGRES_USER=joplin
            - POSTGRES_PORT=5432
            - POSTGRES_HOST=db

markdown:
```
version: '3'

services:
    db:
        image: postgres:latest
        restart: unless-stopped
        environment:
            - POSTGRES_PASSWORD=joplin
            - POSTGRES_USER=joplin
            - POSTGRES_DB=joplin
    app:
        image: joplin/server:latest
        depends_on:
            - db
        ports:
            - "22300:22300"
        restart: unless-stopped
        environment:
            - APP_PORT=22300
            - APP_BASE_URL=http://192.168.0.183:22300
            - DB_CLIENT=pg
            - POSTGRES_PASSWORD=joplin
            - POSTGRES_DATABASE=joplin
            - POSTGRES_USER=joplin
            - POSTGRES_PORT=5432
            - POSTGRES_HOST=db
```


id: 20240402210439-x55x9dt
parent_id: 20240220154636-cinpkx9
root_id: 20240220152630-qly715s
hash: e240ee9
box: 20240220152634-yy4s6nv
path: /20240220152630-qly715s.sy
hpath: /docker部署
type: c
ial: {: id="20240402210439-x55x9dt" updated="20240402210442"}
created: 20240402210439
updated: 20240402210442
content:
docker run -d   -e PUID=1000   -e PGID=1000   -e TZ=Etc/UTC   -p 8888:8888  -p 55555:55555   -v /root/siyuan1/config:/config  -v /root/siyuan1:/downloads  -v /root/siyuan1:/sync  --restart unless-stopped lscr.io/linuxserver/resilio-sync:latest

markdown:
```
docker run -d   -e PUID=1000   -e PGID=1000   -e TZ=Etc/UTC   -p 8888:8888  -p 55555:55555   -v /root/siyuan1/config:/config  -v /root/siyuan1:/downloads  -v /root/siyuan1:/sync  --restart unless-stopped lscr.io/linuxserver/resilio-sync:latest
```


id: 20240220161110-oxm1fgf
parent_id: 20240220161103-e2vmqn9
root_id: 20240220154235-itgmehu
hash: 786b5a7
box: 20240220152634-yy4s6nv
path: /20240220154235-itgmehu.sy
hpath: /混杂配置
type: c
ial: {: id="20240220161110-oxm1fgf" updated="20240220161209"}
created: 20240220161110
updated: 20240220161209
content:
apt install cifs-utils
mount -t cifs //192.168.0.9/aaa /mnt/win11 -o username=pxx,password=888888
自动挂载
/etc/fstab
//192.168.0.208/test /mnt/win10 cifs username=pxx,password=888888,rw 0 0

markdown:
```
apt install cifs-utils
mount -t cifs //192.168.0.9/aaa /mnt/win11 -o username=pxx,password=888888
自动挂载
/etc/fstab
//192.168.0.208/test /mnt/win10 cifs username=pxx,password=888888,rw 0 0
```


id: 20241105105544-t9sp1rk
parent_id: 20241105100836-jg2yqcd
root_id: 20241105100836-jg2yqcd
hash: 83d5bb8
box: 20241105100832-vhep4xw
path: /20241105100836-jg2yqcd.sy
hpath: /小笔记
type: c
ial: {: id="20241105105544-t9sp1rk" updated="20241105105544"}
created: 20241105105544
updated: 20241105105544
content:
df.eq() # 等于相等 ==
df.ne() # 不等于 !=
df.le() # 小于等于 >=
df.lt() # 小于 <
df.ge() # 大于等于 >=
df.gt() # 大于 >
# 都支持  axis{0 or ‘index’, 1 or ‘columns’}, default ‘columns’
df[df.Q1.ne(89)] # Q1 不等于8
df.loc[df.Q1.gt(90) & df.Q2.lt(90)] # and 关系 Q1>90 Q2<90

markdown:
```undefined
df.eq() # 等于相等 ==
df.ne() # 不等于 !=
df.le() # 小于等于 >=
df.lt() # 小于 <
df.ge() # 大于等于 >=
df.gt() # 大于 >
# 都支持  axis{0 or ‘index’, 1 or ‘columns’}, default ‘columns’
df[df.Q1.ne(89)] # Q1 不等于8
df.loc[df.Q1.gt(90) & df.Q2.lt(90)] # and 关系 Q1>90 Q2<90
```


id: 20241105113107-sm16z5b
parent_id: 20241105100836-jg2yqcd
root_id: 20241105100836-jg2yqcd
hash: 0293b46
box: 20241105100832-vhep4xw
path: /20241105100836-jg2yqcd.sy
hpath: /小笔记
type: c
ial: {: id="20241105113107-sm16z5b" updated="20241105113107"}
created: 20241105113107
updated: 20241105113107
content:
bins = [0,1000,2000,4000,6000,float('inf')]
labels=['0-1000','1000-2000','2000-3000','3000-4000','4000+']
df1['保费区间'] = pd.cut(df1['标准保费'], bins=bins, labels=labels, right=False)

markdown:
```undefined
bins = [0,1000,2000,4000,6000,float('inf')]
labels=['0-1000','1000-2000','2000-3000','3000-4000','4000+']
df1['保费区间'] = pd.cut(df1['标准保费'], bins=bins, labels=labels, right=False)
```


id: 20241105100836-jg2yqcd
root_id: 20241105100836-jg2yqcd
hash: b31f186
box: 20241105100832-vhep4xw
path: /20241105100836-jg2yqcd.sy
hpath: /小笔记
content: 小笔记
fcontent: 小笔记
type: d
created: 20241105100836
updated: 20241105201327
ial:
{: icon="1f170-fe0f" id="20241105100836-jg2yqcd" title="小笔记" title-img="background-image:linear-gradient(-225deg, #69EACB 0%, #EACCF8 48%, #6654F1 100%)" updated="20241105201327"}


id: 20241105201327-xic3f5x
parent_id: 20241105100836-jg2yqcd
root_id: 20241105100836-jg2yqcd
hash: f1b4e6e
box: 20241105100832-vhep4xw
path: /20241105100836-jg2yqcd.sy
hpath: /小笔记
type: c
ial: {: id="20241105201327-xic3f5x" updated="20241105201327"}
created: 20241105201327
updated: 20241105201327
content:
print(df.columns.str.len()==4)
print(df.loc[lambda a:(a.index)%2==0,lambda a: a.columns.str.len() == 4])
print(df.loc[:, lambda a: [i for i in a.columns if '保险' in i]])

markdown:
```undefined
print(df.columns.str.len()==4)
print(df.loc[lambda a:(a.index)%2==0,lambda a: a.columns.str.len() == 4])
print(df.loc[:, lambda a: [i for i in a.columns if '保险' in i]])
```


id: 20240220160118-fya9fnj
parent_id: 20240220160037-dorz184
root_id: 20240220154235-itgmehu
hash: 46c152b
box: 20240220152634-yy4s6nv
path: /20240220154235-itgmehu.sy
hpath: /混杂配置
type: c
ial: {: id="20240220160118-fya9fnj" updated="20240220160130"}
created: 20240220160118
updated: 20240220160130
content:
服务器
vi /etc/exports
/mnt/sata3-3/other-pc *(rw,sync,no_subtree_check,fsid=123)
客户端
mount -t nfs 192.168.0.8:/mnt/sata3-3/other-pc /home

markdown:
```
服务器
vi /etc/exports
/mnt/sata3-3/other-pc *(rw,sync,no_subtree_check,fsid=123)
客户端
mount -t nfs 192.168.0.8:/mnt/sata3-3/other-pc /home
```


id: 20240220160410-18lr79t
parent_id: 20240220160347-uq25ssv
root_id: 20240220154235-itgmehu
hash: f0b2cb3
box: 20240220152634-yy4s6nv
path: /20240220154235-itgmehu.sy
hpath: /混杂配置
type: c
ial: {: updated="20240220160426" id="20240220160410-18lr79t"}
created: 20240220160410
updated: 20240220160426
content:
安装必要的软件包以便允许 apt 通过 HTTPS 使用存储库
sudo apt install apt-transport-https ca-certificates curl software-properties-common
添加 Docker 的官方 GPG 密钥
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
添加 Docker 的官方存储库
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
安装 Docker
sudo apt install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker

markdown:
```
安装必要的软件包以便允许 apt 通过 HTTPS 使用存储库
sudo apt install apt-transport-https ca-certificates curl software-properties-common
添加 Docker 的官方 GPG 密钥
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
添加 Docker 的官方存储库
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
安装 Docker
sudo apt install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
```


id: 20250123171056-fiwr1pv
parent_id: 20241211151538-rsak465
root_id: 20241211151538-rsak465
hash: e86f660
box: 20240317203650-sh7upi0
path: /20241211151538-rsak465.sy
hpath: /docker openvpn
type: c
ial: {: id="20250123171056-fiwr1pv" updated="20250127103540"}
created: 20250123171056
updated: 20250127103540
content:
docker run -v /opt/openvpn:/etc/openvpn --rm kylemanna/openvpn:latest ovpn_genconfig -u tcp://39.174.229.143
docker run -v /opt/openvpn:/etc/openvpn --rm -it kylemanna/openvpn:latest ovpn_initpki


docker run -d --name=openvpn    -v /opt/openvpn:/etc/openvpn   -p 1194:1194/tcp   --cap-add NET_ADMIN   --restart always   --privileged   kylemanna/openvpn:latest

docker run -d \
  --name openvpn \
  -v /opt/openvpn:/etc/openvpn \
  -p 1194:1194/tcp \
  --cap-add NET_ADMIN \
  --restart always \
  --privileged \
  kylemanna/openvpn:latest

docker exec -it openvpn /bin/bash
ovpn_genconfig -u tcp://39.174.229.143
ovpn_initpki
888888
easyrsa build-client-full CLIENT_NAME nopass
ovpn_getclient CLIENT_NAME > /etc/openvpn/CLIENT_NAME.ovpn






docker-compose run --rm openvpn ovpn_genconfig -u udp://39.174.229.143
docker-compose run --rm openvpn ovpn_initpki


# 生成客户端证书，而且这个证书是无需密码的
docker-compose run --rm openvpn easyrsa build-client-full client1 nopass
# 导出已生成的客户端配置文件（.ovpn 文件）
docker-compose run --rm openvpn ovpn_getclient client1 > mnt/client1.ovpn

# 生成证书撤销列表（CRL），并且额外指示 EasyRSA 更新相关数据库或索引
docker-compose run --rm openvpn easyrsa gen-crl update-db
# 重启 openvpn 服务
docker-compose up -d openvpn


# 导出已生成的客户端配置文件（.ovpn 文件）
docker-compose run --rm openvpn ovpn_getclient client0 > ./client0.ovpn

markdown:
```undefined

docker run -v /opt/openvpn:/etc/openvpn --rm kylemanna/openvpn:latest ovpn_genconfig -u tcp://39.174.229.143
docker run -v /opt/openvpn:/etc/openvpn --rm -it kylemanna/openvpn:latest ovpn_initpki


docker run -d --name=openvpn    -v /opt/openvpn:/etc/openvpn   -p 1194:1194/tcp   --cap-add NET_ADMIN   --restart always   --privileged   kylemanna/openvpn:latest

docker run -d \
  --name openvpn \
  -v /opt/openvpn:/etc/openvpn \
  -p 1194:1194/tcp \
  --cap-add NET_ADMIN \
  --restart always \
  --privileged \
  kylemanna/openvpn:latest

docker exec -it openvpn /bin/bash
ovpn_genconfig -u tcp://39.174.229.143
ovpn_initpki
888888
easyrsa build-client-full CLIENT_NAME nopass
ovpn_getclient CLIENT_NAME > /etc/openvpn/CLIENT_NAME.ovpn






docker-compose run --rm openvpn ovpn_genconfig -u udp://39.174.229.143
docker-compose run --rm openvpn ovpn_initpki


# 生成客户端证书，而且这个证书是无需密码的
docker-compose run --rm openvpn easyrsa build-client-full client1 nopass
# 导出已生成的客户端配置文件（.ovpn 文件）
docker-compose run --rm openvpn ovpn_getclient client1 > mnt/client1.ovpn

# 生成证书撤销列表（CRL），并且额外指示 EasyRSA 更新相关数据库或索引
docker-compose run --rm openvpn easyrsa gen-crl update-db
# 重启 openvpn 服务
docker-compose up -d openvpn


# 导出已生成的客户端配置文件（.ovpn 文件）
docker-compose run --rm openvpn ovpn_getclient client0 > ./client0.ovpn
```


id: 20250122195609-tyy3dkn
parent_id: 20240220154636-cinpkx9
root_id: 20240220152630-qly715s
hash: 4430d4c
box: 20240220152634-yy4s6nv
path: /20240220152630-qly715s.sy
hpath: /docker部署
type: c
ial: {: id="20250122195609-tyy3dkn" updated="20250128212653"}
created: 20250122195609
updated: 20250128212653
content:
docker run -d --name=samba  -p 445:445 -e "USER=pxx" -e "PASS=888888"  -e  "NAME=PXX"  -v "/home/example:/storage" dockurr/samba

markdown:
```undefined
docker run -d --name=samba  -p 445:445 -e "USER=pxx" -e "PASS=888888"  -e  "NAME=PXX"  -v "/home/example:/storage" dockurr/samba
```


id: 20250129192610-1deqfdr
parent_id: 20240220162142-9xvv7w5
root_id: 20240220162043-1k7wzbt
hash: 3b9cf2d
box: 20240220161248-rpjn91w
path: /20240220162043-1k7wzbt.sy
hpath: /大年初一
type: video
ial: {: id="20250129192610-1deqfdr" updated="20250129192610"}
created: 20250129192610
updated: 20250129192610
markdown:
<video controls="controls" src="assets/IMG_1667-20250129192609-505npk6.mov" data-src="assets/IMG_1667-20250129192609-505npk6.mov"></video>


id: 20250123171121-d126smc
parent_id: 20241211151538-rsak465
root_id: 20241211151538-rsak465
hash: aa675fe
box: 20240317203650-sh7upi0
path: /20241211151538-rsak465.sy
hpath: /docker openvpn
type: p
ial: {: id="20250123171121-d126smc" updated="20250130102057"}
created: 20250123171121
updated: 20250130102057
content:
docker run -v /mnt/sata1-4/openvpn:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u udp://39.174.229.143
docker run -v /mnt/sata1-4/openvpn:/etc/openvpn --rm -it kylemanna/openvpn ovpn_initpki

markdown:
docker run -v /mnt/sata1-4/openvpn:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u udp://39.174.229.143
docker run -v /mnt/sata1-4/openvpn:/etc/openvpn --rm -it kylemanna/openvpn ovpn_initpki


id: 20250130101421-w3tdx9y
parent_id: 20241211151538-rsak465
root_id: 20241211151538-rsak465
hash: 2b22949
box: 20240317203650-sh7upi0
path: /20241211151538-rsak465.sy
hpath: /docker openvpn
type: p
ial: {: id="20250130101421-w3tdx9y" updated="20250130102105"}
created: 20250130101421
updated: 20250130102105
content:
docker run -v /mnt/sata1-4/openvpn:/etc/openvpn --rm -it kylemanna/openvpn easyrsa build-client-full CLIENTNAME nopass

markdown:
docker run -v /mnt/sata1-4/openvpn:/etc/openvpn --rm -it kylemanna/openvpn easyrsa build-client-full CLIENTNAME nopass


id: 20250130101432-ewrjxkl
parent_id: 20241211151538-rsak465
root_id: 20241211151538-rsak465
hash: 927cf0e
box: 20240317203650-sh7upi0
path: /20241211151538-rsak465.sy
hpath: /docker openvpn
type: p
ial: {: id="20250130101432-ewrjxkl" updated="20250130102108"}
created: 20250130101432
updated: 20250130102108
content:
docker run -v /mnt/sata1-4/openvpn:/etc/openvpn --rm kylemanna/openvpn ovpn_getclient CLIENTNAME > CLIENTNAME.ovpn

markdown:
docker run -v /mnt/sata1-4/openvpn:/etc/openvpn --rm kylemanna/openvpn ovpn_getclient CLIENTNAME > CLIENTNAME.ovpn


id: 20241211151538-rsak465
root_id: 20241211151538-rsak465
hash: f2fa381
box: 20240317203650-sh7upi0
path: /20241211151538-rsak465.sy
hpath: /docker openvpn
content: docker openvpn
fcontent: docker openvpn
type: d
created: 20241211151538
updated: 20250130111345
ial:
{: custom-sy-readonly="false" id="20241211151538-rsak465" title="docker  openvpn" updated="20250130111345"}


id: 20250130101404-hkut70b
parent_id: 20241211151538-rsak465
root_id: 20241211151538-rsak465
hash: 0763d06
box: 20240317203650-sh7upi0
path: /20241211151538-rsak465.sy
hpath: /docker openvpn
type: p
ial: {: id="20250130101404-hkut70b" updated="20250130111345"}
created: 20250130101404
updated: 20250130111345
content:
docker run -v /mnt/sata1-4/openvpn:/etc/openvpn -d -p 1194:1194/udp --sysctl net.ipv4.ip_forward=1 --cap-add=NET_ADMIN kylemanna/openvpn

markdown:
docker run -v /mnt/sata1-4/openvpn:/etc/openvpn -d -p 1194:1194/udp --sysctl net.ipv4.ip_forward=1 --cap-add=NET_ADMIN kylemanna/openvpn


id: 20250201104228-ostarrd
parent_id: 20240220154636-cinpkx9
root_id: 20240220152630-qly715s
hash: 20b8e0e
box: 20240220152634-yy4s6nv
path: /20240220152630-qly715s.sy
hpath: /docker部署
type: c
ial: {: id="20250201104228-ostarrd" updated="20250203112818"}
created: 20250201104228
updated: 20250203112818
content:
docker run -d \
  --name=wg-easy \
  -e WG_HOST=39.174.229.143  \
  -e PASSWORD=888888  \
  -e WG_DEFAULT_ADDRESS=10.0.0.x \
  -e WG_DEFAULT_DNS=211.140.13.188 \
  -e WG_ALLOWED_IPS=10.0.0.0/24 \
  -e WG_PERSISTENT_KEEPALIVE=25 \
  -v ~/.wg-easy:/etc/wireguard \
  -p 80:51820/udp \
  -p 80:51821/tcp \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
  --sysctl="net.ipv4.ip_forward=1" \
  --restart unless-stopped \
  weejewel/wg-easy

markdown:
```undefined
docker run -d \
  --name=wg-easy \
  -e WG_HOST=39.174.229.143  \
  -e PASSWORD=888888  \
  -e WG_DEFAULT_ADDRESS=10.0.0.x \
  -e WG_DEFAULT_DNS=211.140.13.188 \
  -e WG_ALLOWED_IPS=10.0.0.0/24 \
  -e WG_PERSISTENT_KEEPALIVE=25 \
  -v ~/.wg-easy:/etc/wireguard \
  -p 80:51820/udp \
  -p 80:51821/tcp \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
  --sysctl="net.ipv4.ip_forward=1" \
  --restart unless-stopped \
  weejewel/wg-easy
```


id: 20250201104529-rq5retf
parent_id: 20240220154636-cinpkx9
root_id: 20240220152630-qly715s
hash: 29a1e75
box: 20240220152634-yy4s6nv
path: /20240220152630-qly715s.sy
hpath: /docker部署
type: c
ial: {: id="20250201104529-rq5retf" updated="20250203144024"}
created: 20250201104529
updated: 20250203144024
content:
docker run -d \
  --name=wg-easy \
  -e WG_HOST=192.168.50.237  \
  -e PASSWORD=  \
  -e WG_DEFAULT_ADDRESS=1.1.1.x \
  -e WG_DEFAULT_DNS=211.140.13.188 \
  -e WG_ALLOWED_IPS=1.1.1.0/24 \
  -e WG_PERSISTENT_KEEPALIVE=25 \
  -v /mnt/wg-easy:/etc/wireguard \
  -p 51820:51820/udp \
  -p 80:51821/tcp \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
  --sysctl="net.ipv4.ip_forward=1" \
  --restart unless-stopped \
  weejewel/wg-easy

markdown:
```undefined
docker run -d \
  --name=wg-easy \
  -e WG_HOST=192.168.50.237  \
  -e PASSWORD=  \
  -e WG_DEFAULT_ADDRESS=1.1.1.x \
  -e WG_DEFAULT_DNS=211.140.13.188 \
  -e WG_ALLOWED_IPS=1.1.1.0/24 \
  -e WG_PERSISTENT_KEEPALIVE=25 \
  -v /mnt/wg-easy:/etc/wireguard \
  -p 51820:51820/udp \
  -p 80:51821/tcp \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
  --sysctl="net.ipv4.ip_forward=1" \
  --restart unless-stopped \
  weejewel/wg-easy
```


id: 20250203211411-t9cmz73
parent_id: 20240220154636-cinpkx9
root_id: 20240220152630-qly715s
hash: 7f29ed1
box: 20240220152634-yy4s6nv
path: /20240220152630-qly715s.sy
hpath: /docker部署
type: c
ial: {: id="20250203211411-t9cmz73" updated="20250203211547"}
created: 20250203211411
updated: 20250203211547
content:
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: false
      addresses:
        - 192.168.50.237/24  
      gateway4: 192.168.50.18  
      nameservers:
        addresses:
          - 8.8.8.8  
          - 8.8.4.4

markdown:
```undefined
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: false
      addresses:
        - 192.168.50.237/24  
      gateway4: 192.168.50.18  
      nameservers:
        addresses:
          - 8.8.8.8  
          - 8.8.4.4

```


id: 20250204201032-s0vfewr
parent_id: 20240321134706-by3tb78
root_id: 20240321134706-by3tb78
hash: 6d0d993
box: 20240317203650-sh7upi0
path: /20240321134706-by3tb78.sy
hpath: /官方openwrt安装插件
type: c
ial: {: id="20250204201032-s0vfewr" updated="20250204201133"}
created: 20250204201032
updated: 20250204201133
content:
opkg install samba4-server samba4-utils luci-app-samba4
vi /etc/config/samba4
config samba
    option workgroup 'WORKGROUP'
    option charset 'UTF-8'
    option description 'OpenWrt Samba Server'
    option homes '1'

config sambashare
    option name 'share'  # 共享名称
    option path '/mnt/sda1'  # 共享的目录（替换为你的实际路径）
    option read_only 'no'  # 允许写入
    option guest_ok 'yes'  # 允许匿名访问
    option create_mask '0666'  # 文件默认权限
    option dir_mask '0777'  # 目录默认权限

markdown:
```undefined
opkg install samba4-server samba4-utils luci-app-samba4
vi /etc/config/samba4
config samba
    option workgroup 'WORKGROUP'
    option charset 'UTF-8'
    option description 'OpenWrt Samba Server'
    option homes '1'

config sambashare
    option name 'share'  # 共享名称
    option path '/mnt/sda1'  # 共享的目录（替换为你的实际路径）
    option read_only 'no'  # 允许写入
    option guest_ok 'yes'  # 允许匿名访问
    option create_mask '0666'  # 文件默认权限
    option dir_mask '0777'  # 目录默认权限

```


id: 20250204204300-x5bqwbn
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: c9d609f
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: p
ial: {: id="20250204204300-x5bqwbn" updated="20250204211448"}
created: 20250204204300
updated: 20250204211448
content:
docker run --name=webdav -d -e USERNAME=pxx -e PASSWORD=888888 -v /mnt:/webdav -p 81:80 idelsink/webdav

markdown:
docker run --name=webdav -d -e USERNAME=pxx -e PASSWORD=888888 -v /mnt:/webdav -p 81:80 idelsink/webdav


id: 20240321164008-m3rouok
parent_id: 20240321134706-by3tb78
root_id: 20240321134706-by3tb78
hash: 7454642
box: 20240317203650-sh7upi0
path: /20240321134706-by3tb78.sy
hpath: /官方openwrt安装插件
type: c
ial: {: id="20240321164008-m3rouok" updated="20250206085046"}
created: 20240321164008
updated: 20250206085046
content:
更新源
sed -i 's_downloads.openwrt.org_mirrors.aliyun.com/openwrt_' /etc/opkg/distfeeds.conf
官方源
''
src/gz openwrt_core https://downloads.openwrt.org/releases/23.05.2/targets/x86/64/packages
src/gz openwrt_base https://downloads.openwrt.org/releases/23.05.2/packages/x86_64/base
src/gz openwrt_luci https://downloads.openwrt.org/releases/23.05.2/packages/x86_64/luci
src/gz openwrt_packages https://downloads.openwrt.org/releases/23.05.2/packages/x86_64/packages
src/gz openwrt_routing https://downloads.openwrt.org/releases/23.05.2/packages/x86_64/routing
src/gz openwrt_telephony https://downloads.openwrt.org/releases/23.05.2/packages/x86_64/telephony
‘’
opkg update
opkg install fdisk block-mount unzip

1，扩容根目录
fdisk /dev/sda
n
w
mkfs.ext4 /dev/sda3
reboot
挂载系统后，再终端输入下面
mkdir -p /tmp/introot
mkdir -p /tmp/extroot
mount --bind / /tmp/introot
mount /dev/sda3 /tmp/extroot
tar -C /tmp/introot -cvf - . | tar -C /tmp/extroot -xf -
umount /tmp/introot
umount /tmp/extroot

2，安装docker
ipk网站上都已经下载好了，一个个安装，主要是docker opkg install docker dockerd luci-lib-docker docker-compose zerotier samba4-server samba4-utils luci-app-samba4
install openssh-sftp-server
3，安装passwall
删除 dnsmasq 安装dnsmasq-full
opkg remove dnsmasq
wget http://39.174.229.143:85/openwrt/passwal%E5%AE%89%E8%A3%85/passwall_packages_ipk_x86_64.zip
wget http://39.174.229.143:85/openwrt/passwal%E5%AE%89%E8%A3%85/luci-app-passwall_4.71-2_all.ipk

4，安装zerotier
opkg update
opkg install zerotier

uci set zerotier.openwrt_network=zerotier
uci add_list zerotier.openwrt_network.join='41d49af6c296c5af'
uci set zerotier.openwrt_network.enabled='1'
uci commit zerotier
reboot

markdown:
```
更新源
sed -i 's_downloads.openwrt.org_mirrors.aliyun.com/openwrt_' /etc/opkg/distfeeds.conf
官方源
''
src/gz openwrt_core https://downloads.openwrt.org/releases/23.05.2/targets/x86/64/packages
src/gz openwrt_base https://downloads.openwrt.org/releases/23.05.2/packages/x86_64/base
src/gz openwrt_luci https://downloads.openwrt.org/releases/23.05.2/packages/x86_64/luci
src/gz openwrt_packages https://downloads.openwrt.org/releases/23.05.2/packages/x86_64/packages
src/gz openwrt_routing https://downloads.openwrt.org/releases/23.05.2/packages/x86_64/routing
src/gz openwrt_telephony https://downloads.openwrt.org/releases/23.05.2/packages/x86_64/telephony
‘’
opkg update
opkg install fdisk block-mount unzip

1，扩容根目录
fdisk /dev/sda
n
w
mkfs.ext4 /dev/sda3
reboot
挂载系统后，再终端输入下面
mkdir -p /tmp/introot
mkdir -p /tmp/extroot
mount --bind / /tmp/introot
mount /dev/sda3 /tmp/extroot
tar -C /tmp/introot -cvf - . | tar -C /tmp/extroot -xf -
umount /tmp/introot
umount /tmp/extroot

2，安装docker
ipk网站上都已经下载好了，一个个安装，主要是docker opkg install docker dockerd luci-lib-docker docker-compose zerotier samba4-server samba4-utils luci-app-samba4
install openssh-sftp-server
3，安装passwall
删除 dnsmasq 安装dnsmasq-full
opkg remove dnsmasq
wget http://39.174.229.143:85/openwrt/passwal%E5%AE%89%E8%A3%85/passwall_packages_ipk_x86_64.zip
wget http://39.174.229.143:85/openwrt/passwal%E5%AE%89%E8%A3%85/luci-app-passwall_4.71-2_all.ipk

4，安装zerotier
opkg update
opkg install zerotier

uci set zerotier.openwrt_network=zerotier
uci add_list zerotier.openwrt_network.join='41d49af6c296c5af'
uci set zerotier.openwrt_network.enabled='1'
uci commit zerotier
reboot

```


id: 20240321134706-by3tb78
root_id: 20240321134706-by3tb78
hash: f1dda68
box: 20240317203650-sh7upi0
path: /20240321134706-by3tb78.sy
hpath: /官方openwrt安装插件
content: 官方openwrt安装插件
fcontent: 官方openwrt安装插件
type: d
created: 20240321134706
updated: 20250207205645
ial:
{: custom-sy-readonly="true" id="20240321134706-by3tb78" title="官方openwrt安装插件" updated="20250207205645"}


id: 20250207205557-o95yj3y
parent_id: 20240321134706-by3tb78
root_id: 20240321134706-by3tb78
hash: 94a1758
box: 20240317203650-sh7upi0
path: /20240321134706-by3tb78.sy
hpath: /官方openwrt安装插件
type: c
ial: {: id="20250207205557-o95yj3y" updated="20250207205645"}
created: 20250207205557
updated: 20250207205645
content:
opkg update
opkg install kmod-usb-storage kmod-usb-storage-uas block-mount
opkg install kmod-fs-ext4   戴试

markdown:
```undefined
opkg update
opkg install kmod-usb-storage kmod-usb-storage-uas block-mount
opkg install kmod-fs-ext4   戴试
```


id: 20250208104311-9het4ew
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: f559d4b
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250208104311-9het4ew" updated="20250208212942"}
created: 20250208104311
updated: 20250208212942
content:
mkdir -p /tmp/introot
mkdir -p /tmp/extroot
mount --bind / /tmp/introot
mount /dev/sda3 /tmp/extroot
tar -C /tmp/introot -cvf - . | tar -C /tmp/extroot -xf -
umount /tmp/introot
umount /tmp/extroot

markdown:
```undefined
mkdir -p /tmp/introot
mkdir -p /tmp/extroot
mount --bind / /tmp/introot
mount /dev/sda3 /tmp/extroot
tar -C /tmp/introot -cvf - . | tar -C /tmp/extroot -xf -
umount /tmp/introot
umount /tmp/extroot
```


id: 20250210100608-rba12nj
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 8b7439f
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250210100608-rba12nj" updated="20250211093905"}
created: 20250210100608
updated: 20250211093905
content:
docker run --restart always --name openwrt1 -d --network macnet --privileged --ip 192.168.0.124   openwrt /sbin/init

markdown:
```undefined
docker run --restart always --name openwrt1 -d --network macnet --privileged --ip 192.168.0.124   openwrt /sbin/init
```


id: 20250211093758-d4xvf23
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 195fc41
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250211093758-d4xvf23" updated="20250211151825"}
created: 20250211093758
updated: 20250211151825
content:
docker run -d \
  --name=clash \
  -v /root/clash.yaml: /root/.config/clash/config.yaml \
  -p 7890:7890 \
  -p 9090:9090 \
  --restart unless-stopped \
  dreamacro/clash

markdown:
```undefined
docker run -d \
  --name=clash \
  -v /root/clash.yaml: /root/.config/clash/config.yaml \
  -p 7890:7890 \
  -p 9090:9090 \
  --restart unless-stopped \
  dreamacro/clash

```


id: 20250211141738-x0zgwul
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 7618227
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250211141738-x0zgwul" updated="20250211161945"}
created: 20250211141738
updated: 20250211161945
content:
docker import rootfs.tar.gz my-custom-image
docker run -d \
  --name openwrt \
  --network host \
  --privileged \
  openwrt
docker run --restart always --name openwrt -p 80:80 -d --network host --privileged openwrt /sbin/init

markdown:
```undefined
docker import rootfs.tar.gz my-custom-image
docker run -d \
  --name openwrt \
  --network host \
  --privileged \
  openwrt
docker run --restart always --name openwrt -p 80:80 -d --network host --privileged openwrt /sbin/init
```


id: 20250211163549-viodvit
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 838d15b
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250211163549-viodvit" updated="20250211202729"}
created: 20250211163549
updated: 20250211202729
content:
sudo iptables -A FORWARD -s 192.168.192.0/24 -d 192.168.0.0/24 -j ACCEPT
sudo iptables -A FORWARD -s 192.168.0.0/24 -d 192.168.192.0/24 -j ACCEPT

markdown:
```undefined
sudo iptables -A FORWARD -s 192.168.192.0/24 -d 192.168.0.0/24 -j ACCEPT
sudo iptables -A FORWARD -s 192.168.0.0/24 -d 192.168.192.0/24 -j ACCEPT
```


id: 20250211163638-8p3z3ul
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 34cf7d2
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
content: sudo iptables -t nat -A POSTROUTING -s 192.168.192.0/24 -d 192.168.0.0/24 -j MASQUERADE
type: c
ial: {: id="20250211163638-8p3z3ul" updated="20250211202733"}
created: 20250211163638
updated: 20250211202733
markdown:
```undefined
sudo iptables -t nat -A POSTROUTING -s 192.168.192.0/24 -d 192.168.0.0/24 -j MASQUERADE
```


id: 20250212085402-5an6abu
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 65cfee2
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: p
ial: {: id="20250212085402-5an6abu" updated="20250212092604"}
created: 20250212085402
updated: 20250212092604
content:
sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -d 192.168.0.0/24 -j ACCEPT
sudo iptables -A FORWARD -s 10.8.0.0/24 -d 192.168.0.0/24 -j ACCEPT
4.新启动 OpenVPN 服务
systemctl restart openvpn

markdown:
sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -d 192.168.0.0/24 -j ACCEPT
sudo iptables -A FORWARD -s 10.8.0.0/24 -d 192.168.0.0/24 -j ACCEPT
4.新启动 OpenVPN 服务
systemctl restart openvpn


id: 20250212085353-x1vfumi
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 82e4e04
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250212085353-x1vfumi" updated="20250213102219"}
created: 20250212085353
updated: 20250213102219
content:
sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -d 192.168.50.0/24 -j ACCEPT
iptables -A FORWARD -s 10.8.0.0/24 -d 192.168.50.0/24 -j ACCEPT
ip route add 192.168.50.0/24 via 10.8.0.1 dev tun0

markdown:
```undefined
sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -d 192.168.50.0/24 -j ACCEPT
iptables -A FORWARD -s 10.8.0.0/24 -d 192.168.50.0/24 -j ACCEPT
ip route add 192.168.50.0/24 via 10.8.0.1 dev tun0
```


id: 20250209155038-kye8t4a
parent_id: 20250209154240-4irca3x
root_id: 20250209154240-4irca3x
hash: a070b51
box: 20250209154230-e1pt8i8
path: /20250209154240-4irca3x.sy
hpath: /ubantu的openvpn
content: iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o ens33 -j SNAT --to-source 192.168.1.10
type: c
ial: {: id="20250209155038-kye8t4a" updated="20250214162500"}
created: 20250209155038
updated: 20250214162500
markdown:
```undefined
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o ens33 -j SNAT --to-source 192.168.1.10
```


id: 20250215212906-55dulj5
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 2bd6ec4
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250215212906-55dulj5" updated="20250216122419"}
created: 20250215212906
updated: 20250216122419
content:
ip route add 192.168.200.0/24 via 10.8.0.1 dev tun0
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
iptables -A FORWARD -i tun0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth1 -o tun0 -j ACCEPT

markdown:
```undefined
ip route add 192.168.200.0/24 via 10.8.0.1 dev tun0
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
iptables -A FORWARD -i tun0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth1 -o tun0 -j ACCEPT

```


id: 20250215170844-a1bjlbt
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 8ac5266
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250215170844-a1bjlbt" updated="20250217151626"}
created: 20250215170844
updated: 20250217151626
content:
network:
  ethernets:
    eth0:  # 请替换为你的实际网卡名称
      dhcp4: no
      addresses:
        - 192.168.0.219/24  # 设置静态 IP
      gateway4: 192.168.0.8  # 设置网关
      nameservers:
        addresses:
          - 211.140.13.188
  version: 2

markdown:
```undefined
network:
  ethernets:
    eth0:  # 请替换为你的实际网卡名称
      dhcp4: no
      addresses:
        - 192.168.0.219/24  # 设置静态 IP
      gateway4: 192.168.0.8  # 设置网关
      nameservers:
        addresses:
          - 211.140.13.188
  version: 2
```


id: 20250215102823-6pms5ss
parent_id: 20250209154240-4irca3x
root_id: 20250209154240-4irca3x
hash: 7850948
box: 20250209154230-e1pt8i8
path: /20250209154240-4irca3x.sy
hpath: /ubantu的openvpn
type: c
ial: {: id="20250215102823-6pms5ss" updated="20250218165311"}
created: 20250215102823
updated: 20250218165311
content:
sudo iptables -t nat -A POSTROUTING -s 10.0.8.0/24 -d 192.168.1.0/24 -j MASQUERADE
sudo iptables -A FORWARD -i wg0 -o eth0 -s 10.0.8.0/24 -d 192.168.1.0/24 -j ACCEPT
sudo iptables -A FORWARD -i eth0 -o wg0 -s 192.168.1.0/24 -d 10.0.8.0/24 -j ACCEPT

markdown:
```undefined
sudo iptables -t nat -A POSTROUTING -s 10.0.8.0/24 -d 192.168.1.0/24 -j MASQUERADE
sudo iptables -A FORWARD -i wg0 -o eth0 -s 10.0.8.0/24 -d 192.168.1.0/24 -j ACCEPT
sudo iptables -A FORWARD -i eth0 -o wg0 -s 192.168.1.0/24 -d 10.0.8.0/24 -j ACCEPT
```


id: 20250218162235-sekip1z
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 11c595a
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250218162235-sekip1z" updated="20250228203203"}
created: 20250218162235
updated: 20250228203203
content:
enp1s0    enx00e04c360351
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: yes
      dhcp6: no
    enx00e04c360351:
      addresses:
        - 10.131.61.111/24
      dhcp4: no
sudo iptables -t nat -A POSTROUTING -o enp1s0 -j MASQUERADE
sudo iptables -A FORWARD -i enx00e04c360351 -o enp1s0 -j ACCEPT
sudo iptables -A FORWARD -i enp1s0 -o enx00e04c360351 -m state --state RELATED,ESTABLISHED -j ACCEPT
ip route add 22.8.144.97 via 10.130.61.1 dev enx00e04c360351
ip route add 22.8.144.97 via 10.131.61.1 dev br-lan  
ip route add 22.8.144.97 via 10.0.0.5 dev wireguard 
22.8.144.97
ip route add 22.8.144.97 via 192.168.0.8 dev eth0
39.174.229.143
10.0.0.0/24

markdown:
```undefined
enp1s0    enx00e04c360351
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: yes
      dhcp6: no
    enx00e04c360351:
      addresses:
        - 10.131.61.111/24
      dhcp4: no
sudo iptables -t nat -A POSTROUTING -o enp1s0 -j MASQUERADE
sudo iptables -A FORWARD -i enx00e04c360351 -o enp1s0 -j ACCEPT
sudo iptables -A FORWARD -i enp1s0 -o enx00e04c360351 -m state --state RELATED,ESTABLISHED -j ACCEPT
ip route add 22.8.144.97 via 10.130.61.1 dev enx00e04c360351
ip route add 22.8.144.97 via 10.131.61.1 dev br-lan  
ip route add 22.8.144.97 via 10.0.0.5 dev wireguard 
22.8.144.97
ip route add 22.8.144.97 via 192.168.0.8 dev eth0
39.174.229.143
10.0.0.0/24
```


id: 20250209154827-w2mo0lq
parent_id: 20250209154240-4irca3x
root_id: 20250209154240-4irca3x
hash: ef0ccf6
box: 20250209154230-e1pt8i8
path: /20250209154240-4irca3x.sy
hpath: /ubantu的openvpn
type: c
ial: {: id="20250209154827-w2mo0lq" updated="20250218094441"}
created: 20250209154827
updated: 20250218094441
content:
1. 配置 OpenVPN 服务器
vim /etc/openvpn/server.conf
添加路由指令
push "route 192.168.0.0 255.255.255.0"
2. 启用 IP 转发
vim /etc/sysctl.conf
   添加
net.ipv4.ip_forward = 1
  运行
sudo sysctl -p
3. 配置防火墙
sudo iptables -t nat -A POSTROUTING -s 10.0.8.0/24 -d 192.168.0.0/24 -j ACCEPT
sudo iptables -A FORWARD -s 10.0.0.0/24 -d 192.168.0.0/24 -j ACCEPT
4.新启动 OpenVPN 服务
systemctl restart openvpn

markdown:
```undefined
1. 配置 OpenVPN 服务器
vim /etc/openvpn/server.conf
添加路由指令
push "route 192.168.0.0 255.255.255.0"
2. 启用 IP 转发
vim /etc/sysctl.conf
   添加
net.ipv4.ip_forward = 1
  运行
sudo sysctl -p
3. 配置防火墙
sudo iptables -t nat -A POSTROUTING -s 10.0.8.0/24 -d 192.168.0.0/24 -j ACCEPT
sudo iptables -A FORWARD -s 10.0.0.0/24 -d 192.168.0.0/24 -j ACCEPT
4.新启动 OpenVPN 服务
systemctl restart openvpn
```


id: 20250227094555-t0w3b7x
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 9cda231
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250227094555-t0w3b7x" updated="20250302140021"}
created: 20250227094555
updated: 20250302140021
content:
docker run -d \
  --name=transmission \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Asia/Shanghai \
  -p 80:9091 \
  -p 51413:51413 \
  -p 51413:51413/udp \
  -v /home/download:/downloads \
  --restart unless-stopped \
  lscr.io/linuxserver/transmission:latest

markdown:
```undefined
docker run -d \
  --name=transmission \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Asia/Shanghai \
  -p 80:9091 \
  -p 51413:51413 \
  -p 51413:51413/udp \
  -v /home/download:/downloads \
  --restart unless-stopped \
  lscr.io/linuxserver/transmission:latest

```


id: 20250209155321-1yl896z
parent_id: 20250209155259-1smmzql
root_id: 20250209155259-1smmzql
hash: d82bf8f
box: 20250209154230-e1pt8i8
path: /20250209155259-1smmzql.sy
hpath: /华硕路由器route添加
type: c
ial: {: id="20250209155321-1yl896z" updated="20250303143723"}
created: 20250209155321
updated: 20250303143723
content:
添加
ip route add 192.168.0.0/24 via 10.8.0.1 dev tun15

co 添加
ip route add default via 10.1.25.1
删除
ip route del 192.168.0.0/24 via 10.8.0.1 dev tun15

markdown:
```undefined
添加
ip route add 192.168.0.0/24 via 10.8.0.1 dev tun15

co 添加
ip route add default via 10.1.25.1
删除
ip route del 192.168.0.0/24 via 10.8.0.1 dev tun15
```


id: 20250209155259-1smmzql
root_id: 20250209155259-1smmzql
hash: 876f3cf
box: 20250209154230-e1pt8i8
path: /20250209155259-1smmzql.sy
hpath: /华硕路由器route添加
content: 华硕路由器route添加
fcontent: 华硕路由器route添加
type: d
created: 20250209155259
updated: 20250303143723
ial:
{: custom-sy-readonly="true" id="20250209155259-1smmzql" title="华硕路由器route添加" updated="20250303143723"}


id: 20250309194346-r3s17az
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: eaac608
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250309194346-r3s17az" updated="20250310152240"}
created: 20250309194346
updated: 20250310152240
content:
docker run --restart always --name openwrt -d --network macnet --privileged --ip 10.1.25.193 ophub/openwrt-aarch64:latest
uci set zerotier.global.enabled='1'
uci delete zerotier.earth
uci set zerotier.openwrt_network=network
uci set zerotier.openwrt_network.id='856127940c66f22d'
uci commit zerotier

markdown:
```undefined
docker run --restart always --name openwrt -d --network macnet --privileged --ip 10.1.25.193 ophub/openwrt-aarch64:latest
uci set zerotier.global.enabled='1'
uci delete zerotier.earth
uci set zerotier.openwrt_network=network
uci set zerotier.openwrt_network.id='856127940c66f22d'
uci commit zerotier
```


id: 20250207125905-eqihtyl
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 7fe400e
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: p
ial: {: id="20250207125905-eqihtyl" updated="20250311202546"}
created: 20250207125905
updated: 20250311202546
content:
docker run -d --name=samba  --restart unless-stopped -p 445:445 -e "USER=pxx" -e "PASS=888888"  -e  "NAME=NNN"  -v "/mnt:/storage" dockurr/samba

markdown:
docker run -d --name=samba  --restart unless-stopped -p 445:445 -e "USER=pxx" -e "PASS=888888"  -e  "NAME=NNN"  -v "/mnt:/storage" dockurr/samba


id: 20250207214238-a4nph6s
parent_id: 20240220154636-cinpkx9
root_id: 20240220152630-qly715s
hash: 57ec528
box: 20240220152634-yy4s6nv
path: /20240220152630-qly715s.sy
hpath: /docker部署
type: c
ial: {: id="20250207214238-a4nph6s" updated="20250312114619"}
created: 20250207214238
updated: 20250312114619
content:
docker run -d -p 1000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v /opt/portainer:/data portainer/portainer-ce:latest

markdown:
```undefined
docker run -d -p 1000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v /opt/portainer:/data portainer/portainer-ce:latest

```


id: 20250208104329-bu0otah
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: b06a2c7
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250208104329-bu0otah" updated="20250312143943"}
created: 20250208104329
updated: 20250312143943
content:
docker run -d --name=samba --restart=unless-stopped -p 445:445 -e "USER=pxx" -e "PASS=888888"  -e  "NAME=NBBN"  -v "/mnt/:/storage" dockurr/samba

markdown:
```undefined
docker run -d --name=samba --restart=unless-stopped -p 445:445 -e "USER=pxx" -e "PASS=888888"  -e  "NAME=NBBN"  -v "/mnt/:/storage" dockurr/samba
```


id: 20250207211749-s95k5p9
parent_id: 20240220154636-cinpkx9
root_id: 20240220152630-qly715s
hash: 2da7b3f
box: 20240220152634-yy4s6nv
path: /20240220152630-qly715s.sy
hpath: /docker部署
type: c
ial: {: id="20250207211749-s95k5p9" updated="20250312153259"}
created: 20250207211749
updated: 20250312153259
content:
docker run -d \
  --name=qbittorrent \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -e WEBUI_PORT=8080 \
  -e TORRENTING_PORT=6881 \
  -p 8080:8080 \
  -p 6881:6881 \
  -p 6881:6881/udp \
  -v /mnt/sda2:/downloads `#optional` \
  --restart unless-stopped \
  lscr.io/linuxserver/qbittorrent:latest
 需要看logs 密码

markdown:
```undefined
docker run -d \
  --name=qbittorrent \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -e WEBUI_PORT=8080 \
  -e TORRENTING_PORT=6881 \
  -p 8080:8080 \
  -p 6881:6881 \
  -p 6881:6881/udp \
  -v /mnt/sda2:/downloads `#optional` \
  --restart unless-stopped \
  lscr.io/linuxserver/qbittorrent:latest
 需要看logs 密码
```


id: 20250310151607-avunes8
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: a123ae0
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250310151607-avunes8" updated="20250312165007"}
created: 20250310151607
updated: 20250312165007
content:
ip link set  eth0 promisc on
docker network create -d macvlan --subnet=192.168.50.0/24 --gateway=192.168.50.1 -o parent=br-lan  mynet
docker run  --name openwrt --restart unless-stopped -d --network mynet    --privileged --ip 192.168.50.314  openwrt  /sbin/init

markdown:
```undefined
ip link set  eth0 promisc on
docker network create -d macvlan --subnet=192.168.50.0/24 --gateway=192.168.50.1 -o parent=br-lan  mynet
docker run  --name openwrt --restart unless-stopped -d --network mynet    --privileged --ip 192.168.50.314  openwrt  /sbin/init
```


id: 20250216121702-8ibtmno
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: b26cddb
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250216121702-8ibtmno" updated="20250313102534"}
created: 20250216121702
updated: 20250313102534
content:
docker run -d \
  --name=wireguard-client \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -v /mnt:/config \
  -v /lib/modules:/lib/modules \
  --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
  --restart unless-stopped \
  lscr.io/linuxserver/wireguard:latest

markdown:
```undefined

docker run -d \
  --name=wireguard-client \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -v /mnt:/config \
  -v /lib/modules:/lib/modules \
  --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
  --restart unless-stopped \
  lscr.io/linuxserver/wireguard:latest

```


id: 20250122105705-hujaj8w
parent_id: 20240220154636-cinpkx9
root_id: 20240220152630-qly715s
hash: 2fa838c
box: 20240220152634-yy4s6nv
path: /20240220152630-qly715s.sy
hpath: /docker部署
type: c
ial: {: id="20250122105705-hujaj8w" updated="20250313124747"}
created: 20250122105705
updated: 20250313124747
content:
docker run -d \
  --name=wg-easy \
  -e WG_HOST=123.123.123.123 (🚨这里输入服务器的公网IP) \
  -e PASSWORD=passwd123 (🚨这里输入你的密码) \
  -e WG_DEFAULT_ADDRESS=10.0.8.x （🚨默认IP地址）\
  -e WG_DEFAULT_DNS=114.114.114.114 （🚨默认DNS）\
  -e WG_ALLOWED_IPS=10.0.8.0/24 （🚨允许连接的IP段）\
  -e WG_PERSISTENT_KEEPALIVE=25 （🚨重连间隔）\
  -v ~/.wg-easy:/etc/wireguard \
  -p 51820:51820/udp \
  -p 51821:51821/tcp \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
  --sysctl="net.ipv4.ip_forward=1" \
  --restart unless-stopped \
  weejewel/wg-easy
客户端部署
docker run -d \
  --name=wg-client \
  -e WG_HOST=10.0.0.1 \
  -e PASSWORD= \
  -v /mnt/Adisk/wireguard/:/etc/wireguard/ \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
  --restart unless-stopped \
  weejewel/wg-easy

markdown:
```undefined
docker run -d \
  --name=wg-easy \
  -e WG_HOST=123.123.123.123 (🚨这里输入服务器的公网IP) \
  -e PASSWORD=passwd123 (🚨这里输入你的密码) \
  -e WG_DEFAULT_ADDRESS=10.0.8.x （🚨默认IP地址）\
  -e WG_DEFAULT_DNS=114.114.114.114 （🚨默认DNS）\
  -e WG_ALLOWED_IPS=10.0.8.0/24 （🚨允许连接的IP段）\
  -e WG_PERSISTENT_KEEPALIVE=25 （🚨重连间隔）\
  -v ~/.wg-easy:/etc/wireguard \
  -p 51820:51820/udp \
  -p 51821:51821/tcp \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
  --sysctl="net.ipv4.ip_forward=1" \
  --restart unless-stopped \
  weejewel/wg-easy
客户端部署
docker run -d \
  --name=wg-client \
  -e WG_HOST=10.0.0.1 \
  -e PASSWORD= \
  -v /mnt/Adisk/wireguard/:/etc/wireguard/ \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
  --restart unless-stopped \
  weejewel/wg-easy
```


id: 20240220152630-qly715s
root_id: 20240220152630-qly715s
hash: 508a51d
box: 20240220152634-yy4s6nv
path: /20240220152630-qly715s.sy
hpath: /docker部署
content: docker部署
fcontent: docker部署
type: d
created: 20240220152630
updated: 20250313124747
ial:
{: custom-sy-readonly="true" id="20240220152630-qly715s" title="docker部署" title-img="background: linear-gradient(#ffffff 50%, rgba(255,255,255,0) 0) 0 0, radial-gradient(circle closest-side, #FFFFFF 53%, rgba(255,255,255,0) 0) 0 0, radial-gradient(circle closest-side, #FFFFFF 50%, rgba(255,255,255,0) 0) 55px 0 #48B;background-size: 110px 200px;background-repeat: repeat-x;" updated="20250313124747"}


id: 20250212092637-m0ixrsz
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 197290e
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250212092637-m0ixrsz" updated="20250313135922"}
created: 20250212092637
updated: 20250313135922
content:
docker run -d \
  --name=wg-client2 \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
  --restart unless-stopped \
  -v /mnt/wg0:/etc/wireguard/wg0 \
  weejewel/wg-easy
docker run -d \
  --name=wg-wireguard \
  -e WG_HOST=10.0.0.1 \
  -e PASSWORD= \
  --network host \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  --restart unless-stopped \
  weejewel/wg-easy
docker run -d \
  --name=wg-easy3 \
  --network host \
  --privileged \
  -e WG_HOST=39.174.229.143 \
  -e PASSWORD= \
  -e WG_PERSISTENT_KEEPALIVE=25 \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  --restart unless-stopped \
  weejewel/wg-easy

markdown:
```wireguard
docker run -d \
  --name=wg-client2 \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  --sysctl="net.ipv4.conf.all.src_valid_mark=1" \
  --restart unless-stopped \
  -v /mnt/wg0:/etc/wireguard/wg0 \
  weejewel/wg-easy
docker run -d \
  --name=wg-wireguard \
  -e WG_HOST=10.0.0.1 \
  -e PASSWORD= \
  --network host \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  --restart unless-stopped \
  weejewel/wg-easy
docker run -d \
  --name=wg-easy3 \
  --network host \
  --privileged \
  -e WG_HOST=39.174.229.143 \
  -e PASSWORD= \
  -e WG_PERSISTENT_KEEPALIVE=25 \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_MODULE \
  --restart unless-stopped \
  weejewel/wg-easy
```


id: 20250207154255-x9e0cxj
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: c169596
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: p
ial: {: id="20250207154255-x9e0cxj" updated="20250314102536"}
created: 20250207154255
updated: 20250314102536
content:
opkg install fdisk block-mount unzip zerotier samba4-server samba4-utils luci-app-samba4 openssh-sftp-server openvpn-openssl luci-app-openvpn wireguard-tools kmod-wireguard luci-proto-wireguard

markdown:
opkg install fdisk block-mount unzip zerotier samba4-server samba4-utils luci-app-samba4 openssh-sftp-server openvpn-openssl luci-app-openvpn wireguard-tools kmod-wireguard luci-proto-wireguard


id: 20250210092418-cg01pb1
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 61e3e27
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250210092418-cg01pb1" updated="20250314171828"}
created: 20250210092418
updated: 20250314171828
content:
network:
  version: 2
  renderer: networkd
  wifis:
    wlp2s0:
      dhcp4: no
      addresses:
        - 192.168.0.124/24  # 这里改成你想要的静态 IP
      gateway4: 192.168.0.8  # 你的网关 IP（通常是路由器 IP）
      nameservers:
        addresses:
          - 211.140.13.188   
          - 114.114.114.114  # 114 DNS
      access-points:
        "boci1":
          password: "a1b2c3d4"

docker run --name=webdav -d -e USERNAME=pxx -e PASSWORD=888888 -v /mnt:/webdav -p 81:80 idelsink/webdav

markdown:
```undefined
network:
  version: 2
  renderer: networkd
  wifis:
    wlp2s0:
      dhcp4: no
      addresses:
        - 192.168.0.124/24  # 这里改成你想要的静态 IP
      gateway4: 192.168.0.8  # 你的网关 IP（通常是路由器 IP）
      nameservers:
        addresses:
          - 211.140.13.188   
          - 114.114.114.114  # 114 DNS
      access-points:
        "boci1":
          password: "a1b2c3d4"

docker run --name=webdav -d -e USERNAME=pxx -e PASSWORD=888888 -v /mnt:/webdav -p 81:80 idelsink/webdav
```


id: 20250206091253-1uukve4
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 520ab81
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250206091253-1uukve4" updated="20250315145012"}
created: 20250206091253
updated: 20250315145012
content:
docker run -d \
  --name=qbittorrent \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -e WEBUI_PORT=8080 \
  -e TORRENTING_PORT=6881 \
  -p 1000:8080 \
  -p 6881:6881 \
  -p 6881:6881/udp \
  -v /mnt/usb1_2-1/download:/downloads `#optional` \
  --restart unless-stopped \
  lscr.io/linuxserver/qbittorrent:latest

markdown:
```undefined
docker run -d \
  --name=qbittorrent \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -e WEBUI_PORT=8080 \
  -e TORRENTING_PORT=6881 \
  -p 1000:8080 \
  -p 6881:6881 \
  -p 6881:6881/udp \
  -v /mnt/usb1_2-1/download:/downloads `#optional` \
  --restart unless-stopped \
  lscr.io/linuxserver/qbittorrent:latest

```


id: 20250205172005-kkx8jws
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 8176eb8
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250205172005-kkx8jws" updated="20250315150455"}
created: 20250205172005
updated: 20250315150455
content:
docker run -d \
  --name=qbittorrent \
  -e PUID=0 \
  -e PGID=0 \
  -e TZ=Etc/UTC \
  -e WEBUI_PORT=8080 \
  -e TORRENTING_PORT=6881 \
  -p 1000:8080 \
  -p 6881:6881 \
  -p 6881:6881/udp \
  -v /mnt/usb1_2-1:/config \
  -v /mnt/usb1_2-1/download:/downloads `#optional` \
  --restart unless-stopped \
  lscr.io/linuxserver/qbittorrent:latest

markdown:
```undefined
docker run -d \
  --name=qbittorrent \
  -e PUID=0 \
  -e PGID=0 \
  -e TZ=Etc/UTC \
  -e WEBUI_PORT=8080 \
  -e TORRENTING_PORT=6881 \
  -p 1000:8080 \
  -p 6881:6881 \
  -p 6881:6881/udp \
  -v /mnt/usb1_2-1:/config \
  -v /mnt/usb1_2-1/download:/downloads `#optional` \
  --restart unless-stopped \
  lscr.io/linuxserver/qbittorrent:latest

```


id: 20250206220231-x4dqo0e
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 01ff5aa
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250206220231-x4dqo0e" updated="20250315171220"}
created: 20250206220231
updated: 20250315171220
content:
dd if=istoreo.img of=/dev/sda bs=4M
docker run -d --name=xunlei --hostname=NNN1 --net=host -v /mnt/data2/configxunl:/xunlei/config -v /mnt/data2:/xunlei/downloads --restart=unless-stopped --privileged cnk3x/xunlei:latest
docker run -d --privileged  -v /mnt/:/xunlei/downloads -p 2345:2345 cnk3x/xunlei
docker run -d -v /mnt/usb1/siyuan:/siyuan/workspace  -e PUID=$UID  -e PGID=$GID  -p 6806:6806 b3log/siyuan  --workspace=/siyuan/workspace/ --accessAuthCode=xxx
docker run -d --name=siyuan -v /mnt/usb1_2-1/siyuan:/siyuan/workspace -p 2000:6806 --restart always  b3log/siyuan --workspace=/siyuan/workspace/ --accessAuthCode=www
docker run -d --name syncthing  --restart always -p 3000:8384 -p 22000:22000/tcp -p 22000:22000/udp  -p 21027:21027/udp -v /mnt/config-sync:/var/syncthing/config -v /mnt:/var/syncthing/data syncthing/syncthing
docker run -d \
  --name syncthing \
  --restart always \
  -p 8384:8384 \
  -p 22000:22000/tcp \
  -p 22000:22000/udp \
  -p 21027:21027/udp \
  -v /mnt/usb2/syncthing/config:/var/syncthing/config \
  -v /mnt/usb2/syncthing/:/var/syncthing/data \
  syncthing/syncthing

markdown:
```undefined
dd if=istoreo.img of=/dev/sda bs=4M
docker run -d --name=xunlei --hostname=NNN1 --net=host -v /mnt/data2/configxunl:/xunlei/config -v /mnt/data2:/xunlei/downloads --restart=unless-stopped --privileged cnk3x/xunlei:latest
docker run -d --privileged  -v /mnt/:/xunlei/downloads -p 2345:2345 cnk3x/xunlei
docker run -d -v /mnt/usb1/siyuan:/siyuan/workspace  -e PUID=$UID  -e PGID=$GID  -p 6806:6806 b3log/siyuan  --workspace=/siyuan/workspace/ --accessAuthCode=xxx
docker run -d --name=siyuan -v /mnt/usb1_2-1/siyuan:/siyuan/workspace -p 2000:6806 --restart always  b3log/siyuan --workspace=/siyuan/workspace/ --accessAuthCode=www
docker run -d --name syncthing  --restart always -p 3000:8384 -p 22000:22000/tcp -p 22000:22000/udp  -p 21027:21027/udp -v /mnt/config-sync:/var/syncthing/config -v /mnt:/var/syncthing/data syncthing/syncthing
docker run -d \
  --name syncthing \
  --restart always \
  -p 8384:8384 \
  -p 22000:22000/tcp \
  -p 22000:22000/udp \
  -p 21027:21027/udp \
  -v /mnt/usb2/syncthing/config:/var/syncthing/config \
  -v /mnt/usb2/syncthing/:/var/syncthing/data \
  syncthing/syncthing
```


id: 20250204211836-muilqhs
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: fd36e4a
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250204211836-muilqhs" updated="20250315172043"}
created: 20250204211836
updated: 20250315172043
content:
dd if=/dev/sda of=/root/openwrt24.img bs=4M status=progress

docker run -d  -v /mnt/data1/siyuan:/siyuan/workspace -p 2000:6806  b3log/siyuan --workspace=/siyuan/workspace/ --accessAuthCode=www

markdown:
```undefined
dd if=/dev/sda of=/root/openwrt24.img bs=4M status=progress

docker run -d  -v /mnt/data1/siyuan:/siyuan/workspace -p 2000:6806  b3log/siyuan --workspace=/siyuan/workspace/ --accessAuthCode=www
```


id: 20250310194619-syrzlva
parent_id: 20250204202213-2virs7k
root_id: 20250204202213-2virs7k
hash: 983fcd8
box: 20250204202137-3g13i3l
path: /20250204202213-2virs7k.sy
hpath: /复制修改版
type: c
ial: {: id="20250310194619-syrzlva" updated="20250315205449"}
created: 20250310194619
updated: 20250315205449
content:
docker run -d \
  --name=resilio-sync \
  -p 8888:8888 \
  -p 55555:55555 \
  -v /mnt/sda1/resilio:/mnt/sync \
  -v /mnt/sda1/resilio-config:/config \
  --restart unless-stopped \
  resilio/sync

user  root;
worker_processes  1;

events {
    worker_connections  1024;
}

stream {
    upstream rdp_backend {
        server 192.168.50.168:3389;  # 远程 Windows 11 的 IP
    }

    server {
        listen 3389;
        proxy_pass rdp_backend;
        proxy_timeout 10m;
        proxy_connect_timeout 10s;
    }
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;

    server {
        listen       85;
        server_name  localhost;
        charset utf-8;

        location / {
            root   /usr/share/nginx/html;
            autoindex on;
        }

        location ~* ^.*\.txt$ {
            return 404;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/share/nginx/html;
        }
    }
}

markdown:
```wireguard
docker run -d \
  --name=resilio-sync \
  -p 8888:8888 \
  -p 55555:55555 \
  -v /mnt/sda1/resilio:/mnt/sync \
  -v /mnt/sda1/resilio-config:/config \
  --restart unless-stopped \
  resilio/sync

user  root;
worker_processes  1;

events {
    worker_connections  1024;
}

stream {
    upstream rdp_backend {
        server 192.168.50.168:3389;  # 远程 Windows 11 的 IP
    }

    server {
        listen 3389;
        proxy_pass rdp_backend;
        proxy_timeout 10m;
        proxy_connect_timeout 10s;
    }
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;

    server {
        listen       85;
        server_name  localhost;
        charset utf-8;

        location / {
            root   /usr/share/nginx/html;
            autoindex on;
        }

        location ~* ^.*\.txt$ {
            return 404;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/share/nginx/html;
        }
    }
}

```


# spans

id: 20240312083320-jl932xz
block_id: 20240312081915-0jiuxeh
root_id: 20240312081751-nqn7qhs
box: 20240220161248-rpjn91w
path: /20240312081751-nqn7qhs.sy
content: 31bd2be297b9886bb59777ebbbdbcf29
type: img
markdown:
![31bd2be297b9886bb59777ebbbdbcf29](assets/31bd2be297b9886bb59777ebbbdbcf29-20240312083236-t5djybu.jpeg)


id: 20250129192614-4nbnxzj
block_id: 20240220162255-selmcbl
root_id: 20240220162043-1k7wzbt
box: 20240220161248-rpjn91w
path: /20240220162043-1k7wzbt.sy
content: c7ee84e0a9b1f4247d1312abe32e8ea3-1024x768
type: img
markdown:
![c7ee84e0a9b1f4247d1312abe32e8ea3-1024x768](assets/c7ee84e0a9b1f4247d1312abe32e8ea3-1024x768-20240220162305-y6854vo.jpeg)


