Skip to content

Instantly share code, notes, and snippets.

View amirarsalan's full-sized avatar

Amir Arsalan amirarsalan

  • Tehran, Iran
View GitHub Profile
@amirarsalan
amirarsalan / 01nginx-tls-sni.md
Created September 30, 2020 08:18 — forked from kekru/01nginx-tls-sni.md
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.

prerequisites

  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    ...
    TLS SNI support enabled
@amirarsalan
amirarsalan / mysql_table_stats.json
Created January 15, 2019 22:33 — forked from sougou/mysql_table_stats.json
Prometheus and Grafa files used in Percona presentation
{
"__inputs": [
{
"name": "DS_VITESS",
"label": "vitess",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
### Keybase proof
I hereby claim:
* I am amirarsalan on github.
* I am amirarsalan (https://keybase.io/amirarsalan) on keybase.
* I have a public key ASB4CHszjnS7yeNsRww3eltFm4aUk_mCgygGb_l8CtaoqAo
To claim this, I am signing this object:
@amirarsalan
amirarsalan / sslocal.service
Created October 16, 2016 14:58 — forked from ygmpkk/sslocal.service
ShadowSocks Client Systemd Service
[Unit]
Description=Daemon to start Shadowsocks Client
Wants=network-online.target
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/sslocal -c /etc/shadowsocks/client.json --pid-file /var/run/sslocal.pid --log-file /var/log/sslocal.log
[Install]