summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Band2017-06-06 13:17:45 +0200
committerRicardo Band2017-06-06 13:17:45 +0200
commitc7eee2ebed5a825edbc232dcc9927d331dbbc215 (patch)
tree1edbcf653a77a3a4d6dca3c961bb8ec51357b1f6
downloadaur-c7eee2ebed5a825edbc232dcc9927d331dbbc215.tar.gz
initial commit
-rw-r--r--.SRCINFO12
-rw-r--r--.gitignore48
-rw-r--r--0xff.install7
-rw-r--r--0xff.service12
-rw-r--r--PKGBUILD19
-rw-r--r--nginx.conf22
6 files changed, 120 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..fe9ac5992f0c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,12 @@
+pkgbase = 0xff
+ pkgdesc = Simple http(s) file sharing tool. Think 'python -m http.server' but better.
+ pkgver = 1.1.0
+ pkgrel = 1
+ url = https://github.com/xengi/0xff
+ arch = x86_64
+ license = MIT
+ source = https://github.com/XenGi/0xff/releases/download/v1.1.0/0xff
+ sha256sums = ab79535ec5e56484f0c1a845a185a2555aaa8f998c4d7744f6d62a2ae8b11c14
+
+pkgname = 0xff
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..eb5df902fbe2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,48 @@
+0xff
+
+# Created by https://www.gitignore.io/api/vim,linux,archlinuxpackages
+
+### ArchLinuxPackages ###
+*.tar
+*.tar.*
+*.jar
+*.exe
+*.msi
+*.zip
+*.tgz
+*.log
+*.log.*
+*.sig
+
+pkg/
+src/
+
+### Linux ###
+*~
+
+# temporary files which can be created if a process still has a handle open of a deleted file
+.fuse_hidden*
+
+# KDE directory preferences
+.directory
+
+# Linux trash folder which might appear on any partition or disk
+.Trash-*
+
+# .nfs files are created when an open file is removed but is still being accessed
+.nfs*
+
+### Vim ###
+# swap
+[._]*.s[a-v][a-z]
+[._]*.sw[a-p]
+[._]s[a-v][a-z]
+[._]sw[a-p]
+# session
+Session.vim
+# temporary
+.netrwhist
+# auto-generated tag files
+tags
+
+# End of https://www.gitignore.io/api/vim,linux,archlinuxpackages
diff --git a/0xff.install b/0xff.install
new file mode 100644
index 000000000000..3efbb26e9a09
--- /dev/null
+++ b/0xff.install
@@ -0,0 +1,7 @@
+post_install() {
+ echo "Please edit the secret by creating the file '/etc/systemd/system/0xff.service.d/secret.conf' with the following content:"
+ echo ""
+ echo "[Service]"
+ echo "Environment=0XFF_SECRET=yoursecret"
+ echo ""
+}
diff --git a/0xff.service b/0xff.service
new file mode 100644
index 000000000000..207eef3f5638
--- /dev/null
+++ b/0xff.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=0xff http file sharing
+After=network.target
+
+[Service]
+Type=simple
+#Environment=0XFF_SECRET=
+#Environment=0XFF_PORT=
+ExecStart=/usr/bin/0xff
+
+[Install]
+WantedBy=multi-user.target
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4b832229a5ef
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,19 @@
+# Maintainer: Ricardo (XenGi) Band <email@ricardo.band>
+
+pkgname=0xff
+pkgver=1.1.0
+pkgrel=1
+pkgdesc="Simple http(s) file sharing tool. Think 'python -m http.server' but better."
+arch=('x86_64')
+url='https://github.com/xengi/0xff'
+license=('MIT')
+source=("https://github.com/XenGi/0xff/releases/download/v${pkgver}/0xff")
+sha256sums=('ab79535ec5e56484f0c1a845a185a2555aaa8f998c4d7744f6d62a2ae8b11c14')
+install='0xff.install'
+
+package() {
+ cd "${srcdir}"
+ install -Dm 755 0xff "${pkgdir}/usr/bin/0xff"
+ install -Dm 644 ../nginx.conf "${pkgdir}/usr/share/0xff/nginx.conf"
+ install -Dm 644 ../0xff.service "${pkgdir}/lib/systemd/system/0xff.service"
+}
diff --git a/nginx.conf b/nginx.conf
new file mode 100644
index 000000000000..09b871ac64fe
--- /dev/null
+++ b/nginx.conf
@@ -0,0 +1,22 @@
+upstream 0xff {
+ server 127.0.0.1:9999;
+}
+
+server {
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
+
+ server_name oxff.example.com;
+
+ ssl on;
+ ssl_certificate /etc/ssl/your_domain_name.pem;
+ ssl_certificate_key /etc/ssl/your_domain_name.key;
+
+ location /new {
+ return 404;
+ }
+
+ location / {
+ proxy_pass http://0xff;
+ }
+}