-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
124 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
server { | ||
listen TARGET; | ||
server_name ONION_HOSTNAME; | ||
|
||
access_log /var/log/nginx/access_SERVICE.log; | ||
error_log /var/log/nginx/error_SERVICE.log; | ||
|
||
location / { | ||
proxy_pass http://unix:/var/run/tfs_SERVICE.sock; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# TorBox FileSharing | ||
A web-client used to share files in the TorBox Project. | ||
|
||
## Installation | ||
###### Note: Instructions are exclusive for TorBox Project. | ||
|
||
### Requirements | ||
**TFS** was developed using Python 3.9, so it is recommended to use this version or higher. | ||
|
||
Dependencies: | ||
- Flask | ||
- Flask_compress | ||
- Flask_CORS | ||
- click | ||
|
||
To install dependencies, run | ||
|
||
```sudo pip install -r requirements.txt``` | ||
|
||
## Usage | ||
To allow download and upload to one of your directories, simply run | ||
|
||
```./tfs -fp /path/to/shared/dir``` | ||
|
||
For more options see | ||
|
||
``` | ||
Usage: tfs [OPTIONS] | ||
Options: | ||
-n, --name TEXT Onion Service Name | ||
-od, --onion-domain TEXT Onion domain where TFS will be published | ||
-fp, --file-path TEXT Path to share | ||
--dev BOOLEAN Run in development mode (Default: 0) | ||
--help Show this message and exit. | ||
``` | ||
|
||
### Manage permissions | ||
|
||
Permissions are managed by a file inside the shared directory called `.access` | ||
which must contain a list of subdirectories of the shared directory and their | ||
permissions, separated by a semicolon, in the following format: | ||
|
||
``` | ||
/path/to/directory;rw | ||
/path/to/another/directory;r | ||
``` | ||
|
||
Where: | ||
|
||
- `r` stands for read-only (can download files) | ||
- `w` stands for write (can upload files | ||
- `x` stands for excecute (can list files) | ||
- `rw` stands for read and write (can upload and download files) | ||
- `rx` stands for read and execute (can list and download files) | ||
|
||
By default, all directories are set to `rx` permissions. | ||
|
||
Permissions will make the directory appear in the web-client, and will allow | ||
users to download and upload files to it. | ||
|
||
## Development | ||
|
||
To run TFS in development mode, simply run | ||
|
||
```./tfs -n test -od test -fp /path/to/directory --dev 1``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,5 @@ | ||
blinker==1.7.0 | ||
Brotli==1.1.0 | ||
click==8.1.7 | ||
Flask==3.0.0 | ||
Flask-Compress==1.14 | ||
Flask-Cors==4.0.0 | ||
importlib-metadata==6.9.0 | ||
itsdangerous==2.1.2 | ||
Jinja2==3.1.2 | ||
MarkupSafe==2.1.3 | ||
Werkzeug==3.0.1 | ||
zipp==3.17.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters