mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-06 22:20:55 +03:00
Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81741dcc76 | ||
|
|
58a0800384 | ||
|
|
7323f584c1 | ||
|
|
c616412449 | ||
|
|
b9faece68e | ||
|
|
097bdf8853 | ||
|
|
e96e09f664 | ||
|
|
0ebea72b3e | ||
|
|
9cac202892 | ||
|
|
b41c8087f9 | ||
|
|
9fcc8e36b0 | ||
|
|
905ca545c7 | ||
|
|
742b5de7e1 | ||
|
|
5d7162c4a3 | ||
|
|
4c5d8e3bd3 | ||
|
|
709997ba72 | ||
|
|
b880516edf | ||
|
|
fa716a7da6 | ||
|
|
40fc5c35ca | ||
|
|
8d72c81150 | ||
|
|
383b84ef1f | ||
|
|
7cba51b729 | ||
|
|
7d024a9998 | ||
|
|
eabff183ec | ||
|
|
d04829cbf2 | ||
|
|
af52b96ab4 | ||
|
|
ec26a8e38f | ||
|
|
41f5615acc | ||
|
|
756d1b1d14 | ||
|
|
a37a0c8678 | ||
|
|
8c50da564f | ||
|
|
214f723232 | ||
|
|
f2a6af409e | ||
|
|
b346e3e3ae | ||
|
|
aea428372d | ||
|
|
ea8efb9d93 | ||
|
|
2b7164f589 | ||
|
|
08399059e9 | ||
|
|
aea40fa11b | ||
|
|
e51c753c0d | ||
|
|
6520d71faa | ||
|
|
97b0b10863 | ||
|
|
50e76e0895 | ||
|
|
610e036e26 | ||
|
|
e695a8b481 | ||
|
|
d33ddf643b | ||
|
|
512bd32368 | ||
|
|
3c42de0efd | ||
|
|
b7582230cf |
32
Dockerfile
32
Dockerfile
@@ -4,41 +4,57 @@
|
|||||||
# License https://gitlab.com/timvisee/send/blob/master/LICENSE
|
# License https://gitlab.com/timvisee/send/blob/master/LICENSE
|
||||||
##
|
##
|
||||||
|
|
||||||
|
|
||||||
# Build project
|
# Build project
|
||||||
FROM node:current-alpine AS builder
|
FROM node:16.13-alpine3.13 AS builder
|
||||||
|
|
||||||
|
RUN set -x \
|
||||||
|
# Change node uid/gid
|
||||||
|
&& apk --no-cache add shadow \
|
||||||
|
&& groupmod -g 1001 node \
|
||||||
|
&& usermod -u 1001 -g 1001 node
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
# Add user
|
# Add user
|
||||||
&& addgroup --gid 10001 app \
|
&& addgroup --gid 1000 app \
|
||||||
&& adduser --disabled-password \
|
&& adduser --disabled-password \
|
||||||
--gecos '' \
|
--gecos '' \
|
||||||
--ingroup app \
|
--ingroup app \
|
||||||
--home /app \
|
--home /app \
|
||||||
--uid 10001 \
|
--uid 1000 \
|
||||||
app
|
app
|
||||||
|
|
||||||
COPY --chown=app:app . /app
|
COPY --chown=app:app . /app
|
||||||
|
|
||||||
USER app
|
USER app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
# Build
|
# Build
|
||||||
&& PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm ci \
|
&& PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm ci \
|
||||||
&& npm run build
|
&& npm run build
|
||||||
|
|
||||||
|
|
||||||
# Main image
|
# Main image
|
||||||
FROM node:current-alpine
|
FROM node:16.13-alpine3.13
|
||||||
|
|
||||||
|
RUN set -x \
|
||||||
|
# Change node uid/gid
|
||||||
|
&& apk --no-cache add shadow \
|
||||||
|
&& groupmod -g 1001 node \
|
||||||
|
&& usermod -u 1001 -g 1001 node
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
# Add user
|
# Add user
|
||||||
&& addgroup --gid 10001 app \
|
&& addgroup --gid 1000 app \
|
||||||
&& adduser --disabled-password \
|
&& adduser --disabled-password \
|
||||||
--gecos '' \
|
--gecos '' \
|
||||||
--ingroup app \
|
--ingroup app \
|
||||||
--home /app \
|
--home /app \
|
||||||
--uid 10001 \
|
--uid 1000 \
|
||||||
app
|
app
|
||||||
|
|
||||||
USER app
|
USER app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --chown=app:app package*.json ./
|
COPY --chown=app:app package*.json ./
|
||||||
COPY --chown=app:app app app
|
COPY --chown=app:app app app
|
||||||
COPY --chown=app:app common common
|
COPY --chown=app:app common common
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# [](https://gitlab.com/timvisee/send/) Send
|
# [](https://gitlab.com/timvisee/send/) Send
|
||||||
|
|
||||||
[![Build status on GitLab CI][gitlab-ci-master-badge]][gitlab-ci-link]
|
[![Build status on GitLab CI][gitlab-ci-master-badge]][gitlab-ci-link]
|
||||||
[![Latest release][release-badge]][release-link]
|
[![Latest release][release-badge]][release-link]
|
||||||
@@ -81,7 +81,7 @@ A file sharing experiment which allows you to send encrypted files to other user
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- [Node.js 15.x](https://nodejs.org/)
|
- [Node.js 16.x](https://nodejs.org/)
|
||||||
- [Redis server](https://redis.io/) (optional for development)
|
- [Redis server](https://redis.io/) (optional for development)
|
||||||
- [AWS S3](https://aws.amazon.com/s3/) or compatible service (optional)
|
- [AWS S3](https://aws.amazon.com/s3/) or compatible service (optional)
|
||||||
|
|
||||||
|
|||||||
@@ -175,7 +175,6 @@ footer li a:hover {
|
|||||||
position: relative;
|
position: relative;
|
||||||
max-width: 64rem;
|
max-width: 64rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.main > section {
|
.main > section {
|
||||||
@@ -271,7 +270,6 @@ select {
|
|||||||
@apply m-auto;
|
@apply m-auto;
|
||||||
@apply py-8;
|
@apply py-8;
|
||||||
|
|
||||||
min-height: 42rem;
|
|
||||||
max-height: 42rem;
|
max-height: 42rem;
|
||||||
width: calc(100% - 3rem);
|
width: calc(100% - 3rem);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class File {
|
|||||||
const v = new DataView(h);
|
const v = new DataView(h);
|
||||||
v.setUint32(0, 0x04034b50, true); // sig
|
v.setUint32(0, 0x04034b50, true); // sig
|
||||||
v.setUint16(4, 20, true); // version
|
v.setUint16(4, 20, true); // version
|
||||||
v.setUint16(6, 8, true); // bit flags (8 = use data descriptor)
|
v.setUint16(6, 0x808, true); // bit flags (use data descriptor(8) + utf8-encoded(8 << 8))
|
||||||
v.setUint16(8, 0, true); // compression
|
v.setUint16(8, 0, true); // compression
|
||||||
v.setUint16(10, this.dateTime.time, true); // modified time
|
v.setUint16(10, this.dateTime.time, true); // modified time
|
||||||
v.setUint16(12, this.dateTime.date, true); // modified date
|
v.setUint16(12, this.dateTime.date, true); // modified date
|
||||||
@@ -60,7 +60,7 @@ class File {
|
|||||||
v.setUint32(0, 0x02014b50, true); // sig
|
v.setUint32(0, 0x02014b50, true); // sig
|
||||||
v.setUint16(4, 20, true); // version made
|
v.setUint16(4, 20, true); // version made
|
||||||
v.setUint16(6, 20, true); // version required
|
v.setUint16(6, 20, true); // version required
|
||||||
v.setUint16(8, 8, true); // bit flags (8 = use data descriptor)
|
v.setUint16(8, 0x808, true); // bit flags (use data descriptor(8) + utf8-encoded(8 << 8))
|
||||||
v.setUint16(10, 0, true); // compression
|
v.setUint16(10, 0, true); // compression
|
||||||
v.setUint16(12, this.dateTime.time, true); // modified time
|
v.setUint16(12, this.dateTime.time, true); // modified time
|
||||||
v.setUint16(14, this.dateTime.date, true); // modified date
|
v.setUint16(14, this.dateTime.date, true); // modified date
|
||||||
|
|||||||
BIN
assets/icon-64x64.png
Normal file
BIN
assets/icon-64x64.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
14
docs/faq.md
14
docs/faq.md
@@ -1,12 +1,12 @@
|
|||||||
## How big of a file can I transfer with Send?
|
## How big of a file can I transfer with Send?
|
||||||
|
|
||||||
There is a 2.5GB file size limit built in to Send(1GB for non-signed in users), however, in practice you may
|
There is a 2GB file size limit built in to Send, but this may be changed by the
|
||||||
be unable to send files that large. Send encrypts and decrypts the files in
|
hoster. Send encrypts and decrypts the files in the browser which is great for
|
||||||
the browser which is great for security but will tax your system resources. In
|
security but will tax your system resources. In particular you can expect to
|
||||||
particular you can expect to see your memory usage go up by at least the size
|
see your memory usage go up by at least the size of the file when the transfer
|
||||||
of the file when the transfer is processing. You can see [the results of some
|
is processing. You can see [the results of some
|
||||||
testing](https://github.com/mozilla/send/issues/170#issuecomment-314107793).
|
testing](https://github.com/mozilla/send/issues/170#issuecomment-314107793). For
|
||||||
For the most reliable operation on common computers, it’s probably best to stay
|
the most reliable operation on common computers, it’s probably best to stay
|
||||||
under a few hundred megabytes.
|
under a few hundred megabytes.
|
||||||
|
|
||||||
## Why is my browser not supported?
|
## Why is my browser not supported?
|
||||||
|
|||||||
35228
package-lock.json
generated
35228
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
37
package.json
37
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "send",
|
"name": "send",
|
||||||
"description": "File Sharing Experiment",
|
"description": "File Sharing Experiment",
|
||||||
"version": "3.4.14",
|
"version": "3.4.19",
|
||||||
"author": "Mozilla (https://mozilla.org)",
|
"author": "Mozilla (https://mozilla.org)",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Tim Visee <3a4fb3964f@sinenomine.email> (https://timvisee.com)"
|
"Tim Visee <3a4fb3964f@sinenomine.email> (https://timvisee.com)"
|
||||||
@@ -59,24 +59,24 @@
|
|||||||
"cache": true
|
"cache": true
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^15.5.1"
|
"node": "^16.13.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.15.5",
|
"@babel/core": "^7.17.9",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.14.5",
|
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
||||||
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||||
"@babel/preset-env": "^7.15.6",
|
"@babel/preset-env": "^7.16.11",
|
||||||
"@dannycoates/webcrypto-liner": "^0.1.37",
|
"@dannycoates/webcrypto-liner": "^0.1.37",
|
||||||
"@fullhuman/postcss-purgecss": "^1.3.0",
|
"@fullhuman/postcss-purgecss": "^1.3.0",
|
||||||
"@mattiasbuelens/web-streams-polyfill": "0.2.1",
|
"@mattiasbuelens/web-streams-polyfill": "0.2.1",
|
||||||
"@sentry/browser": "^5.30.0",
|
"@sentry/browser": "^5.30.0",
|
||||||
"asmcrypto.js": "^0.22.0",
|
"asmcrypto.js": "^0.22.0",
|
||||||
"babel-loader": "^8.2.2",
|
"babel-loader": "^8.2.4",
|
||||||
"babel-plugin-istanbul": "^5.2.0",
|
"babel-plugin-istanbul": "^5.2.0",
|
||||||
"base64-js": "^1.5.1",
|
"base64-js": "^1.5.1",
|
||||||
"content-disposition": "^0.5.3",
|
"content-disposition": "^0.5.4",
|
||||||
"copy-webpack-plugin": "^5.1.2",
|
"copy-webpack-plugin": "^5.1.2",
|
||||||
"core-js": "^3.18.2",
|
"core-js": "^3.21.1",
|
||||||
"crc": "^3.8.0",
|
"crc": "^3.8.0",
|
||||||
"cross-env": "^6.0.3",
|
"cross-env": "^6.0.3",
|
||||||
"css-loader": "^3.6.0",
|
"css-loader": "^3.6.0",
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"nyc": "^14.1.1",
|
"nyc": "^14.1.1",
|
||||||
"postcss-loader": "^3.0.0",
|
"postcss-loader": "^3.0.0",
|
||||||
"postcss-preset-env": "^6.7.0",
|
"postcss-preset-env": "^6.7.1",
|
||||||
"prettier": "^1.19.1",
|
"prettier": "^1.19.1",
|
||||||
"proxyquire": "^2.1.3",
|
"proxyquire": "^2.1.3",
|
||||||
"puppeteer": "^2.0.0",
|
"puppeteer": "^2.0.0",
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
"webpack": "4.38.0",
|
"webpack": "4.38.0",
|
||||||
"webpack-cli": "^3.3.12",
|
"webpack-cli": "^3.3.12",
|
||||||
"webpack-dev-middleware": "^3.7.3",
|
"webpack-dev-middleware": "^3.7.3",
|
||||||
"webpack-dev-server": "^3.11.2",
|
"webpack-dev-server": "^3.11.3",
|
||||||
"webpack-manifest-plugin": "^2.2.0",
|
"webpack-manifest-plugin": "^2.2.0",
|
||||||
"webpack-unassert-loader": "^1.2.0"
|
"webpack-unassert-loader": "^1.2.0"
|
||||||
},
|
},
|
||||||
@@ -133,24 +133,25 @@
|
|||||||
"@dannycoates/express-ws": "^5.0.3",
|
"@dannycoates/express-ws": "^5.0.3",
|
||||||
"@fluent/bundle": "^0.13.0",
|
"@fluent/bundle": "^0.13.0",
|
||||||
"@fluent/langneg": "^0.3.0",
|
"@fluent/langneg": "^0.3.0",
|
||||||
"@google-cloud/storage": "^5.14.6",
|
"@google-cloud/storage": "^5.19.0",
|
||||||
"@sentry/node": "^5.30.0",
|
"@sentry/node": "^5.30.0",
|
||||||
"aws-sdk": "^2.1001.0",
|
"aws-sdk": "^2.1109.0",
|
||||||
"body-parser": "^1.19.0",
|
"body-parser": "^1.20.0",
|
||||||
"choo": "^7.0.0",
|
"choo": "^7.0.0",
|
||||||
"cldr-core": "^35.1.0",
|
"cldr-core": "^35.1.0",
|
||||||
"configstore": "github:dannycoates/configstore#master",
|
"configstore": "github:dannycoates/configstore#master",
|
||||||
"convict": "^5.2.1",
|
"convict": "^6.2.2",
|
||||||
|
"convict-format-with-validator": "^6.2.0",
|
||||||
"double-ended-queue": "^2.1.0-0",
|
"double-ended-queue": "^2.1.0-0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.3",
|
||||||
"helmet": "^3.23.3",
|
"helmet": "^3.23.3",
|
||||||
"mkdirp": "^0.5.1",
|
"mkdirp": "^0.5.6",
|
||||||
"mozlog": "^2.2.0",
|
"mozlog": "^2.2.0",
|
||||||
"node-fetch": "^2.6.5",
|
"node-fetch": "^2.6.7",
|
||||||
"redis": "^3.1.1",
|
"redis": "^3.1.1",
|
||||||
"redis-mock": "^0.47.0",
|
"redis-mock": "^0.47.0",
|
||||||
"selenium-standalone": "^6.24.0",
|
"selenium-standalone": "^6.24.0",
|
||||||
"ua-parser-js": "^0.7.28"
|
"ua-parser-js": "^0.7.31"
|
||||||
},
|
},
|
||||||
"availableLanguages": [
|
"availableLanguages": [
|
||||||
"en-US",
|
"en-US",
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
const convict = require('convict');
|
const convict = require('convict');
|
||||||
|
const convict_format_with_validator = require('convict-format-with-validator');
|
||||||
const { tmpdir } = require('os');
|
const { tmpdir } = require('os');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { randomBytes } = require('crypto');
|
const { randomBytes } = require('crypto');
|
||||||
|
|
||||||
|
convict.addFormats(convict_format_with_validator);
|
||||||
|
|
||||||
convict.addFormat({
|
convict.addFormat({
|
||||||
name: 'positive-int-array',
|
name: 'positive-int-array',
|
||||||
coerce: ints => {
|
coerce: ints => {
|
||||||
|
|||||||
Reference in New Issue
Block a user