-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from nbitzz/1.3.0
1.3.0
- Loading branch information
Showing
112 changed files
with
8,208 additions
and
3,121 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
node_modules | ||
.env | ||
.data | ||
node_modules | ||
.env | ||
.data | ||
out |
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,23 +1,23 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "shell", | ||
"command":"npx tsc", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"label": "Build (Bot Server)" | ||
}, | ||
{ | ||
"type": "shell", | ||
"command":"npx tsc\nnode ./out/index.js\ndel ./out/* -Recurse", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"label": "Build & Test" | ||
} | ||
] | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "shell", | ||
"command":"tsc\nsass src/style:out/style\nrollup -c", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"label": "Build (Bot Server)" | ||
}, | ||
{ | ||
"type": "shell", | ||
"command":"tsc\nsass src/style:out/style\nrollup -c\nnode ./out/server/index.js\ndel ./out/* -Recurse", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"label": "Build & Test" | ||
} | ||
] | ||
} |
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,24 +1,24 @@ | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
This is free and unencumbered software released into the public domain. | ||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
For more information, please refer to <http://unlicense.org/> |
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,32 +1,75 @@ | ||
# monofile | ||
File sharing via Discord | ||
|
||
<br> | ||
|
||
## .env | ||
|
||
``` | ||
TOKEN=KILL-YOURSELF.NOW | ||
``` | ||
|
||
## versions & planned updates | ||
|
||
- [X] 1.0.0 initial release | ||
- [X] 1.1.0 add file cloning endpoint | ||
- [X] 1.1.1 add file cloning webpage | ||
- [X] 1.1.2 fix file cloning with binary data | ||
- [X] 1.1.3 display current version on pages | ||
- [X] 1.1.4 serve /assets as static files & make /server endpoint | ||
- [X] 1.2.0 add file parameters section + custom ids | ||
- [X] 1.2.1 add file counter to main page | ||
- [X] 1.2.2 clean up this shitty code | ||
- [X] 1.2.3 bugfixes | ||
- [ ] 1.2.4 add id locks, allowing you to set a key for a file that allows you to overwrite the file in the future | ||
- [ ] 1.2.5 prevent cloning of local/private ip addresses | ||
- [ ] 1.3.0 add simple moderation tools | ||
- [ ] 2.0.0 rewrite using theUnfunny's code as a base/rewrite using monofile-core | ||
|
||
also todo: monofile-core (written in eris) | ||
|
||
## Disclaimer! | ||
This project does some stuff that can be considered questionable. Discord may not like you uploading files this way, and it's a grey area in Discord's TOS. We take no responsibility if Discord locks your account for API abuse. | ||
# monofile | ||
The open-source, Discord-based file sharing service. | ||
[Live instance](https://fyle.uk) | ||
|
||
<br> | ||
|
||
## Setup | ||
|
||
First, install monofile's prerequisites... | ||
``` | ||
npm i | ||
``` | ||
|
||
Then, add your bot token... | ||
``` | ||
echo "TOKEN=INSERT-TOKEN.HERE" > .env | ||
``` | ||
and, in addition, SMTP authentication... | ||
``` | ||
echo "\[email protected]" > .env | ||
echo "\nMAIL_PASS=password here" > .env | ||
``` | ||
|
||
Invite your bot to a server, and create a new `config.json` in the project root: | ||
```js | ||
// config.json | ||
{ | ||
"maxDiscordFiles": 20, | ||
"maxDiscordFileSize": 26214400, | ||
"targetGuild": "1024080490677936248", | ||
"targetChannel": "1024080525993971913", | ||
"requestTimeout":120000, | ||
"maxUploadIdLength":30, | ||
|
||
"accounts": { | ||
"registrationEnabled": true, | ||
"requiredForUpload": false | ||
}, | ||
|
||
"webdrop": { | ||
"accountRequired": false | ||
}, | ||
|
||
"mail": { // nodemailer transport options | ||
"host": "smtp.fastmail.com", // or your mail provider of choice | ||
"port": 465, | ||
"secure": true, | ||
"auth": { | ||
"user": "[email protected]", | ||
"pass": "REPLACE-WITH-YOUR-GENERATED-PASSWORD" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
Then, compile: | ||
``` | ||
tsc && sass src/style:out/style && rollup -c | ||
``` | ||
and start. | ||
``` | ||
npm start | ||
``` | ||
|
||
monofile should now be running on either `env.MONOFILE_PORT` or port `3000`. | ||
|
||
## Disclaimer | ||
|
||
Although we believe monofile is not against Discord's developer terms of service, monofile's contributors are not liable if Discord takes action against you for running an instance. | ||
|
||
## License | ||
|
||
Code written by monofile's contributors is currently licensed under [Unlicense](https://github.com/nbitzz/monofile/blob/main/LICENSE). | ||
|
||
Icons under `/assets/icons` were created by Microsoft, and as such are licensed under [different terms](https://github.com/nbitzz/monofile/blob/1.3.0/assets/icons/README.md) (MIT). |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,34 @@ | ||
@font-face { | ||
font-family: "Fira Code"; | ||
src: url("/static/assets/fonts/FiraCode-Light.ttf"); | ||
font-weight: 300; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: "Fira Code"; | ||
src: url("/static/assets/fonts/FiraCode-Regular.ttf"); | ||
font-weight: 400; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: "Fira Code"; | ||
src: url("/static/assets/fonts/FiraCode-Medium.ttf"); | ||
font-weight: 500; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: "Fira Code"; | ||
src: url("/static/assets/fonts/FiraCode-SemiBold.ttf"); | ||
font-weight: 600; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: "Fira Code"; | ||
src: url("/static/assets/fonts/FiraCode-Bold.ttf"); | ||
font-weight: 700; | ||
font-style: normal; | ||
} |
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,55 @@ | ||
@font-face { | ||
font-family: "Inconsolata"; | ||
src: url("/static/assets/fonts/Inconsolata-ExtraLight.ttf"); | ||
font-weight: 200; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: "Inconsolata"; | ||
src: url("/static/assets/fonts/Inconsolata-Light.ttf"); | ||
font-weight: 300; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: "Inconsolata"; | ||
src: url("/static/assets/fonts/Inconsolata-Regular.ttf"); | ||
font-weight: 400; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: "Inconsolata"; | ||
src: url("/static/assets/fonts/Inconsolata-Medium.ttf"); | ||
font-weight: 500; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: "Inconsolata"; | ||
src: url("/static/assets/fonts/Inconsolata-SemiBold.ttf"); | ||
font-weight: 600; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: "Inconsolata"; | ||
src: url("/static/assets/fonts/Inconsolata-Bold.ttf"); | ||
font-weight: 700; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: "Inconsolata"; | ||
src: url("/static/assets/fonts/Inconsolata-ExtraBold.ttf"); | ||
font-weight: 800; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: "Inconsolata"; | ||
src: url("/static/assets/fonts/Inconsolata-Black.ttf"); | ||
font-weight: 900; | ||
font-style: normal; | ||
} |
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 @@ | ||
These fonts are licensed under the OFL |
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,41 @@ | ||
@font-face { | ||
font-family: "Source Sans Pro"; | ||
src: url("/static/assets/fonts/SourceSansPro-Regular.ttf"); | ||
font-weight: 400; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: "Source Sans Pro"; | ||
src: url("/static/assets/fonts/SourceSansPro-Italic.ttf"); | ||
font-weight: 400; | ||
font-style: italic; | ||
} | ||
|
||
@font-face { | ||
font-family: "Source Sans Pro"; | ||
src: url("/static/assets/fonts/SourceSansPro-SemiBold.ttf"); | ||
font-weight: 600; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: "Source Sans Pro"; | ||
src: url("/static/assets/fonts/SourceSansPro-SemiBoldItalic.ttf"); | ||
font-weight: 600; | ||
font-style: italic; | ||
} | ||
|
||
@font-face { | ||
font-family: "Source Sans Pro"; | ||
src: url("/static/assets/fonts/SourceSansPro-Bold.ttf"); | ||
font-weight: 700; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: "Source Sans Pro"; | ||
src: url("/static/assets/fonts/SourceSansPro-BoldItalic.ttf"); | ||
font-weight: 700; | ||
font-style: italic; | ||
} |
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,28 @@ | ||
These icons were originally distributed by Microsoft as part of the Fluent System UI icon collection. | ||
https://github.com/microsoft/fluentui-system-icons | ||
|
||
They are licensed under separate terms, those being: | ||
|
||
``` | ||
MIT License | ||
Copyright (c) 2020 Microsoft Corporation | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.