Add default config

This commit is contained in:
Jason Lee
2016-11-15 22:24:01 +08:00
parent ee1a8d6eed
commit 219e60f0af
4 changed files with 41 additions and 3 deletions

2
.gitignore vendored
View File

@@ -18,9 +18,11 @@ _cgo_gotypes.go
_cgo_export.*
_testmain.go
*.user.conf
*.exe
*.test
*.prof
*.zip
flora-kit
.DS_Store

View File

@@ -1,7 +1,9 @@
install:
@go get
build:
@go build main.go
@go build -ldflags "-s -w"
build_windows:
GOOS=windows go build -ldflags "-s -w"
run:
@go run main.go
test:

34
flora.default.conf Normal file
View File

@@ -0,0 +1,34 @@
[General]
loglevel = notify
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
# dns-server = 119.29.29.29,223.5.5.5,114.114.115.115
# external-controller-access = PASSWORD@0.0.0.0:6155
# ipv6 = true
[Proxy]
DIRECT = direct
# Proxy = shadowsocks, server-ip, port, method, password
# [SSID Setting]
# WiFi-SSID-NAME suspend=true
[URL Rewrite]
# 302 REDIRECT
[Rule]
// BLOCK ADS
# DOMAIN-SUFFIX,mgid.com,REJECT
// DIRECT RULES
# DOMAIN-SUFFIX,cn,DIRECT
// NORMAL RULES
# DOMAIN-KEYWORD,instagram,Proxy
# DOMAIN-SUFFIX,youtube.com,Proxy
# China IP use DIRECT
GEOIP,CN,DIRECT
# Other
FINAL,Proxy

View File

@@ -43,8 +43,8 @@ var ProxyServers struct {
}
func init() {
var configFilename = "/Users/jason/Dropbox/Surge/Default.conf"
var userConfigFilename = "/Users/jason/Dropbox/Surge/User.conf"
var configFilename = "./flora.default.conf"
var userConfigFilename = "./flora.user.conf"
var iniOpts = ini.LoadOptions{
AllowBooleanKeys: true,
Loose: true,