一个hacdias/webdav同步obsidian笔记例子

hacdias/webdav

# Server related settings
address: 0.0.0.0
# 端口
port: 10010
auth: true
# 是否开启证书
tls: false
cert: cert.pem
key: key.pem


# Default user settings (will be merged)
scope: .
modify: true
rules: []

# CORS configuration
# 注释后默认是*
cors:
  enabled: true
  credentials: true
  allowed_headers:
#    - Depth 
# origin包含在hosts中
  allowed_hosts:
#    - app://obsidian.md
#    - capacitor://localhost
#    - http://localhost
  allowed_methods:
#    - GET
#    - POST
#    - HEAD
#    - PUT
#    - DELETE
  exposed_headers:
#    - Content-Length
#    - Content-Range



users:
  - username: webdav
# 密码加密[bcrypt]
    password: "{bcrypt}$2a$12$nEaqBHAyBvvffzHFfhL5kuygQhCMaOWxyZ9MOOQ9O.4xnY44jQ1o."
# 路径
    scope: /data/data/com.termux/files/home/storage/shared

放到temux下任意目录

dir1 dir2 为路径

cp dir1/GoWebdav ~/dir2
cp dir1/config.yml ~/dir2

给gowebdav执行权限

cd ~/dir2
chmod u+x webdav

运行

./webdav

地址

http://192.168.x.x:8080/dav1
这里的地址一般是wifi上的ip
posted @ 2024-04-18 10:53  知之噵  阅读(295)  评论(0)    收藏  举报