Skip to content

Commit

Permalink
Update Makefile to check if 127.0.0.1 is in config.js before creating…
Browse files Browse the repository at this point in the history
… a zip file
  • Loading branch information
zhuzhuor committed Jun 29, 2022
1 parent 91d0a4c commit 974a729
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
*.log

.idea/
.vscode/
node_modules/
crx/
package-lock.json
crx/
dist/
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
ZIP_FILENAME = ../ubuku_crx.zip
ZIP_FILENAME = unblock_youku_crx.zip
INCLUDED_FILES = manifest.json chrome shared _locales COPYING.txt
EXCLUDED_FILES = _locales/backup*

GREP_RESULT = $(shell grep --quiet "127\.0\.0\.1" chrome/config.js; echo $$?)

.PHONY: zip
zip:
ifeq ($(GREP_RESULT), 0)
@echo "Remove 127.0.0.1 from chrome/config.js and try again"
else
rm -rf $(ZIP_FILENAME)
zip -9 -r $(ZIP_FILENAME) $(INCLUDED_FILES) -x=$(EXCLUDED_FILES)
endif
10 changes: 0 additions & 10 deletions chrome/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,8 @@ unblock_youku.default_proxy_server_addr = 'secure.uku.im:8443';
unblock_youku.backup_proxy_server_proc = 'HTTPS';
unblock_youku.backup_proxy_server_addr = 'secure.uku.im:993';

// === For debug - start ===
/*
unblock_youku.default_proxy_server_proc = 'SOCKS5';
unblock_youku.default_proxy_server_addr = '127.0.0.1:1086';
unblock_youku.backup_proxy_server_proc = 'SOCKS5';
unblock_youku.backup_proxy_server_addr = '127.0.0.1:1086';
*/
// == For debug - end ===

// only for redirect mode
unblock_youku.default_redirect_server = 'www.yōukù.com/proxy';
// unblock_youku.default_redirect_server = '127.0.0.1:8888/proxy';
unblock_youku.backup_redirect_server = 'bak.yōukù.com/proxy';

unblock_youku.ip_addr = new_random_ip();
Expand Down

0 comments on commit 974a729

Please sign in to comment.