Skip to content

Commit 1fc2d2e

Browse files
output date time in log, add .pac file for google search
1 parent 0e35921 commit 1fc2d2e

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.log

‎mproxy.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#define LOG(fmt...) __android_log_print(ANDROID_LOG_DEBUG,__FILE__,##fmt)
4444

4545
#else
46-
#define LOG(fmt...) fprintf(stderr, ##fmt);
46+
#define LOG(fmt...) do { fprintf(stderr,"%s %s ",__DATE__,__TIME__); fprintf(stderr, ##fmt); } while(0)
4747
#endif
4848

4949

‎mproxy.pac‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
function FindProxyForURL(url, host) {
2+
if (shExpMatch(url,"*.google.com/*")) {
3+
return "PROXY localhost:8081";
4+
}
5+
6+
if (shExpMatch(url,"*.google.com.hk/*")) {
7+
return "PROXY localhost:8081";
8+
}
9+
10+
return "DIRECT; PROXY localhost:8081";
11+
}

0 commit comments

Comments
 (0)