All Projects → 117503445 → GoWebDAV

117503445 / GoWebDAV

Licence: GPL-3.0 license
a lightweight, easy-to-use WebDAV server

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to GoWebDAV

Webdavfs
Linux / OSX FUSE webdav filesystem. This filesystem behaves like a real network filesystem- no unnecessary copying of entire files.
Stars: ✭ 69 (+9.52%)
Mutual labels:  webdav
Xandikos
A CalDAV/CardDAV server
Stars: ✭ 161 (+155.56%)
Mutual labels:  webdav
WebDAVAjax
WebDAV AJAX Library for opening docs from a web page and saving back directly to server in a SharePoint-like manner.
Stars: ✭ 16 (-74.6%)
Mutual labels:  webdav
Siyuan
📕 SiYuan is a local-first personal knowledge management system, support fine-grained block-level reference and Markdown instant-render editing.
Stars: ✭ 1,196 (+1798.41%)
Mutual labels:  webdav
Unifile
Unified access to cloud storage services through a simple web API.
Stars: ✭ 105 (+66.67%)
Mutual labels:  webdav
Vscode Remote Workspace
Multi protocol support for handling remote files like local ones in Visual Studio Code.
Stars: ✭ 197 (+212.7%)
Mutual labels:  webdav
Cyberduck
Cyberduck is a libre FTP, SFTP, WebDAV, Amazon S3, Backblaze B2, Microsoft Azure & OneDrive and OpenStack Swift file transfer client for Mac and Windows.
Stars: ✭ 1,080 (+1614.29%)
Mutual labels:  webdav
mindav
A self-hosted file backup server which bridges WebDAV protocol with @minio written in @totoval. Webdav ❤️ Minio
Stars: ✭ 64 (+1.59%)
Mutual labels:  webdav
Npm Webdav Server
WebDAV Server for npm
Stars: ✭ 138 (+119.05%)
Mutual labels:  webdav
gitsynchista
Python tool for Pythonista to synchronize local files with a Github repository hosted on a WebDav server
Stars: ✭ 27 (-57.14%)
Mutual labels:  webdav
Phpzoterowebdav
an implementation of a WebDAV server in php for use with zotero's sync functionality PLUS full access to zotero library and stored attachments (IMPORTANT: this original branch is no longer maintained; several patches have been applied in this fork: https://github.com/ddean4040/phpZoteroWebDAV)
Stars: ✭ 77 (+22.22%)
Mutual labels:  webdav
Gowebdav
A golang WebDAV client library and command line tool.
Stars: ✭ 97 (+53.97%)
Mutual labels:  webdav
Dcache
dCache - a system for storing and retrieving huge amounts of data, distributed among a large number of heterogenous server nodes, under a single virtual filesystem tree with a variety of standard access methods
Stars: ✭ 204 (+223.81%)
Mutual labels:  webdav
Webdav Fs
Node fs wrapper for WebDAV
Stars: ✭ 72 (+14.29%)
Mutual labels:  webdav
spring-file-storage-service
The FSS(file storage service) APIs make storing the blob file easy and simple .
Stars: ✭ 33 (-47.62%)
Mutual labels:  webdav
Dave
A totally simple and very easy to configure stand alone webdav server
Stars: ✭ 69 (+9.52%)
Mutual labels:  webdav
Floccus
☁️ Sync your bookmarks privately across browsers
Stars: ✭ 2,630 (+4074.6%)
Mutual labels:  webdav
libcloudstorage
Official libcloudstorage repository.
Stars: ✭ 49 (-22.22%)
Mutual labels:  webdav
backmeup
BackMeUp: An automated MySQL / MariaDB databases and files backup solution on *nix Machines using Amazon S3, WebDAV (ownCloud / NextCloud etc.), Google Drive and Dropbox.
Stars: ✭ 80 (+26.98%)
Mutual labels:  webdav
Sftpgo
Fully featured and highly configurable SFTP server with optional HTTP, FTP/S and WebDAV support - S3, Google Cloud Storage, Azure Blob
Stars: ✭ 3,534 (+5509.52%)
Mutual labels:  webdav

GoWebdav

Share local files with WebDAV, lightweight and very easy to use.

中文

feature

  • Based on Golang implementation, high performance

  • Finally compiled into a single binary file, no need for Apache and other environments, more stable

  • Support browser access

  • Multiple WebDAV services can be enabled under the same port, each with a different mount directory, user name, and password

  • Docker is well supported

quickstart

bin

Go to https://github.com/117503445/GoWebDAV/releases to download the latest binaries.

Then run . /gowebdav

GoWebDAV will automatically create the example file under the ./data path with the following file structure

> tree ./data
./data
├── public-writable
│ └── 1.txt
├── public-readonly
│ └── 2.txt
└── private-writable
    └── 3.txt

Visit http://localhost:80 with your browser and you will see 3 different GoWebDAV services.

index

where http://localhost:80/public-writable is the public-writable service that maps the local ./data/public-writable folder. It is Anonymizable and writable. You can view the contents of the file in the browser, as well as perform operations such as uploading and deleting.

public-writable

