init-1
This commit is contained in:
parent
47e80fcb88
commit
1116eb4bb9
14499
Acl/backcn-banAD.acl
Normal file
14499
Acl/backcn-banAD.acl
Normal file
File diff suppressed because it is too large
Load Diff
9371
Acl/banAD.acl
Normal file
9371
Acl/banAD.acl
Normal file
File diff suppressed because it is too large
Load Diff
6291
Acl/china_ip_list.txt
Normal file
6291
Acl/china_ip_list.txt
Normal file
File diff suppressed because it is too large
Load Diff
53464
Acl/easylist-banAD.acl
Normal file
53464
Acl/easylist-banAD.acl
Normal file
File diff suppressed because it is too large
Load Diff
6036
Acl/fullgfwlist.acl
Normal file
6036
Acl/fullgfwlist.acl
Normal file
File diff suppressed because it is too large
Load Diff
7595
Acl/gfwlist-banAD.acl
Normal file
7595
Acl/gfwlist-banAD.acl
Normal file
File diff suppressed because it is too large
Load Diff
6810
Acl/gfwlist-user.rule
Normal file
6810
Acl/gfwlist-user.rule
Normal file
File diff suppressed because it is too large
Load Diff
7927
Acl/nobanAD.acl
Normal file
7927
Acl/nobanAD.acl
Normal file
File diff suppressed because it is too large
Load Diff
2076
Acl/onlybanAD.acl
Normal file
2076
Acl/onlybanAD.acl
Normal file
File diff suppressed because it is too large
Load Diff
427
LICENCE
Normal file
427
LICENCE
Normal file
@ -0,0 +1,427 @@
|
||||
Attribution-ShareAlike 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More_considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution-ShareAlike 4.0 International Public
|
||||
License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution-ShareAlike 4.0 International Public License ("Public
|
||||
License"). To the extent this Public License may be interpreted as a
|
||||
contract, You are granted the Licensed Rights in consideration of Your
|
||||
acceptance of these terms and conditions, and the Licensor grants You
|
||||
such rights in consideration of benefits the Licensor receives from
|
||||
making the Licensed Material available under these terms and
|
||||
conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. BY-SA Compatible License means a license listed at
|
||||
creativecommons.org/compatiblelicenses, approved by Creative
|
||||
Commons as essentially the equivalent of this Public License.
|
||||
|
||||
d. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
e. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
f. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
g. License Elements means the license attributes listed in the name
|
||||
of a Creative Commons Public License. The License Elements of this
|
||||
Public License are Attribution and ShareAlike.
|
||||
|
||||
h. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
i. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
j. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
k. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
l. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
m. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. Additional offer from the Licensor -- Adapted Material.
|
||||
Every recipient of Adapted Material from You
|
||||
automatically receives an offer from the Licensor to
|
||||
exercise the Licensed Rights in the Adapted Material
|
||||
under the conditions of the Adapter's License You apply.
|
||||
|
||||
c. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
b. ShareAlike.
|
||||
|
||||
In addition to the conditions in Section 3(a), if You Share
|
||||
Adapted Material You produce, the following conditions also apply.
|
||||
|
||||
1. The Adapter's License You apply must be a Creative Commons
|
||||
license with the same License Elements, this version or
|
||||
later, or a BY-SA Compatible License.
|
||||
|
||||
2. You must include the text of, or the URI or hyperlink to, the
|
||||
Adapter's License You apply. You may satisfy this condition
|
||||
in any reasonable manner based on the medium, means, and
|
||||
context in which You Share Adapted Material.
|
||||
|
||||
3. You may not offer or impose any additional or different terms
|
||||
or conditions on, or apply any Effective Technological
|
||||
Measures to, Adapted Material that restrict exercise of the
|
||||
rights granted under the Adapter's License You apply.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material,
|
||||
|
||||
including for purposes of Section 3(b); and
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public
|
||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||
its public licenses to material it publishes and in those instances
|
||||
will be considered the “Licensor.” The text of the Creative Commons
|
||||
public licenses is dedicated to the public domain under the CC0 Public
|
||||
Domain Dedication. Except for the limited purpose of indicating that
|
||||
material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the
|
||||
public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
141
README.md
141
README.md
@ -1 +1,140 @@
|
||||
-rm
|
||||
# SSR去广告规则/GFWList规则/Clash规则碎片
|
||||
|
||||
* 项目基于CC-BY-SA-4.0协议发布 [![CC-BY-SA-4.0](https://licensebuttons.net/l/by-sa/4.0/88x31.png)](https://creativecommons.org/licenses/by-sa/4.0/deed.zh)
|
||||
* 仅推荐未root的安卓手机使用。
|
||||
* Telegram频道订阅地址:**[https://t.me/ACL4SSR](https://t.me/ACL4SSR)**
|
||||
* [关于中国的互联网](https://github.com/ACL4SSR/ACL4SSR/wiki/关于中国的互联网)
|
||||
|
||||
# 安卓 SSR 去广告ACL规则
|
||||
* 屏蔽小米手机和魅族flyme rom系统广告
|
||||
* 国内网站均直接连接
|
||||
* 屏蔽常用视频网站广告
|
||||
* 屏蔽常用网站广告、其他流媒体网站广告
|
||||
* 屏蔽部分应用程序开屏广告
|
||||
* 屏蔽部分运营商劫持网页弹出的漂浮球广告、流量统计
|
||||
* 拦截常用应用程序的隐私跟踪、行为分析、数据统计
|
||||
|
||||
|
||||
|
||||
# 版本解释
|
||||
|
||||
## SSR直接可用的规则
|
||||
|
||||
文件 | 默认 | 去广告 | 局域网 | 国内IP段 | 国内域名 | 国外
|
||||
---- | ---- | ---- | ---- | ---- | ---- | ----
|
||||
[banAD.acl](https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Acl/banAD.acl) | 代理 | 是 | 直连 | 有-直连 | 常用域名-直连 | 代理-常用国外域名增强
|
||||
[onlybanAD.acl](https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Acl/onlybanAD.acl) | 代理 | 是 | 直连 | 无 | 无 | 代理-常用国外域名增强
|
||||
[nobanAD.acl](https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Acl/nobanAD.acl) | 代理 | 否 | 直连 | 有-直连 | 常用域名-直连 | 全局代理
|
||||
[backcn-banAD.acl](https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Acl/backcn-banAD.acl) | 代理 | 是 | 直连 | 有-代理 | 无 | 直连-gfwlist列表
|
||||
[gfwlist-banAD.acl](https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Acl/gfwlist-banAD.acl) | 直连 | 是 | 直连 | 无 | 无 | 代理-gfwlist列表
|
||||
[fullgfwlist.acl](https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Acl/fullgfwlist.acl ) | 直连 | 否 | 直连 | 无 | 无 | 代理-gfwlist列表
|
||||
[gfwlist-user.rule](https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Acl/gfwlist-user.rule) | 直连 | 是 | 直连 | 无 | 无 | 代理-gfwlist列表
|
||||
|
||||
|
||||
|
||||
## 其他规则转换 clash Quantumul Surge Surfboard Trojan
|
||||
|
||||
前后端都是开源的,自己随便搭建。自建的话,只自建后端已经足够
|
||||
|
||||
前端:[sub-web]( https://github.com/CareyWang/sub-web)
|
||||
|
||||
后端:[subconverter](https://github.com/tindy2013/subconverter/blob/master/README-cn.md)
|
||||
|
||||
**支持类型**
|
||||
|
||||
| 类型 | 作为源类型 | 作为目标类型 | 参数 |
|
||||
| ---------------------------- | :--------: | :----------: | ------------------- |
|
||||
| Clash | ✓ | ✓ | clash |
|
||||
| ClashR | ✓ | ✓ | clashr |
|
||||
| Quantumult (完整配置) | ✓ | ✓ | quan |
|
||||
| Quantumult X (完整配置) | ✓ | ✓ | quanx |
|
||||
| Loon | ✓ | ✓ | loon |
|
||||
| Mellow | ✓ | ✓ | mellow |
|
||||
| SS (SIP002) | ✓ | ✓ | ss |
|
||||
| SS (软件订阅) | ✓ | ✓ | sssub |
|
||||
| SSD | ✓ | ✓ | ssd |
|
||||
| SSR | ✓ | ✓ | ssr |
|
||||
| Surfboard | ✓ | ✓ | surfboard |
|
||||
| Surge 2 | ✓ | ✓ | surge&ver=2 |
|
||||
| Surge 3 | ✓ | ✓ | surge&ver=3 |
|
||||
| Surge 4 | ✓ | ✓ | surge&ver=4 |
|
||||
| Trojan | ✓ | ✓ | trojan |
|
||||
| V2Ray | ✓ | ✓ | v2ray |
|
||||
| 类 TG 代理的 HTTP/Socks 链接 | ✓ | × | 仅支持 `&url=` 调用 |
|
||||
|
||||
|
||||
|
||||
## Clash规则碎片
|
||||
|
||||
主要文件在clash文件夹下,只是一些规则碎片,可以配合一些订阅转换进行使用。
|
||||
|
||||
具体怎么使用需要看对应软件配置是怎么写的,还要请大家阅读你所使用的软件文档,看是否能使用
|
||||
|
||||
示例:项目里/Clash/config/目录下存放的是 [subconverter](https://github.com/tindy2013/subconverter/blob/master/README-cn.md#外部配置)的 配置示例
|
||||
|
||||
| 文件 | 类型 | 解释 |
|
||||
| ---------------------- | -------------------- | ------------------------------------------------------------ |
|
||||
| BanAD.list | 规则碎片-去广告 | 只包含常见广告关键字、广告联盟。无副作用,放心使用 |
|
||||
| BanProgramAD.list | 规则碎片-去广告 | 包含常用应用的各种去广告规则。可能有轻微副作用,可放心使用。(如果网站功能和广告冲突,会删掉去广告规则) |
|
||||
| BanEasyListChina.list | 规则碎片-去广告 | AdblockPlus中的中国所有的屏蔽域名 |
|
||||
| LocalAreaNetwork.list | 规则碎片-直连 | 本地地址和路由器直连域名啥的 |
|
||||
| ChinaDomain.list | 规则碎片-直连 | 国内常见域名、直连CDN等。(很全,常用网址都有) |
|
||||
| ChinaCompanyIp.list | 规则碎片-直连 | 国内BAT公司及云服务厂商的IP段。所有在该云服务上的网站都可以直连。比如你网站在阿里云香港都可以直连。 |
|
||||
| ChinaIp.list | 规则碎片-直连 | IPIP的国内地址段。比GeoIp更好。电脑性能好,可以引入 |
|
||||
| Download.list | 规则碎片-直连 | 一些下载用的域名 |
|
||||
| Apple.list | 规则碎片 | 苹果公司的所有域名 |
|
||||
| Microsoft.list | 规则碎片 | 微软公司的所有域名 |
|
||||
| OneDrive.list | 规则碎片 | OneDrive |
|
||||
| GoogleCN.list | 规则碎片-直连 | 谷歌在中国能直连的网址列表 |
|
||||
| Telegram.list | 规则碎片-代理 | Telegram的所有域名 |
|
||||
| Netflix.list | 规则碎片-代理 | Netflix的所有域名 |
|
||||
| ProxyGFWlist.list | 规则碎片-代理 | GFW的全量列表 |
|
||||
| ProxyLite.list | 规则碎片-代理 | 比较精简的代理列表,包含常用的,以及被污染的域名 |
|
||||
| GeneralClashConfig.yml | clash配置文件 | 放行一堆国内的常用域名,配合系统代理更牛逼。 配置很全,自带中文注释。可以自行使用 |
|
||||
| pref.ini | subconverter配置文件 | 更改了一些基础配置,将规则变成ACL4SSR |
|
||||
|
||||
|
||||
|
||||
# ♻️ SS/SSR ACL Files Download:
|
||||
* ACL更新地址(**白名单**):https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/banAD.acl
|
||||
* ACL更新地址(**黑名单**):https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/gfwlist-banAD.acl
|
||||
* ACL更新地址(**全局**):https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/onlybanAD.acl
|
||||
* ACL更新地址(**仅GFWList**):https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/fullgfwlist.acl (原版SS**能且仅能**使用此规则)
|
||||
* ACL更新地址(**国内代理**):https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/backcn-banAD.acl
|
||||
* ACL更新地址(**白名单,无去广告**):https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/nobanAD.acl
|
||||
* SSR C# GFWList user.rule :https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/gfwlist-user.rule
|
||||
|
||||
|
||||
* SS:https://github.com/shadowsocks
|
||||
* SSR-WIN:https://github.com/shadowsocksr/shadowsocksr-csharp/releases
|
||||
* SSR-安卓:https://github.com/shadowsocksr/shadowsocksr-android/releases
|
||||
|
||||
# ♻️ Surge/Shadowrocket Config File Download:
|
||||
* 请到相关项目页面根据说明配置 https://github.com/lhie1/Rules
|
||||
|
||||
📋 教程 / 说明:
|
||||
* 打开SSR->路由->自定义acl文件->输入下载地址->更新
|
||||
* 再次更新,点击软件页面底部的更新即可
|
||||
|
||||
|
||||
# Root手机推荐:
|
||||
* 1.自带去广告的VIA浏览器 http://www.coolapk.com/apk/mark.via
|
||||
* 2.HOSTS 广告快走中国版 http://www.coolapk.com/apk/mark.via
|
||||
* 3.HOSTS 广告快走开AdAway http://www.coolapk.com/apk/org.adaway
|
||||
* https://github.com/neko-dev/neohosts
|
||||
* Google Hosts 请移步 https://github.com/googlehosts/hosts
|
||||
|
||||
|
||||
# 注:
|
||||
* 参照lhie1大神的surge规则改编,致谢!! https://github.com/lhie1/Surge
|
||||
|
||||
* 浏览器内部广告太多了,单凭几百条规则可能过滤不过来。少许遗漏,请谅解
|
||||
|
||||
* 有问题请发issue,说明状况和所用规则。
|
||||
|
||||
* temp文件夹为历史存档 要找以前的版本可以下那个
|
||||
|
||||
|
||||
# License
|
||||
[![](https://licensebuttons.net/l/by-sa/4.0/88x31.png)](https://creativecommons.org/licenses/by-sa/4.0/deed.zh)
|
||||
* CC-BY-SA-4.0
|
||||
|
209
Tool/New.md
Normal file
209
Tool/New.md
Normal file
@ -0,0 +1,209 @@
|
||||
* https://raw.githubusercontent.com/leosam1995/My_ACL_Rules/master/banAD.acl
|
||||
* @leosam1995
|
||||
# 更新历史:
|
||||
|
||||
# 3.16
|
||||
# 2017年3月16日00:01:08 81
|
||||
去重
|
||||
合并中国IP段
|
||||
完善百度、letv、金立手机
|
||||
添加UC浏览器广告过滤
|
||||
添加墨迹天气,增强sohu、sougou等
|
||||
添加大量广告联盟,屏蔽效果更好
|
||||
添加爱奇艺广告ip段
|
||||
添加起点 掌阅 书旗 app广告
|
||||
|
||||
* 3.08
|
||||
* 2017年3月7日20:34:30 71
|
||||
添加推特 tumblr 增强youtube
|
||||
增强爱奇艺
|
||||
大范围改动 加强 去重
|
||||
|
||||
* 3.03
|
||||
* 2017年3月3日21:06:39 65
|
||||
屏蔽大量广告联盟
|
||||
屏蔽小米MIUI和魅族flyme rom广告
|
||||
|
||||
* 3.02
|
||||
* 2017年3月2日08:27:48 59
|
||||
屏蔽大量广告联盟
|
||||
精简运营商广告
|
||||
|
||||
* 3.01
|
||||
* 2017年3月1日19:57:10 56
|
||||
添加运营商广告
|
||||
修正关键字拦截
|
||||
|
||||
* 2.18
|
||||
* 2017年2月27日15:20:49 02.27
|
||||
日常优化
|
||||
添加直连
|
||||
拆分广告过滤规则,容易维护
|
||||
|
||||
* 2.13
|
||||
* 2017年2月25日20:28:31 02.25
|
||||
日常优化
|
||||
|
||||
* 2.11
|
||||
* 2017年2月23日19:33:13 02.23
|
||||
大范围精简直连列表
|
||||
添加深圳运营商ip
|
||||
|
||||
* 2.09
|
||||
* 017年2月22日17:04:19 02.22
|
||||
添加运营商ip
|
||||
修善百度
|
||||
完善谷歌去广告
|
||||
|
||||
* 2.06
|
||||
* 2017年2月19日08:07:30 02.19
|
||||
去重、排序!
|
||||
改善广告关键词
|
||||
改善ali广告等广告
|
||||
升级优酷广告拦截
|
||||
|
||||
* 2.05 ★★★
|
||||
* 2017年2月18日12:55:42 02.18
|
||||
合并大陆ip地址,缩减近1700条规则
|
||||
删掉MP4吧广告
|
||||
update有道和sohu
|
||||
去重、排序!!!!
|
||||
感谢@nian0114
|
||||
|
||||
* 2.03
|
||||
* 2017年2月17日16:34:01 02.17
|
||||
备注更明确
|
||||
删除重复规则
|
||||
修复高德不能更新问题
|
||||
修复国外域名正则匹配
|
||||
|
||||
* 2.01 ★★★
|
||||
* 2017年2月17日10:40:44 02.17
|
||||
按字母排序
|
||||
大范围完善
|
||||
日常添加修改规则
|
||||
添加几个国内广告商和关键词
|
||||
|
||||
* 1.14
|
||||
* 2017年2月15日19:45:36 02.15
|
||||
修复MytvSUPER & Netflix 和line软件
|
||||
添加喜马拉雅电台过滤
|
||||
添加部分规则
|
||||
|
||||
* 1.13
|
||||
* 2017年2月15日13:13:20 02.15
|
||||
删除部分第三方规则
|
||||
添加广告关键词
|
||||
修复正则的\-问题
|
||||
|
||||
* 1.11
|
||||
* 2017年2月14日12:00:06 02.14
|
||||
添加直连关键词
|
||||
修补规则
|
||||
解决google play无法更新问题 (^|\.)gvt1\.com$
|
||||
|
||||
* 1.08
|
||||
* 2017年2月11日18:23:46 02.11
|
||||
添加芒果TV、风行、搜狐、qq、酷狗、酷我、京东广告过滤规则
|
||||
添加大量第三方广告拦截规则
|
||||
添加运营商广告
|
||||
删除Weifeng广告和apple直连站点--苹果的 安卓不用
|
||||
几乎重写规则 无重复规则
|
||||
|
||||
* 1.07
|
||||
* 2017年2月11日09:49:47 02.11
|
||||
添加广告拦截关键词
|
||||
添加直连关键词
|
||||
添加直连域名
|
||||
|
||||
* 1.06
|
||||
* 2017年2月7日15:39:05 02.7
|
||||
增加几个广告域名拦截关键字:admob qtmojo trace traffic
|
||||
增加几个直连网站域名关键词
|
||||
国外知名域名后缀直连:us tw jp等
|
||||
增加国外软件关键字 全部代理
|
||||
删除几个受影响的广告拦截网站
|
||||
|
||||
* 1.04 ★★
|
||||
* 2017年2月5日15:12:56 02.05
|
||||
精简[proxy_list]列表
|
||||
删除* Top blocked sites列表 加快匹配速 [正则语法.conf](正则语法.conf) 度
|
||||
|
||||
* 1.03
|
||||
* 2017年2月5日10:00:51 02.05
|
||||
将视频APP拦截规则分开 更清晰
|
||||
合并爱奇艺 优酷土豆 乐视TV 搜狐 PPTV 6.cn 视频app规则
|
||||
|
||||
* 1.02 ★★★
|
||||
* 2017年2月4日23:21:17 02.04
|
||||
重要更新:(总体来说加快正则匹配速度) [正则语法.conf](正则语法.conf)
|
||||
合并百度 网易 淘宝 的广告屏蔽
|
||||
|
||||
* 1.01 重大更新★★★
|
||||
* 2017年2月4日14:17:50 02.04
|
||||
重要更新:(总体来说加快正则匹配速度)
|
||||
改写正则匹配规则,减少回溯,效率提高很多!!!!
|
||||
合并新浪 QQ 网页的广告屏蔽
|
||||
添加酷安直连
|
||||
|
||||
* 0.25
|
||||
* 2017年2月3日11:48:59 02.03
|
||||
把AD规则进行去重 排序优化
|
||||
添加直连:唯品会 一号店 内涵段子 糗事百科
|
||||
精简 美图 Apple直连列表
|
||||
删除PlayStation Store广告和直连 安卓又不用 加他干啥呢
|
||||
删除*MytvSUPER & Netflix直连 安卓不用
|
||||
删除v2ex amazon代理里面的重复冲突
|
||||
|
||||
* 0.24
|
||||
* 2017年2月2日11:56:31 02.02
|
||||
把greasyfork.org填加到直连列表(via浏览器
|
||||
|
||||
* 0.23
|
||||
* 2017年1月31日20:39:12
|
||||
添加几个直连网站
|
||||
添加拦截联通运营商广告
|
||||
将美国.us域名加入代理并前置
|
||||
将中国3个特有域名加入直连:.中国.公司.网络 滑稽。。并无卵用
|
||||
|
||||
* 0.22
|
||||
* 2017年1月30日18:16:28
|
||||
删减一些规则
|
||||
将禁止访问列表移动到前面 方便编辑
|
||||
|
||||
* 0.21
|
||||
* 2017年1月30日17:49:46
|
||||
添加迅雷看看
|
||||
|
||||
* 0.20
|
||||
* 2017年1月29日14:11:36
|
||||
添加国内直播、新闻、小说、文库等网站直连 大约20个
|
||||
|
||||
* 0.19
|
||||
* 2017年1月29日12:59:43
|
||||
去重、排序!!!!
|
||||
添加org.cn、net.cn域名后缀直连
|
||||
|
||||
* 0.18
|
||||
* 2017年1月28日21:00:34
|
||||
设置gov.cn、edu.cn和.cn域名直连
|
||||
添加拦截常用应用程序的隐私跟踪
|
||||
处理广告关键字:如有误伤,请见谅!
|
||||
如surge的DOMAIN-KEYWORD,admarvel,REJECT改成^(.*\.)?.*admarvel.*\..*$
|
||||
|
||||
* 0.17
|
||||
* 2017年1月28日14:07:15
|
||||
去除Apple Mac规则 完善部分apple域名(安卓要啥苹果 滑稽)
|
||||
添加淘宝CDN 天猫 直连
|
||||
尝试修复本地localhost直连
|
||||
调整国内ip地址位置
|
||||
解决IT之家网页字体变小问题
|
||||
|
||||
* 0.16
|
||||
* 2017年1月28日14:03:25
|
||||
更新优酷、爱奇艺
|
||||
更新完善 [运营商] 广告
|
||||
|
||||
* 0.16以前
|
||||
* 2017年1月28日以前
|
||||
各种添加规则。。。。。
|
1
Tool/SwitchyOmega/OmegaOptions.bak
Normal file
1
Tool/SwitchyOmega/OmegaOptions.bak
Normal file
File diff suppressed because one or more lines are too long
2
Tool/SwitchyOmega/Proxy SwitchyOmega - Chrome 网上应用店.url
Normal file
2
Tool/SwitchyOmega/Proxy SwitchyOmega - Chrome 网上应用店.url
Normal file
@ -0,0 +1,2 @@
|
||||
[InternetShortcut]
|
||||
URL=https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif
|
BIN
Tool/SwitchyOmega/Proxy-SwitchyOmega_v2.5.20.crx
Normal file
BIN
Tool/SwitchyOmega/Proxy-SwitchyOmega_v2.5.20.crx
Normal file
Binary file not shown.
BIN
Tool/SwitchyOmega/proxy_switchyomega-2.5.20-an fx.xpi
Normal file
BIN
Tool/SwitchyOmega/proxy_switchyomega-2.5.20-an fx.xpi
Normal file
Binary file not shown.
4
Tool/SwitchyOmega/规则列表设置.txt
Normal file
4
Tool/SwitchyOmega/规则列表设置.txt
Normal file
@ -0,0 +1,4 @@
|
||||
规则列表格式:AutoProxy
|
||||
规则列表网址(新):https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt
|
||||
规则列表网址(旧):https://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt
|
||||
|
144
Tool/正则语法.conf
Normal file
144
Tool/正则语法.conf
Normal file
@ -0,0 +1,144 @@
|
||||
^ 匹配字符串的开始
|
||||
$ 匹配字符串的结束
|
||||
. 匹配除换行符以外的任意字符
|
||||
\w 匹配字母或数字或下划线或汉字
|
||||
\s 匹配任意的空白符
|
||||
\d 匹配数字
|
||||
\b 匹配单词的开始或结束
|
||||
|
||||
* 重复零次或更多次
|
||||
+ 重复一次或更多次
|
||||
? 重复零次或一次
|
||||
{n} 重复n次
|
||||
{n,} 重复n次或更多次
|
||||
{n,m} 重复n到m次
|
||||
|
||||
懒惰限定符
|
||||
*? 重复任意次,但尽可能少重复
|
||||
+? 重复1次或更多次,但尽可能少重复
|
||||
?? 重复0次或1次,但尽可能少重复
|
||||
{n,m}? 重复n到m次,但尽可能少重复
|
||||
{n,}? 重复n次以上,但尽可能少重复
|
||||
|
||||
\W 匹配任意不是字母,数字,下划线,汉字的字符
|
||||
\S 匹配任意不是空白符的字符
|
||||
\D 匹配任意非数字的字符
|
||||
\B 匹配不是单词开头或结束的位置
|
||||
[^x] 匹配除了x以外的任意字符
|
||||
[^aeiou] 匹配除了aeiou这几个字母以外的任意字符
|
||||
|
||||
常用分组语法
|
||||
捕获
|
||||
(exp) 匹配exp,并捕获文本到自动命名的组里
|
||||
(?<name>exp) 匹配exp,并捕获文本到名称为name的组里,也可以写成(?'name'exp)
|
||||
(?:exp) 匹配exp,不捕获匹配的文本,也不给此分组分配组号
|
||||
零宽断言
|
||||
(?=exp) 匹配exp前面的位置
|
||||
(?<=exp) 匹配exp后面的位置
|
||||
(?!exp) 匹配后面跟的不是exp的位置
|
||||
(?<!exp) 匹配前面不是exp的位置
|
||||
注释
|
||||
(?#comment) 这种类型的分组不对正则表达式的处理产生任何影响,用于提供注释让人阅读
|
||||
|
||||
- 不用\-
|
||||
|
||||
去掉*的注释
|
||||
^(?!\s*\*/)\s*\*[^\r]*
|
||||
|
||||
去掉//单行注释
|
||||
(?<!:)//.*
|
||||
(?<!http:)//.*
|
||||
//(?!www)[^\n]*
|
||||
|
||||
去掉/**/的注释
|
||||
/\*[^*]+\*/
|
||||
|
||||
去掉所有//和#的注释
|
||||
(?<!:)(//|\#).*
|
||||
|
||||
去掉空行
|
||||
\n\r
|
||||
|
||||
格式调整去除前面的空格用:
|
||||
^\s*
|
||||
|
||||
匹配带有某个词的行
|
||||
.*keyword.*
|
||||
|
||||
网址域名带有某个关键词的
|
||||
(^|\.)\w*keyword\w*\.\w*$
|
||||
|
||||
简单的IP地址匹配
|
||||
(\d{1,3}\.){3}\d{1,3}
|
||||
|
||||
其他
|
||||
一、校验数字的表达式
|
||||
1 数字:^[0-9]*$
|
||||
2 n位的数字:^\d{n}$
|
||||
3 至少n位的数字:^\d{n,}$
|
||||
4 m-n位的数字:^\d{m,n}$
|
||||
5 零和非零开头的数字:^(0|[1-9][0-9]*)$
|
||||
6 非零开头的最多带两位小数的数字:^([1-9][0-9]*)+(.[0-9]{1,2})?$
|
||||
7 带1-2位小数的正数或负数:^(\-)?\d+(\.\d{1,2})?$
|
||||
8 正数、负数、和小数:^(\-|\+)?\d+(\.\d+)?$
|
||||
9 有两位小数的正实数:^[0-9]+(.[0-9]{2})?$
|
||||
10 有1~3位小数的正实数:^[0-9]+(.[0-9]{1,3})?$
|
||||
11 非零的正整数:^[1-9]\d*$ 或 ^([1-9][0-9]*){1,3}$ 或 ^\+?[1-9][0-9]*$
|
||||
12 非零的负整数:^\-[1-9][]0-9"*$ 或 ^-[1-9]\d*$
|
||||
13 非负整数:^\d+$ 或 ^[1-9]\d*|0$
|
||||
14 非正整数:^-[1-9]\d*|0$ 或 ^((-\d+)|(0+))$
|
||||
15 非负浮点数:^\d+(\.\d+)?$ 或 ^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$
|
||||
16 非正浮点数:^((-\d+(\.\d+)?)|(0+(\.0+)?))$ 或 ^(-([1-9]\d*\.\d*|0\.\d*[1-9]\d*))|0?\.0+|0$
|
||||
17 正浮点数:^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$ 或 ^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$
|
||||
18 负浮点数:^-([1-9]\d*\.\d*|0\.\d*[1-9]\d*)$ 或 ^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$
|
||||
19 浮点数:^(-?\d+)(\.\d+)?$ 或 ^-?([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$
|
||||
|
||||
二、校验字符的表达式
|
||||
1 汉字:^[\u4e00-\u9fa5]{0,}$
|
||||
2 英文和数字:^[A-Za-z0-9]+$ 或 ^[A-Za-z0-9]{4,40}$
|
||||
3 长度为3-20的所有字符:^.{3,20}$
|
||||
4 由26个英文字母组成的字符串:^[A-Za-z]+$
|
||||
5 由26个大写英文字母组成的字符串:^[A-Z]+$
|
||||
6 由26个小写英文字母组成的字符串:^[a-z]+$
|
||||
7 由数字和26个英文字母组成的字符串:^[A-Za-z0-9]+$
|
||||
8 由数字、26个英文字母或者下划线组成的字符串:^\w+$ 或 ^\w{3,20}$
|
||||
9 中文、英文、数字包括下划线:^[\u4E00-\u9FA5A-Za-z0-9_]+$
|
||||
10 中文、英文、数字但不包括下划线等符号:^[\u4E00-\u9FA5A-Za-z0-9]+$ 或 ^[\u4E00-\u9FA5A-Za-z0-9]{2,20}$
|
||||
11 可以输入含有^%&',;=?$\"等字符:[^%&',;=?$\x22]+
|
||||
12 禁止输入含有~的字符:[^~\x22]+
|
||||
|
||||
三、特殊需求表达式
|
||||
1 Email地址:^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$
|
||||
2 域名:[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(/.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+/.?
|
||||
3 InternetURL:[a-zA-z]+://[^\s]* 或 ^http://([\w-]+\.)+[\w-]+(/[\w-./?%&=]*)?$
|
||||
4 手机号码:^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$
|
||||
5 电话号码("XXX-XXXXXXX"、"XXXX-XXXXXXXX"、"XXX-XXXXXXX"、"XXX-XXXXXXXX"、"XXXXXXX"和"XXXXXXXX):^(\(\d{3,4}-)|\d{3.4}-)?\d{7,8}$
|
||||
6 国内电话号码(0511-4405222、021-87888822):\d{3}-\d{8}|\d{4}-\d{7}
|
||||
7 身份证号(15位、18位数字):^\d{15}|\d{18}$
|
||||
8 短身份证号码(数字、字母x结尾):^([0-9]){7,18}(x|X)?$ 或 ^\d{8,18}|[0-9x]{8,18}|[0-9X]{8,18}?$
|
||||
9 帐号是否合法(字母开头,允许5-16字节,允许字母数字下划线):^[a-zA-Z][a-zA-Z0-9_]{4,15}$
|
||||
10 密码(以字母开头,长度在6~18之间,只能包含字母、数字和下划线):^[a-zA-Z]\w{5,17}$
|
||||
11 强密码(必须包含大小写字母和数字的组合,不能使用特殊字符,长度在8-10之间):^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,10}$
|
||||
12 日期格式:^\d{4}-\d{1,2}-\d{1,2}
|
||||
13 一年的12个月(01~09和1~12):^(0?[1-9]|1[0-2])$
|
||||
14 一个月的31天(01~09和1~31):^((0?[1-9])|((1|2)[0-9])|30|31)$
|
||||
15 钱的输入格式:
|
||||
16 1.有四种钱的表示形式我们可以接受:"10000.00" 和 "10,000.00", 和没有 "分" 的 "10000" 和 "10,000":^[1-9][0-9]*$
|
||||
17 2.这表示任意一个不以0开头的数字,但是,这也意味着一个字符"0"不通过,所以我们采用下面的形式:^(0|[1-9][0-9]*)$
|
||||
18 3.一个0或者一个不以0开头的数字.我们还可以允许开头有一个负号:^(0|-?[1-9][0-9]*)$
|
||||
19 4.这表示一个0或者一个可能为负的开头不为0的数字.让用户以0开头好了.把负号的也去掉,因为钱总不能是负的吧.下面我们要加的是说明可能的小数部分:^[0-9]+(.[0-9]+)?$
|
||||
20 5.必须说明的是,小数点后面至少应该有1位数,所以"10."是不通过的,但是 "10" 和 "10.2" 是通过的:^[0-9]+(.[0-9]{2})?$
|
||||
21 6.这样我们规定小数点后面必须有两位,如果你认为太苛刻了,可以这样:^[0-9]+(.[0-9]{1,2})?$
|
||||
22 7.这样就允许用户只写一位小数.下面我们该考虑数字中的逗号了,我们可以这样:^[0-9]{1,3}(,[0-9]{3})*(.[0-9]{1,2})?$
|
||||
23 8.1到3个数字,后面跟着任意个 逗号+3个数字,逗号成为可选,而不是必须:^([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(.[0-9]{1,2})?$
|
||||
24 备注:这就是最终结果了,别忘了"+"可以用"*"替代如果你觉得空字符串也可以接受的话(奇怪,为什么?)最后,别忘了在用函数时去掉去掉那个反斜杠,一般的错误都在这里
|
||||
25 xml文件:^([a-zA-Z]+-?)+[a-zA-Z0-9]+\\.[x|X][m|M][l|L]$
|
||||
26 中文字符的正则表达式:[\u4e00-\u9fa5]
|
||||
27 双字节字符:[^\x00-\xff] (包括汉字在内,可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1))
|
||||
28 空白行的正则表达式:\n\s*\r (可以用来删除空白行)
|
||||
29 HTML标记的正则表达式:<(\S*?)[^>]*>.*?</\1>|<.*? /> (网上流传的版本太糟糕,上面这个也仅仅能部分,对于复杂的嵌套标记依旧无能为力)
|
||||
30 首尾空白字符的正则表达式:^\s*|\s*$或(^\s*)|(\s*$) (可以用来删除行首行尾的空白字符(包括空格、制表符、换页符等等),非常有用的表达式)
|
||||
31 腾讯QQ号:[1-9][0-9]{4,} (腾讯QQ号从10000开始)
|
||||
32 中国邮政编码:[1-9]\d{5}(?!\d) (中国邮政编码为6位数字)
|
||||
33 IP地址:\d+\.\d+\.\d+\.\d+ (提取IP地址时有用)
|
||||
34 IP地址:((?:(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d))
|
Loading…
Reference in New Issue
Block a user