Skip to content

Instantly share code, notes, and snippets.

@techotaku
Created January 8, 2018 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techotaku/d0914847fc7e0076b7935cd9760f938a to your computer and use it in GitHub Desktop.
Save techotaku/d0914847fc7e0076b7935cd9760f938a to your computer and use it in GitHub Desktop.
Init script for google-https-dns in LEDE
#!/bin/sh /etc/rc.common
#
# Copyright (C) 2017 Ian Li <OpenSource@ianli.xyz>
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
START=75
USE_PROCD=1
start_service() {
mkdir /var/log/v2ray > /dev/null 2>&1
procd_open_instance
procd_set_param respawn
procd_set_param command /usr/bin/google-https-dns -T -U -l :5300 --eip 172.217.27.142 -p "socks://127.0.0.1:1080" -e "`ifstatus wan | grep \"address\" | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.'`0/24" --logtostderr
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param pidfile /var/run/google-https-dns.pid
procd_close_instance
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment