forked from bigbigbigboss/v2ray.fun-2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
YLWS-4617
committed
Oct 26, 2017
1 parent
e236949
commit 75563cb
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#! /usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import os | ||
import json | ||
import readjson | ||
import writejson | ||
|
||
rules = readjson.ConfRouting[u"settings"][u"rules"] | ||
|
||
if rules[0][u"outboundTag"] == "direct": | ||
if_open_ad_function = "广告拦截功能: 未开启" | ||
else: | ||
if_open_ad_function = "广告拦截功能: 开启" | ||
|
||
print("") | ||
print(if_open_ad_function) | ||
|
||
print("") | ||
print("1. 开启") | ||
print("2. 关闭") | ||
|
||
choice = raw_input("请选择: ") | ||
|
||
if choice == "1": | ||
writejson.WriteAD("on") | ||
else: | ||
writejson.WriteAD("off") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters