Skip to content

Instantly share code, notes, and snippets.

Avatar

Émilien Devos unixfox

View GitHub Profile
@unixfox
unixfox / README.md
Last active Jan 8, 2023
nats jetstream cluster
View README.md

NATS JetStream Playground

Playground for a Secure, Highly Available NATS Cluster with message persistence (using JetStream).

This repo contains a cluster with 3 nodes and a Go client sending/receiving messages to it.

Pre-requisites

To use this repo, please install:

  • Docker
  • mkcert (zero-config tool for locally-trusted development certificates)
@unixfox
unixfox / docker-compose.yml
Last active Jan 8, 2023
example mysql innodb cluster docker
View docker-compose.yml
version: '3'
services:
mysql-server-1:
hostname: mysql-server-1
env_file:
- mysql-server.env
image: mysql/mysql-server:8.0.31
volumes:
- ./data-server1:/var/lib/mysql
ports:
@unixfox
unixfox / loki-config.yaml
Created Dec 21, 2022
loki example config
View loki-config.yaml
auth_enabled: false
server:
http_listen_port: 3100
grpc_listen_port: 9096
common:
path_prefix: /data/loki
ingester:
@unixfox
unixfox / README.md
Created Oct 9, 2022
dnscrypt-proxy get sdns
View README.md

dnscrypt-proxy -list-all -json -config /etc/dnscrypt-proxy/dnscrypt-proxy.toml

@unixfox
unixfox / README.md
Last active Aug 24, 2022
Findings about youtube googlevideo.com IP restriction
View README.md
  • you can load the same googlevideo.com URL without any redirect on the same /48 IPv6 subnet
  • as long as it's still the same ISP you can load the same googlevideo.com URL but you will get a strange redirect with content-type plain/text with the new URL to use
  • on youtube.com any change in the IP address that doesn't concern the two first points will trigger a request to the player endpoint for new video streams
@unixfox
unixfox / README.md
Last active Nov 11, 2022
Different ways to get json output from Google servers API
View README.md
  • When async something is in the URL, add/modify async=_fmt:json.
  • You can try the query string alt=json for some APIs like the youtube one
  • You can also try the query string fmt=json
  • For some API, get the JSON result by modifying the client name used. Example:

    So, short version: curl "https://www.google.com/complete/search?client=qsb-android-asbl-pb&q=" -H "user-agent: Mozilla/5.0 AppleWebKit/537.36 GSA/10.77.9.21.x86" -output trend.proto It seems that it combines geoIP with the field &hl= in order to decide which trends to show, and perhaps also gl= It allows for three different clients in order to get json, ajax-json or protobuffer. Respectively, qsb-android, qsb-android-asbl and qsb-android-asbl-pb

@unixfox
unixfox / README.md
Last active Aug 6, 2022
Dirty script for checking the hash of a youtube video stream in 320P
View README.md
  1. install nodejs
  2. install the library got: npm install got
  3. launch the script with bash execute.sh

I replicated the issue on a Digitalocean droplet in UK location with IPv6 disabled and the DNS server set to 8.8.8.8 if one wants to have an environment to the one that I used.

@unixfox
unixfox / basicinfo.txt
Created Aug 6, 2022
Replicable issue with The Following content is not available on this app.
View basicinfo.txt
visitorData: CgtVLWpkSnB1dTdPayjwnbuXBg%3D%3D
streamURL: https://rr3---sn-aigzrn7s.googlevideo.com/videoplayback?expire=1659839312&ei=8M7uYtHXNZidWrXQtugK&ip=165.227.236.94&id=o-AJ43cP7fGscgQ0nVqp_PviKPrcV6qAXmyR4rhgGuyUmQ&itag=18&source=youtube&requiressl=yes&mh=T2&mm=31%2C29&mn=sn-aigzrn7s%2Csn-5hne6nzy&ms=au%2Crdu&mv=m&mvi=3&pl=22&initcwndbps=161250&vprv=1&mime=video%2Fmp4&gir=yes&clen=4181171&ratebypass=yes&dur=300.071&lmt=1659132959131645&mt=1659816789&fvip=5&fexp=24001373%2C24007246&c=ANDROID&rbqsm=fr&txp=5438434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRAIgbVOJmUzeQXFhEFQ2_vCGGOqwAg3dI0wUntOmXCIsWtcCICUv7kNK7OOuUdChRg88XLdXFHIvd_yZfROkNDiwtd15&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgB-waQ9nxwf7mmKixKc2RtjW_UwanxvMdWsooXQKxXrACIQDUiOTUavdjOSE8P109joAPCMtNwvoGpSiYViL2NJNtew%3D%3D
sha256: 18ee5921d02af80021114e85605533760df978ca638c810b8b228753556f37fd
dns ip of youtube server used: 142.25
View update-aur-pkg.md
  1. Update the PKGBUILD
  2. makepkg --printsrcinfo > .SRCINFO
  3. git add PKGBUILD .SRCINFO
  4. git commit
  5. git push
@unixfox
unixfox / route48.conf
Created May 18, 2022
route48 example wireproxy
View route48.conf
[Interface]
PrivateKey = xxx
Address = 2axxx/128
[Peer]
PublicKey = xxxx
AllowedIPs = ::/1, 8000::/1
Endpoint = 185.107.82.73:51868
PersistentKeepalive = 25