OSDN Git Service

luci: disable css minify by default
[immortalwrt/luci.git] / applications / luci-app-unblockneteasemusic / root / usr / share / unblockneteasemusic / rules / chain.uc
1 {%
2
3 let http_port = o_http_port;
4 let https_port = o_https_port;
5 let pub_access = o_pub_access;
6 let hijack_ways = o_hijack_ways;
7
8 %}
9
10 {% if (pub_access == 1): %}
11 chain input_wan {
12         tcp dport {{ http_port }} counter accept comment "!fw4: unblockneteasemusic-http-pub-access"
13         tcp dport {{ https_port }} counter accept comment "!fw4: unblockneteasemusic-https-pub-access"
14 }
15 {% endif %}
16
17 {% if (hijack_ways == "use_ipset"): %}
18 chain netease_cloud_music {
19         type nat hook prerouting priority -1; policy accept;
20         meta l4proto tcp ip daddr @neteasemusic jump netease_cloud_music_redir;
21 }
22
23 chain netease_cloud_music_redir {
24         ip daddr @local_addr return;
25         ip saddr @acl_neteasemusic_http accept;
26         ip saddr @acl_neteasemusic_https accept;
27         tcp dport 80 counter redirect to :{{ http_port }};
28         tcp dport 443 counter redirect to :{{ https_port }};
29 }
30 {% endif %}