about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorHygna <hygna@proton.me>2022-10-28 13:34:26 +0100
committerHygna <hygna@proton.me>2022-10-28 13:34:26 +0100
commit70301fc8b5a3b166796ddd4b2ebfac6ba8ff6168 (patch)
treecb396d1ebf165184f5fe498e7fb8a246abe06f04
parentSwitched bullseye image (diff)
downloadlibredirect-70301fc8b5a3b166796ddd4b2ebfac6ba8ff6168.zip
Added PrivateBin
https://github.com/libredirect/libredirect/issues/374
-rw-r--r--src/assets/images/textStorage-icon.svg3
-rw-r--r--src/config/config.json16
-rwxr-xr-xsrc/instances/get_instances.py6
3 files changed, 25 insertions, 0 deletions
diff --git a/src/assets/images/textStorage-icon.svg b/src/assets/images/textStorage-icon.svg
new file mode 100644
index 00000000..6eccd96b
--- /dev/null
+++ b/src/assets/images/textStorage-icon.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor">
+  <path d="M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z"></path>
+</svg>
diff --git a/src/config/config.json b/src/config/config.json
index ac384ce2..35ce8bf8 100644
--- a/src/config/config.json
+++ b/src/config/config.json
@@ -601,6 +601,22 @@
 			"imageType": "svgMono",
 			"embeddable": false,
 			"url": "https://send.libredirect.invalid"
+		},
+		"textStorage": {
+			"frontends": {
+				"privateBin": {
+					"name": "PrivateBin",
+					"instanceList": true
+				}
+			},
+			"targets": ["^https?:\\/{2}paste\\.libredirect\\.invalid"],
+			"name": "Paste Text",
+			"options": {
+				"enabled": true
+			},
+			"imageType": "svgMono",
+			"embeddable": false,
+			"url": "https://paste.libredirect.invalid"
 		}
 	},
 	"blacklist": {
diff --git a/src/instances/get_instances.py b/src/instances/get_instances.py
index 2b154965..5e868257 100755
--- a/src/instances/get_instances.py
+++ b/src/instances/get_instances.py
@@ -466,6 +466,11 @@ def breezeWiki():
                    r"\(\"[^\n\s\r\t\f\v\"]+\" \"https?:\/{2}(?:[^\s\/]+\.)+[a-zA-Z0-9]+(?:\/[^\s\/]+)*\" \"(https?:\/{2}(?:[^\s\/]+\.)+[a-zA-Z0-9]+(?:\/[^\s\/]+)*)\"\)")
 
 
+def privateBin():
+    fetchJsonList('privateBin', 'PrivateBin',
+                  'https://privatebin.info/directory/api?top=100&https_redirect=true&min_rating=A&csp_header=true&min_uptime=100&attachments=true', 'url', False)
+
+
 def peertube():
     try:
         r = requests.get(
@@ -519,6 +524,7 @@ hyperpipe()
 facil()
 simpleertube()
 breezeWiki()
+privateBin()
 mightyList = filterLastSlash(mightyList)
 mightyList = idnaEncode(mightyList)