From bd4bbf3a3a0ef7de9ee809f01e09c24642ed3700 Mon Sep 17 00:00:00 2001 From: zxbu <32785355+zxbu@users.noreply.github.com> Date: Sat, 16 Jan 2021 10:27:13 +0800 Subject: [PATCH 1/7] Create README.md --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..145efa3 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# webdav-teambition +本项目实现了阿里Teambition网盘的webdav协议,只需要简单的配置一下cookies,就可以让Teambition变身为webdav协议的文件服务器。 +基于此,你可以把Teambition挂载为Windows、Linux、Mac系统的磁盘,可以通过NAS系统做文件管理或文件同步,更多玩法等你挖掘 +# 如何使用 +## Jar包运行 +点击下载Jar包 +```bash +mvn -DskipTests=true package +java -jar target/webdav-teambition-0.0.1-SNAPSHOT.jar --teambition.cookies="your cookies here" +``` +## 容器运行 +```bash +``` From 4c715bdc8c5b0ca04405db4c7a2c3ee601b47bda Mon Sep 17 00:00:00 2001 From: zxbu <32785355+zxbu@users.noreply.github.com> Date: Sat, 16 Jan 2021 10:40:16 +0800 Subject: [PATCH 2/7] Update README.md --- README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 145efa3..450e621 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,23 @@ 基于此,你可以把Teambition挂载为Windows、Linux、Mac系统的磁盘,可以通过NAS系统做文件管理或文件同步,更多玩法等你挖掘 # 如何使用 ## Jar包运行 -点击下载Jar包 +[点击下载Jar包](https://github.com/zxbu/webdav-teambition/releases/download/0.0.1/webdav-teambition-0.0.1-SNAPSHOT.jar) ```bash -mvn -DskipTests=true package -java -jar target/webdav-teambition-0.0.1-SNAPSHOT.jar --teambition.cookies="your cookies here" +java -jar webdav-teambition-0.0.1-SNAPSHOT.jar --teambition.cookies="your cookies here" ``` ## 容器运行 +// todo ```bash + ``` + +# 参数说明 +```bash +--teambition.cookies + 必填,teambition官网cookies +``` + +# Chrome获取Cookies方式 +1. 用Chrome打开官网,保证是登录状态 https://www.teambition.com/ +2. 参考这篇百度经验 https://jingyan.baidu.com/article/0aa2237505193488cd0d647f.html +3. 要确保完整复制看到的cookies,并在启动参数时左右加上双引号 From f469bcd58e39a00765961c64811e4a9d2bacbdc3 Mon Sep 17 00:00:00 2001 From: zxbu <32785355+zxbu@users.noreply.github.com> Date: Sat, 16 Jan 2021 10:43:29 +0800 Subject: [PATCH 3/7] Update README.md --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 450e621..80f7dc3 100644 --- a/README.md +++ b/README.md @@ -23,3 +23,17 @@ java -jar webdav-teambition-0.0.1-SNAPSHOT.jar --teambition.cookies="your cookie 1. 用Chrome打开官网,保证是登录状态 https://www.teambition.com/ 2. 参考这篇百度经验 https://jingyan.baidu.com/article/0aa2237505193488cd0d647f.html 3. 要确保完整复制看到的cookies,并在启动参数时左右加上双引号 + +# 功能说明 +## 支持的功能 +1. 查看文件夹、查看文件 +2. 文件移动目录 +3. 文件重命名 +4. 文件下载 +5. 文件删除 +6. 文件上传(支持大文件自动分批上传) +## 暂不支持的功能 +1. 权限校验 +2. 移动文件到其他目录的同时,修改文件名。比如 /a.zip 移动到 /b/a1.zip,是不支持的 +3. 文件上传断点续传 +4. 文件下载断点续传 From 3f2807b7feb1653296c178ab94e7731ac5a49169 Mon Sep 17 00:00:00 2001 From: zxbu <32785355+zxbu@users.noreply.github.com> Date: Sat, 16 Jan 2021 10:57:47 +0800 Subject: [PATCH 4/7] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 80f7dc3..9d2af76 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ java -jar webdav-teambition-0.0.1-SNAPSHOT.jar --teambition.cookies="your cookie ```bash --teambition.cookies 必填,teambition官网cookies +--server.port + 非必填,服务器端口号,默认为8080 ``` # Chrome获取Cookies方式 From 699c7c1e6d88943efc8540bfdbade52d98dc495d Mon Sep 17 00:00:00 2001 From: zxbu <32785355+zxbu@users.noreply.github.com> Date: Sat, 16 Jan 2021 11:02:20 +0800 Subject: [PATCH 5/7] Update Dockerfile --- Dockerfile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7493c87..1974e9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,10 @@ +FROM maven:3.6.3-jdk-8 AS maven +USER root +COPY ./ /tmp/code +RUN cd /tmp/code && mvn -s /tmp/code/settings.xml clean package -Dmaven.test.skip=true -Dmaven.javadoc.skip=true + + FROM java:8 -VOLUME /tmp -ADD webdav-teambition.jar /webdav-teambition.jar -ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/webdav-teambition.jar"] \ No newline at end of file +COPY --from=maven /tmp/code/target/*.jar /webdav-teambition.jar +EXPOSE 8080 +ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/webdav-teambition.jar"] From a4d6c6a90fdd526595de6969881a6ae4ec81a37a Mon Sep 17 00:00:00 2001 From: zxbu <32785355+zxbu@users.noreply.github.com> Date: Sat, 16 Jan 2021 11:09:07 +0800 Subject: [PATCH 6/7] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1974e9b..3bc8b25 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM maven:3.6.3-jdk-8 AS maven USER root COPY ./ /tmp/code -RUN cd /tmp/code && mvn -s /tmp/code/settings.xml clean package -Dmaven.test.skip=true -Dmaven.javadoc.skip=true +RUN cd /tmp/code && mvn clean package -Dmaven.test.skip=true -Dmaven.javadoc.skip=true FROM java:8 From e8edcac9827e8b5f90a5ff2d1d51ae94fc2a9ab9 Mon Sep 17 00:00:00 2001 From: zxbu <32785355+zxbu@users.noreply.github.com> Date: Sat, 16 Jan 2021 19:36:53 +0800 Subject: [PATCH 7/7] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 9d2af76..8f5cf8f 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,8 @@ java -jar webdav-teambition-0.0.1-SNAPSHOT.jar --teambition.cookies="your cookies here" ``` ## 容器运行 -// todo ```bash - +docker run -d --name=webdav-teambition -p 8080:8080 zx5253/webdav-teambition:latest --teambition.cookies="your cookies here" ``` # 参数说明