Skip to content

Instantly share code, notes, and snippets.

@AndersonIncorp
AndersonIncorp / redis_lua_smembers_hgetall_list.lua
Created September 10, 2023 20:58
lua script to get members of set then return hash for each key
https://gist.github.com/luke/dbca647bf07d1843ab47
local members = redis.call('SMEMBERS', KEYS[1])
local results = {}
for index, key in ipairs(members) do
results[index] = redis.call('HGETALL', KEYS[1] .. '/' .. key)
end
return results
1
@AndersonIncorp
AndersonIncorp / wireguard-mikrotik-torrent-proxy.md
Created December 30, 2023 14:25
Proxy torrent traffic via home router, hides and encrypts torrent traffic to dedicated server running torrent client.

Overview

  • Home MikroTik router
    • Static IP: 203.0.113.2
  • Dedicated server
    • Static IP: 203.0.113.1

51413 home router port will be forwarded to/from dedicated server via wireguard interface, this allows server to download torrents without exposing it's IP or hosting provider knowing about it.