zws-im / zws Goto Github PK
View Code? Open in Web Editor NEWShorten URLs using invisible spaces
Home Page: https://zws.im
License: Apache License 2.0
Shorten URLs using invisible spaces
Home Page: https://zws.im
License: Apache License 2.0
TLDR; your link shortner is heavily abused. Please a take care of the abuse.
Several people including me have tried reaching out to you due to abuse of your link shortner but have yet to receive any kind of reply. The url i provided in my email has successfully been blocked but the volume of urls i have every day makes email reports very impractical.
I'd be happy if you are willing to discuss a more direct or even automated way of reporting the urls to you in the near future.
Hi, can you please make guide how to host this on qovery.com?
When you send a message on iMessage (tested on latest iOS beta version as of writing) the URL https://zws.im
will be sent correctly but is displayed as a rich message and the two slashes (which include the zero-width characters) are displayed as the body of the message.
This is probably a long-shot ask as I have no idea how easy/difficult this would be to implement:
Could we get access to some method of using ZWS on our own domain, without self-hosting the whole database/web server?
I suggest using combining diacritical marks to shorten URLs.
https://unicode-table.com/en/blocks/combining-diacritical-marks/
since you still have an extra slash at the end, it's 1-width. the first slash combined with an arbitrary number of combining diacritics is true zero-width (they're just tall when pró́́́́́́́́́́́́́́perly rendered).
test: https://zws.im/̀̀̀̀̀̀̀̀̀̀̀̀.
Also, these (basic 112) combining diacritics are below u07ff which is the upper limit of a 2-byte UTF-8 sequence. when converted to equivalent ASCII URL, it's %xx%xx each instead of %xx%xx%xx each because all "zero-width" named chars are all above u2000. (compression rate of 1/72, haha)
I want use your service for posting magnet:
links to torrent on Discord. Since Discord don't allowing creating links from magnet protocol, using https instead would be only solution. However it may require to follow ratelimits if there any.
P.S. another idea for not filling regular database pool is allowing using names (optional) along with url, e.g. in my case using name magnet
→ https://zws.im/magnet/
will use it's own pool of urls, but it also may be something else, like youtube
, game
, movie
or even smaller category JohnURLs
, SpiderMan
, ...
Although there is a partial web manifest file, in order to meet the criteria to be an installable PWA there needs to be a registered service worker that handles the fetch
event.
Shortening URLs isn't possible when offline (unless we directly interface with the Firestore API), but we can still cache the rest of the page's content.
docker-compose can't execute:
The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for volumes: 'db'
Unsupported config option for services: 'db'
Docker version 20.10.8, build 3967b7d
docker-compose version 1.25.0, build unknown
5.8.0-1038-oracle #39~20.04.1-Ubuntu SMP Mon Aug 2 13:33:34 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Cannot find preset's package (@pizzafox)
Possibly make a railway template, https://railway.app you can make it a template here https://railway.app/button
Because there isn't any write lock on the short ID count, if two URLs are shortened at the same time it could cause the value to be set to an incorrect number.
This is probably a Telegram issue but just wanted to let you know.
There’s nothing wrong with the procedure, but I’d like to ask a question:
If I leave "SHORT_CHARS" configuration blank , my Self-hosting works result will be like this :
{
"short": "iBeXr",
"url": "https://weeqeqewx.herokuapp.com/iBeXr"
}
That’s not how I wanted it to be.It not contains zero-width space.
But I don't know how to fill in this configuration, What’s the format?
Please give some advice ! Thank you !
hey pls check out my GitHub to find more of these urls: https://github.com/API-Aries/url-blacklist-safe-url-checker-endpoint/blob/main/url-blacklist/list
Which invisible spaces using zws
Short IDs are generated partially using Node.js's Math.random()
. This means that—although unlikely—the same short ID could be generated twice. This would cause users to be sent to the incorrect URL when they're redirected.
There should be a better system in place to generate short IDs to prevent this.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
pg
, @types/pg
)@nestjs/common
, @nestjs/core
, @nestjs/platform-express
, @nestjs/swagger
)@tsconfig/bun
, @tsconfig/strictest
, typescript
)@types/react
, @types/react-dom
, react
, react-dom
)package.json
drizzle-kit 0.20.17
envalid 8.0.0
pg 8.11.3
pino 8.21.0
pino-pretty 10.3.1
@biomejs/biome 1.7.1
@types/pg 8.11.4
prettier 3.2.5
prettier-plugin-packagejson 2.5.0
prettier-plugin-tailwindcss 0.5.14
turbo 1.13.3
vercel 33.7.1
.github/workflows/ci.yml
actions/checkout v4
actions/setup-node v4
oven-sh/setup-bun v1
actions/cache v4
.node-version
node 20
apps/api/package.json
@anatine/zod-nestjs 2.0.8
@anatine/zod-openapi 2.2.5
@jonahsnider/util 10.3.0
@nestjs/common 10.3.5
@nestjs/core 10.3.5
@nestjs/platform-express 10.3.5
@nestjs/swagger 7.3.0
@ntegral/nestjs-sentry 4.0.1
@sentry/bun 7.107.0
cors 2.8.5
devalue 4.3.2
drizzle-orm 0.30.2
envalid 8.0.0
googleapis 134.0.0
ioredis 5.3.2
ky 1.2.2
next-api-utils 1.1.0
pg 8.11.3
reflect-metadata 0.2.1
rxjs 7.8.1
superjson 2.2.1
zod 3.22.4
@nestjs/cli ^10.0.0
@nestjs/schematics ^10.0.0
@tsconfig/bun 1.0.4
@tsconfig/strictest 2.0.3
@types/cors 2.8.17
@types/express ^4.17.17
type-fest 4.14.0
typescript 5.4.2
apps/web/package.json
@heroicons/react 2.1.3
@highlight-run/next 7.4.8
@jonahsnider/util 10.3.0
@tanstack/react-query 5.28.9
@types/node 20.8.7
@types/react 18.2.72
@types/react-dom 18.2.22
@vercel/analytics 1.2.2
apexcharts 3.48.0
autoprefixer 10.4.19
clsx 2.1.0
convert 5.0.0
dotenv 16.4.5
framer-motion 10.18.0
millify 6.1.0
next 14.1.4
next-api-utils 1.0.2
next-plausible 3.12.0
postcss 8.4.38
react 18.2.0
react-apexcharts 1.4.1
react-dom 18.2.0
swagger-ui-react 5.12.3
tailwindcss 3.4.1
typescript 5.4.3
@types/swagger-ui-react 4.18.3
@vercel/edge 1.1.1
node 20.x
I would like to make life easier for ZWS maintainers by implementing Uffizzi preview environments.
Disclaimer: I work on Uffizzi.
Uffizzi is a Open Source full stack previews engine and our platform is available completely free for ZWS (and all open source projects). This will provide maintainers with preview environments of their PRs in the cloud, allowing them iterate faster and reduce time to merge. You can see the open source repos which are currently using Uffizzi over here
Uffizzi is purpose-built for the task of previewing PRs and it integrates with your workflow to deploy preview environments in the background without any manual steps for maintainers or contributors.
I can go ahead and create an Initial PoC for you right away if you think there is value in this proposal.
TODO:
Use optional bearer authentication to restrict access to POST /
.
Hello,
I was looking through the source code trying to understand how the url is encoded in the unicode zero width space character aka U+200B.
I got to this file (https://github.com/zws-im/zws/blob/main/apps/api/src/urls/urls.service.ts) but that file doesn't seem to mention or reference said unicode character? Please can someone help me understand this?
I apologize in advance if posting this here isn't the most convenient.
Thanks
How can I host this on pterodactyl container?
I have tried with nodejs egg, but when I start it, the app is not listening on the server's PORT, just one is listening 127.0.0.1:Server port, the other is on 0.0.0.0:3000, I have server port in .env as PORT=
Does pterodactyl egg exist for hosting this easily?
I recently tried to use docker-compose to test with the ZWS API and eventually host it on my own website.
However, the API Container keeps restarting in an attempt of finding PostgreSQL:
[debug] [config] characters { characters: [ 'a', 'b', 'c' ], length: 12, rewrites: { d: 'a', e: 'b', f: 'c' } }
[debug] [config] env Prod
[info] [config] Using API key to restrict access to routes
[info] [http] Listening at http://0.0.0.0:3000
[info] [db] Starting a postgresql pool with 13 connections.
[info] [db] Encountered error during initialization:
[warn] [db] Prisma.LogEvent.target was undefined
[error] [db]
Can't reach database server at `localhost`:`5432`
Please make sure your database server is running at `localhost`:`5432`.
[fatal] [db] Failed to connect to database Can't reach database server at `localhost`:`5432`
Please make sure your database server is running at `localhost`:`5432`.
Please make sure your database server is running at `localhost`:`5432`.
at LineStream.<anonymous> (node_modules/@prisma/client/runtime/index.js:29704:31)
at LineStream.emit (node:events:394:28)
at LineStream.emit (node:domain:475:12)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at LineStream.Readable.push (node:internal/streams/readable:228:10)
at LineStream._pushBuffer (node_modules/@prisma/client/runtime/index.js:26457:19)
at LineStream._transform (node_modules/@prisma/client/runtime/index.js:26451:10)
at LineStream.Transform._write (node:internal/streams/transform:184:23)
at writeOrBuffer (node:internal/streams/writable:389:12)
The docker-compose.yml
was not changed, the port 5432
is exposed. Changes to it publishing the port and opening it in the firewall would reveal that i am able to connect to the PostgreSQL Database. This suggests that PostgreSQL is working as intended, while the API is not able to connect to it on localhost.
I already checked the firewall for localhost loopbacks to be accepted, as well of attempting it among different systems. I would either require to point the API towards an openly exposed PostgreSQL Database in the internet or making use of the docker-machine ip which not survives a restart of the server or container. Both not really feels intended.
At the other side i don't have enough experience with Docker to say if that is a "bug" or if i just oversee some Basic Docker 101 here that prevents the containers from communicating to each other despite sharing the same network inside docker.
Please create docker image for aarch64 architecture.
For now I see
api_1 | standard_init_linux.go:228: exec user process caused: exec format error
api_1 | standard_init_linux.go:228: exec user process caused: exec format error
api_1 | standard_init_linux.go:228: exec user process caused: exec format error
api_1 | standard_init_linux.go:228: exec user process caused: exec format error
api_1 | standard_init_linux.go:228: exec user process caused: exec format error
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.