Skip to content

Instantly share code, notes, and snippets.

@sanyarnd
sanyarnd / README.md
Last active April 20, 2026 19:13
MikroTik dynamic domain-based routing to containers (Mihomo + ByeDPI)

MikroTik dynamic domain-based routing to containers (Mihomo + ByeDPI)

Route selected domains via containers using DNS-populated address lists and policy routing. LAN keeps normal WAN; chosen domains go either to ByeDPI (DPI-bypass) or Mihomo (VPN).

Based on the article by @wiktorbgu at Habr.

How it works

  • Router DNS resolves domains and fills address-lists (to-dpi, to-mihomo).
@mashintsev
mashintsev / config.toml
Created February 20, 2025 11:30
Nexus proxy repository for Cargo/Rust
# Create Nexus Proxy Reposity with Remote Storage = https://index.crates.io
# .cargo/config.toml should be placed accoding docs https://doc.rust-lang.org/cargo/reference/config.html
[registries.nexus]
index = "sparse+https://nexus.app/repository/cargo/"
[registry]
default = "nexus"
[source.crates-io]
@gilangvperdana
gilangvperdana / README.md
Last active February 26, 2026 22:56
Install GeoIP for Nginx

General

  • If you want to see your client website region, you can install GeoIP module on Nginx
  • The project I've worked on, using (Filebeat, Logstash, Elasticsearch) after GeoIP is installed then visualized using Kibana or Grafana : image

Installation

sudo apt update
sudo apt install libnginx-mod-http-geoip
@mer30hamid
mer30hamid / config.json
Created April 21, 2023 07:36
XRAY config + load balancer + warp + block iranian hosts - you can add outbounds that have tag that begins with "proxy" (eg "proxy1", "proxy2" ...) then all requests to paths that ends with /loadbalance will go through them.
{
"log" : {
"access" : "XRAY_ACCESS_LOGPATH",
"error" : "XRAY_ERROR_LOGPATH",
"loglevel" : "XRAY_LOG_LEVEL"
},
"dns" : {
"servers" : [ "https+local://8.8.8.8/dns-query" ]
},
"inbounds" : [
@zpoint
zpoint / v2ray_wireguard_netflix_spotify_hulu.md
Last active February 3, 2026 19:35
v2ray + wireguard to unblock gfw and netflix,spotify,hulu

I previously write a gist about how to set up v2ray + openvpn to unblock gfw and netflix

Refers to that gist for more detail.

In short, this a solution to proxy your network to bypass Firewall with stable connections, and also unblock Proxy detection for Netflix/Spotify/etc....

In my use case from China network:

wireguard

@hamid-rostami
hamid-rostami / README.md
Last active January 15, 2026 13:36
wireguard over TCP

To pass wireguard's traffic through a TCP tunnel by using udp2raw

Requirements

For Arch linux, install udp2raw by pacman: pacman -S udp2raw

For Debian or Ubuntu, you can use a binary release from: https://github.com/wangyu-/udp2raw/releases

@nginx-gists
nginx-gists / dns_filtering.conf
Last active February 12, 2026 22:12
Using NGINX as a DoT or DoH Gateway
stream {
# Key-value store for blocking domains (NGINX Plus only)
keyval_zone zone=dns_config:64k state=/etc/nginx/zones/dns_config.zone;
keyval $dns_qname $scrub_action zone=dns_config;
keyval "blocked_domains" $blocked_domains zone=dns_config;
keyval "blackhole_domains" $blackhole_domains zone=dns_config;
# The DNS response packet; if we're scrubbing the domain, this gets set
js_set $dns_response dns.get_response;
@srmagura
srmagura / .editorconfig
Last active October 16, 2023 15:20
.editorconfig with StyleCop and SonarLint rule customizations
[*.cs]
csharp_style_var_for_built_in_types=true:silent
csharp_style_var_when_type_is_apparent=true:silent
csharp_style_var_elsewhere=true:silent
##
## StyleCop.Analyzers
##
# Using directive should appear within a namespace declaration
@srmagura
srmagura / .editorconfig
Last active May 24, 2025 10:57
.editorconfig with some StyleCop rules disabled
[*.cs]
csharp_style_var_for_built_in_types=true:silent
csharp_style_var_when_type_is_apparent=true:silent
csharp_style_var_elsewhere=true:silent
##
## StyleCop.Analyzers
##
# Using directive should appear within a namespace declaration
@manoj-choudhari-git
manoj-choudhari-git / CampContextFactory.cs
Created June 18, 2021 10:13
.NET Core - Entity Framework Core - IDesignTimeDbContextFactory Implementation
public class CampContextFactory : IDesignTimeDbContextFactory
{
public CampContext CreateDbContext(string[] args)
{
var configuration = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json")
.Build();
var dbContextBuilder = new DbContextOptionsBuilder();