https://github.com/7x11x13/cookie-relay
Relay browser cookies to a remote server
https://github.com/7x11x13/cookie-relay
Last synced: 20 days ago
JSON representation
Relay browser cookies to a remote server
- Host: GitHub
- URL: https://github.com/7x11x13/cookie-relay
- Owner: 7x11x13
- Created: 2024-07-17T20:33:54.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-09-05T15:40:28.000Z (9 months ago)
- Last Synced: 2024-10-09T17:43:00.778Z (8 months ago)
- Language: TypeScript
- Homepage:
- Size: 437 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cookie-relay
This is a browser extension and server which I use to store and distribute up-to-date login cookies necessary for some of my projects.
Currently supports retrieving cookies and user IDs from YouTube, Bandcamp, and SoundCloud.## Setup
1. Download the extension [here](https://github.com/7x11x13/cookie-relay/releases) and install it in your browser(s). Since the extension is unsigned (for now) you must follow some extra steps:
1. For Firefox, you must be running Firefox Developer Edition or Nightly and set `xpinstall.signatures.required` to `false`.
2. For Chrome, you must go to `chrome://extensions` and enable Developer mode.
2. Run the cookie-relay server so that it is accessible from your browser(s) which you installed the extension in. It must be accessible via HTTPS. See the example docker-compose file below for how I do this with Tailscale.
3. Configure the browser extension settings so that the API url points to the cookie-relay server, and the API key matches the API key used by the server.## Example `docker-compose.yaml` for cookie-relay-server using Tailscale
See this guide: https://tailscale.com/blog/docker-tailscale-guide
- Replace `` with a random string of characters. This is the API key you will set the browser extension to use.
```yaml
name: cookie-relayvolumes:
tailscale-data-proxy:
redis_data:services:
ts-proxy:
image: tailscale/tailscale:latest
hostname: cookie-relay
environment:
- TS_AUTHKEY=tskey-client-secretkeysdfsdfsdfds?ephemeral=false
- TS_EXTRA_ARGS=--advertise-tags=tag:container
- TS_STATE_DIR=/var/lib/tailscale
- TS_SERVE_CONFIG=/config/cookie-relay.json
volumes:
- tailscale-data-proxy:/var/lib/tailscale
- ./cookie-relay/config:/config
devices:
- /dev/net/tun:/dev/net/tun
cap_add:
- net_admin
- sys_module
restart: unless-stopped
redis:
image: redis/redis-stack:latest
restart: unless-stopped
environment:
- REDIS_ARGS=--appendonly yes --save 60 1
volumes:
- redis_data:/data
server:
image: ghcr.io/7x11x13/cookie-relay-server:latest
restart: unless-stopped
network_mode: service:ts-proxy
environment:
- ENV=PRODUCTION
- REDIS_URL=redis://redis:6379
- APIKEY=
depends_on:
- redis
- ts-proxy
```
`cookie-relay.json`:
```json
{
"TCP": {
"443": {
"HTTPS": true
}
},
"Web": {
"${TS_CERT_DOMAIN}:443": {
"Handlers": {
"/": {
"Proxy": "http://127.0.0.1:80"
}
}
}
},
"AllowFunnel": {
"${TS_CERT_DOMAIN}:443": false
}
}
```