wantguns / bin Goto Github PK
View Code? Open in Web Editor NEWhighly opinionated, minimal pastebin
Home Page: https://basedbin.fly.dev
License: GNU Lesser General Public License v3.0
highly opinionated, minimal pastebin
Home Page: https://basedbin.fly.dev
License: GNU Lesser General Public License v3.0
How does this compare to https://github.com/matze/wastebin ?
Hi,
I just installed this Bin via docker and I just love the functionality and gui. Is it possible to add some form of authentication? I want to run this exposed to the internet, but since my server is at home I don't want anyone to be able to paste and share. My ideal use case is: I want to share a piece of text picture, so I open my URL, put in a password, and get a sharing link. The receiver of the share link should be able to access it without a password.
That makes me unable to use authentication via nginx or similar since you would also need a pw just to open the link.
Thanks you!
When I do a paste, and want to select the file type, the ordering of the list is not intuitive: the first 10 entries or so are a mystery to me, then the rest looks like it's sorted by the extension, but that extension is never shown.
So we end up looking for a bash highlighting near the "B", but no, it's near the "S" words, between SCSS and... "Highlight non-printable".
I would suggest to either:
Also, not related but nice-to-have, applying the selected highlight to the current text would be, well, nice.
Hi,
I am using portainer and pulled the latest bin. I must say that I am pretty new to docker, so it might just be me: I can't get the exchange of the placeholder to work.
Out of desperation (I really don't know what I am doing), I tried adding the --client-desc
flag and put another env-variable without the bin_
prefix:
Still the greeting page is unchanged.
Any help would be appreciated.
(also: your docker compose example show port 6163 instead of 6162)
Hello, I have a problem.
I want to get use the API to get some data I uploaded inside JavaScript but the problem is that there's no 'Access-Control-Allow-Origin' header and my browser will throw an error.
We should provide a Last-Modified
header which pulls its value from the paste file modification time (for pastes) or from the binary's compilation date (for CSS, JS, etc). This would allow CDN caches to revalidate simply by checking the Last-Modified
date without actually transferring the body of the paste - especially good for images or large files accessed periodically.
Alternately we could provide an Etag
header pulling from the current Git commit hash for CSS and JS, and from a cryptographic digest of the paste file for pastes.
Hi,
Yesterday I sent a diff paste to a friend, with syntax highlighting; the url was something like example.com/p/SF37PK.diff . However he wanted to download the raw text, and found no obvious way of doing that...
After a while he found out that the raw version can be accessed by stripping the file extension from the URL link.
Would it be possible to add a simple "Raw" button, that links to the same URL without the extension? It looks quite straightforward.
This looks nice.
A couple of questions (or requests if not presently possible).
Not deployed yet as the dark mode is a big issue for me (as visually handicapped).
Thanks.
Most of the JS/CSS assume bin is hosted on the root of the hostname. Probably not a priority for this project but would be nice if we could host it on any path.
Hi,
Would it be possible to enhance the web client to support the key 'tab' to indent code?
At the time of writing, it selects the adress bar on my browser.
I want to host the bin from myurl.com/bin
, and am using caddy as a reverse proxy. The upload page loads fine while the html is fine, the js and css are requested from /assets/...
instead of /bin/assets/...
, but the upload form (and all other links) route as if /
was the webroot. This breaks the website unless hosted on a different domain (bin.myurl.com
) or on a different port.
Hi !
I see there is new release v2.3.0 since August 18th; however I can't see any binary attached to this release, only the source code.
Would it be possible to attach them please? I'm mainly interested in the aarch64 build.
And thanks for the great work!
Currently, the paste content, as well as JS and CSS content, isn't sent along with a Cache-Control
header; ideally, we should provide the following:
max-age=[large number]
to make sure clients don't have to constantly re-request pastes, CSS, and JS, which change never or rarely. Perhaps a value of 1 week or so, 604800s.stale-while-revalidate=[smaller number]
to allow clients to re-use cached, stale content until they can revalidate that it hasn't changed. Perhaps a value of 1 day or so, 86400s.Additionally, only for raw pastes, we should include the immutable
directive so that browsers do not attempt to refresh the contents of the pastes, which are immutable and don't change.
hi it would be really nice if there was an env variable like UPLOAD_LENGTH=6
so that we could modify how random we want our strings to be. the default 6 is quite low and its possible to guess them if an attacker cared enough, which 99.9999% of the time they wont be.
additionally a range would be even better, being able to specify an upper and lower bound so it generates random strings between x and y length
thank you for this awesome tool! for anybody who wants it, here are my traefik rules which just slap an auth on pretty much anything that isn't the pastes
- "traefik.http.routers.pastebin-public.rule=Host(`bin.example.com`) && (PathPrefix(`/p/`) || PathPrefix(`/static/`))"
- 'traefik.http.routers.pastebin-public.rule=Host(`bin.example.com`) && PathRegexp(`/[\w.-]+\.\w+$`)'
- "traefik.http.routers.pastebin-public.entrypoints=websecure"
- "traefik.http.routers.pastebin-public.service=pastebin-public"
- "traefik.http.services.pastebin-public.loadbalancer.server.port=6163"
- "traefik.http.routers.pastebin-private.rule=Host(`bin.example.com`)"
- "traefik.http.routers.pastebin-private.entrypoints=websecure"
- "traefik.http.routers.pastebin-private.service=pastebin-private"
- "traefik.http.services.pastebin-private.loadbalancer.server.port=6163"
- "traefik.http.routers.pastebin-private.middlewares=authentik@file"
I've been using bin
as a personal imgur replacement, so I'm uploading mostly images and videos. It works great in a desktop browser, but I haven't figured out how to upload from my (Android) phone, because the mobile browsers I use don't support copy/paste for media files. Would it be possible to have some sort of upload mechanism for mobile?
Since this project has been quite handy for me recently, I thought I would share the iOS shortcut that I've created. It's very basic but does the job!
https://www.icloud.com/shortcuts/42f6c06955404f69a7ebe0aabcfbd72a
i cant use arm64 image on my rpi:
The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
there is no arm64 image on docker hub, both images labeled as amd64
Hi, I would like to see support for Open Graph and twitter meta tags to display binary files such as images inside an embed. Is it possible?
https://metatags.io/
Hello,
I just installed bin and I like it so far :D. I noticed an incoherence : the man-like page tells that you can download the client at /client
, but I get the message Unable to find entity 'client'
(try https://basedbin.fly.dev/client).
I installed bin with docker(-compose).
For now I just copied/pasted the client in the upload directory.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.