http://localhost:80/public-readonly is the public-readonly service that maps the local ./data/public-readonly folder. It is Anonymizable and read-only. You can view the contents of the file in your browser, but you cannot upload, delete, etc.

public-readonly

http://localhost:80/private-writable is the private-writable service that maps the local ./data/private-writable folder. It is user-authenticated and writable. After logging in with user1 and pass1, you can view the contents of the files in the browser, as well as upload, delete, etc.

private-writable

The dav parameter can also be specified to configure the local path, user authentication, read-only, etc. properties of the WebDAV service, as described in the Configuration Strings Description section. When dav is not specified, the default dav parameter used by GoWebDAV is /public-writable,./data/public-writable,null,null,false;/public-readonly,./data/public-readonly,null,null,true;/private-writable,./data/private-writable,user1,pass1,false.

Docker

The local file paths to be shared are /root/dir1 and /root/dir2.

docker run -it --name go_webdav -d -v /root/dir1:/root/dir1 -v /root/dir2:/root/dir2 -e dav="/dav1,/root/dir1,user1,pass1,true;/dav2,/root/dir2,null,null,false" -p 80:80 --restart=unless-stopped 117503445/go_webdav
-e dav="/dav1,/root/dir1,user1,pass1,true;/dav2,/root/dir2,null,null,false"

Indicates passing a configuration string into the Docker image.

Then open http://localhost/dav1 and http://localhost/dav2 in the browser or webdav client like raidrive.

Configuration String

You can pass the --dav parameter to change the configuration.

On Windows, the same call as quickstart is made as follows

// cmd
gowebdav_windows_amd64.exe --dav "/public-writable,./data/public-writable,null,null,false;/public-readonly,./data/public-readonly,null,null,true;/private-writable,./data/private-writable,user1,pass1,false"

// PowerShell
.\gowebdav_windows_amd64.exe --dav "/public-writable,./data/public-writable,null,null,false;/public-readonly,./data/public-readonly,null,null,true;/private-writable,./data/private-writable,user1,pass1,false"

On Windows, the same call as quickstart is made as follows

./gowebdav_linux_amd64 --dav "/public-writable,./data/public-writable,null,null,false;/public-readonly,./data/public-readonly,null,null,true;/private-writable,./data/private-writable,user1,pass1,false"

The following is a specific explanation of dav

Use a semicolon to separate each WebDAV service configuration, which means that "/dav1,/root/dir1,user1,pass1,true;/dav2,/root/dir2,null,null,false" describes 2 services, which are

/dav1,/root/dir1,user1,pass1,false

and

/dav2,/root/dir2,null,null,true

The first service will mount the /root/dir1 directory of the Docker image under /dav1. The required username and password for access are user1 and pass1 respectively.

Then, according to the previous -v /root/dir1:/root/dir1, the mapping relationship with /root/dir1 of the physical machine can be completed and accessed.

The fifth parameter false indicates that this is a non-read-only service that supports addition, deletion, modification and query.

The second service will mount the /root/dir2 directory of the Docker image under /dav2. The user name and password required for access are null and null respectively. At this time, it means that the service can be accessed without a password. .

Then according to the previous -v /root/dir2:/root/dir2, you can complete the mapping relationship with /root/dir2 of the physical machine and access it.

The fifth parameter true indicates that this is a read-only service, only supports GET, does not support additions, deletions and modifications.

This method is recommended for file sharing without confidentiality requirements.

Docker Compose

Expose /root/dir1, which requires authentication, and /root/dir2, which does not require authentication.

version: "3.9"
services:
  go_webdav:
    volumes:
      - "/root/dir1:/root/dir1"
      - "/root/dir2:/root/dir2"
    environment:
      - "dav=/dav1,/root/dir1,user1,pass1,true;/dav2,/root/dir2,null,null,false"
    ports:
      - "80:80"
    restart: unless-stopped
    image: 117503445/go_webdav

Background introduction

GoWebdav is used to build a WebDAV-based file sharing server.

Reasons to use WebDAV

  1. Samba is inconvenient to use on Windows clients, and it is difficult to use non-default ports.

  2. FTP mount trouble.

  3. NextCloud is too heavy and difficult to share files on the server.

Because I didn't see a server-side implementation that could meet the above features, this project recreated a WebDAV Server.

Local debugging

Rename config.yml.example to config.yml, configure in config.yml file

go run .

Local Docker build

Using a layered build, the executable app is built through go build in the build layer, and then run in the prod layer. If you need to modify the structure of the configuration file later, you will also need to modify the Dockerfile.

docker build -t 117503445/go_webdav .
docker run --name go_webdav -d -v ${PWD}/TestDir1:/root/TestDir1 -v ${PWD}/TestDir2:/root/TestDir2 -e dav="/dav1,/root/TestDir1,user1,pass1,false;/dav2,/root/TestDir2,user2,pass2,true" -p 80:80 --restart=unless-stopped 117503445/go_webdav

Safety

HTTP Basic Auth is used for authentication, and the account password is sent in clear text, which has no security at all. If important files or passwords are involved, be sure to use a gateway such as Nginx or Traefik to provide HTTPS.

Acknowledgments

https://github.com/dom111/webdav-js provides front-end support

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].