[
  {
    "path": ".github/ISSUE_TEMPLATE/--bug.md",
    "content": "---\nname: 反馈BUG\nabout: 让脚本更好用一点！\ntitle: \"[XXX.sh] 一句话说明情况\"\nlabels: ''\nassignees: ''\n\n---\n\n### 脚本名称\n<!-- 如：xxx.sh -->\n\n### 问题描述\n<!-- 对问题的清晰简洁描述。 -->\n\n### 重现步骤\n<!-- 问题重现完整步骤，如:\n1. 运行...\n2. 输入...\n3. ...\n4. 显示错误 -->\n\n### 预期行为\n<!-- 清晰简洁的描述你期往发生的事情。 -->\n\n### 报错内容\n<!-- 如果有报错内容，请贴出报错内容或截图。 -->\n\n### 设备信息\n<!-- 如果你出现问题的是 服务器，那么请提供相关详细信息，包括但不限于：\n - 服务器的服务商（如：阿里云/微软云 等）\n - 系统名称即具体版本（如：Cenos 7、Debian 9.4、Ubuntu18.04 等）\n - 系统位数（如：x86_x64、i386 等） -->\n\n<!-- 如果你出现问题的是 本地设备，那么请提供相关详细信息，包括但不限于：\n - 系统类型（如：Windows、Android、IOS 等）\n - 系统位数（如：32位、64位） -->\n"
  },
  {
    "path": "CNAME",
    "content": "shell.xiu2.xyz"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\r\n                       Version 3, 29 June 2007\r\n\r\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\r\n Everyone is permitted to copy and distribute verbatim copies\r\n of this license document, but changing it is not allowed.\r\n\r\n                            Preamble\r\n\r\n  The GNU General Public License is a free, copyleft license for\r\nsoftware and other kinds of works.\r\n\r\n  The licenses for most software and other practical works are designed\r\nto take away your freedom to share and change the works.  By contrast,\r\nthe GNU General Public License is intended to guarantee your freedom to\r\nshare and change all versions of a program--to make sure it remains free\r\nsoftware for all its users.  We, the Free Software Foundation, use the\r\nGNU General Public License for most of our software; it applies also to\r\nany other work released this way by its authors.  You can apply it to\r\nyour programs, too.\r\n\r\n  When we speak of free software, we are referring to freedom, not\r\nprice.  Our General Public Licenses are designed to make sure that you\r\nhave the freedom to distribute copies of free software (and charge for\r\nthem if you wish), that you receive source code or can get it if you\r\nwant it, that you can change the software or use pieces of it in new\r\nfree programs, and that you know you can do these things.\r\n\r\n  To protect your rights, we need to prevent others from denying you\r\nthese rights or asking you to surrender the rights.  Therefore, you have\r\ncertain responsibilities if you distribute copies of the software, or if\r\nyou modify it: responsibilities to respect the freedom of others.\r\n\r\n  For example, if you distribute copies of such a program, whether\r\ngratis or for a fee, you must pass on to the recipients the same\r\nfreedoms that you received.  You must make sure that they, too, receive\r\nor can get the source code.  And you must show them these terms so they\r\nknow their rights.\r\n\r\n  Developers that use the GNU GPL protect your rights with two steps:\r\n(1) assert copyright on the software, and (2) offer you this License\r\ngiving you legal permission to copy, distribute and/or modify it.\r\n\r\n  For the developers' and authors' protection, the GPL clearly explains\r\nthat there is no warranty for this free software.  For both users' and\r\nauthors' sake, the GPL requires that modified versions be marked as\r\nchanged, so that their problems will not be attributed erroneously to\r\nauthors of previous versions.\r\n\r\n  Some devices are designed to deny users access to install or run\r\nmodified versions of the software inside them, although the manufacturer\r\ncan do so.  This is fundamentally incompatible with the aim of\r\nprotecting users' freedom to change the software.  The systematic\r\npattern of such abuse occurs in the area of products for individuals to\r\nuse, which is precisely where it is most unacceptable.  Therefore, we\r\nhave designed this version of the GPL to prohibit the practice for those\r\nproducts.  If such problems arise substantially in other domains, we\r\nstand ready to extend this provision to those domains in future versions\r\nof the GPL, as needed to protect the freedom of users.\r\n\r\n  Finally, every program is threatened constantly by software patents.\r\nStates should not allow patents to restrict development and use of\r\nsoftware on general-purpose computers, but in those that do, we wish to\r\navoid the special danger that patents applied to a free program could\r\nmake it effectively proprietary.  To prevent this, the GPL assures that\r\npatents cannot be used to render the program non-free.\r\n\r\n  The precise terms and conditions for copying, distribution and\r\nmodification follow.\r\n\r\n                       TERMS AND CONDITIONS\r\n\r\n  0. Definitions.\r\n\r\n  \"This License\" refers to version 3 of the GNU General Public License.\r\n\r\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\r\nworks, such as semiconductor masks.\r\n\r\n  \"The Program\" refers to any copyrightable work licensed under this\r\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\r\n\"recipients\" may be individuals or organizations.\r\n\r\n  To \"modify\" a work means to copy from or adapt all or part of the work\r\nin a fashion requiring copyright permission, other than the making of an\r\nexact copy.  The resulting work is called a \"modified version\" of the\r\nearlier work or a work \"based on\" the earlier work.\r\n\r\n  A \"covered work\" means either the unmodified Program or a work based\r\non the Program.\r\n\r\n  To \"propagate\" a work means to do anything with it that, without\r\npermission, would make you directly or secondarily liable for\r\ninfringement under applicable copyright law, except executing it on a\r\ncomputer or modifying a private copy.  Propagation includes copying,\r\ndistribution (with or without modification), making available to the\r\npublic, and in some countries other activities as well.\r\n\r\n  To \"convey\" a work means any kind of propagation that enables other\r\nparties to make or receive copies.  Mere interaction with a user through\r\na computer network, with no transfer of a copy, is not conveying.\r\n\r\n  An interactive user interface displays \"Appropriate Legal Notices\"\r\nto the extent that it includes a convenient and prominently visible\r\nfeature that (1) displays an appropriate copyright notice, and (2)\r\ntells the user that there is no warranty for the work (except to the\r\nextent that warranties are provided), that licensees may convey the\r\nwork under this License, and how to view a copy of this License.  If\r\nthe interface presents a list of user commands or options, such as a\r\nmenu, a prominent item in the list meets this criterion.\r\n\r\n  1. Source Code.\r\n\r\n  The \"source code\" for a work means the preferred form of the work\r\nfor making modifications to it.  \"Object code\" means any non-source\r\nform of a work.\r\n\r\n  A \"Standard Interface\" means an interface that either is an official\r\nstandard defined by a recognized standards body, or, in the case of\r\ninterfaces specified for a particular programming language, one that\r\nis widely used among developers working in that language.\r\n\r\n  The \"System Libraries\" of an executable work include anything, other\r\nthan the work as a whole, that (a) is included in the normal form of\r\npackaging a Major Component, but which is not part of that Major\r\nComponent, and (b) serves only to enable use of the work with that\r\nMajor Component, or to implement a Standard Interface for which an\r\nimplementation is available to the public in source code form.  A\r\n\"Major Component\", in this context, means a major essential component\r\n(kernel, window system, and so on) of the specific operating system\r\n(if any) on which the executable work runs, or a compiler used to\r\nproduce the work, or an object code interpreter used to run it.\r\n\r\n  The \"Corresponding Source\" for a work in object code form means all\r\nthe source code needed to generate, install, and (for an executable\r\nwork) run the object code and to modify the work, including scripts to\r\ncontrol those activities.  However, it does not include the work's\r\nSystem Libraries, or general-purpose tools or generally available free\r\nprograms which are used unmodified in performing those activities but\r\nwhich are not part of the work.  For example, Corresponding Source\r\nincludes interface definition files associated with source files for\r\nthe work, and the source code for shared libraries and dynamically\r\nlinked subprograms that the work is specifically designed to require,\r\nsuch as by intimate data communication or control flow between those\r\nsubprograms and other parts of the work.\r\n\r\n  The Corresponding Source need not include anything that users\r\ncan regenerate automatically from other parts of the Corresponding\r\nSource.\r\n\r\n  The Corresponding Source for a work in source code form is that\r\nsame work.\r\n\r\n  2. Basic Permissions.\r\n\r\n  All rights granted under this License are granted for the term of\r\ncopyright on the Program, and are irrevocable provided the stated\r\nconditions are met.  This License explicitly affirms your unlimited\r\npermission to run the unmodified Program.  The output from running a\r\ncovered work is covered by this License only if the output, given its\r\ncontent, constitutes a covered work.  This License acknowledges your\r\nrights of fair use or other equivalent, as provided by copyright law.\r\n\r\n  You may make, run and propagate covered works that you do not\r\nconvey, without conditions so long as your license otherwise remains\r\nin force.  You may convey covered works to others for the sole purpose\r\nof having them make modifications exclusively for you, or provide you\r\nwith facilities for running those works, provided that you comply with\r\nthe terms of this License in conveying all material for which you do\r\nnot control copyright.  Those thus making or running the covered works\r\nfor you must do so exclusively on your behalf, under your direction\r\nand control, on terms that prohibit them from making any copies of\r\nyour copyrighted material outside their relationship with you.\r\n\r\n  Conveying under any other circumstances is permitted solely under\r\nthe conditions stated below.  Sublicensing is not allowed; section 10\r\nmakes it unnecessary.\r\n\r\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\r\n\r\n  No covered work shall be deemed part of an effective technological\r\nmeasure under any applicable law fulfilling obligations under article\r\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\r\nsimilar laws prohibiting or restricting circumvention of such\r\nmeasures.\r\n\r\n  When you convey a covered work, you waive any legal power to forbid\r\ncircumvention of technological measures to the extent such circumvention\r\nis effected by exercising rights under this License with respect to\r\nthe covered work, and you disclaim any intention to limit operation or\r\nmodification of the work as a means of enforcing, against the work's\r\nusers, your or third parties' legal rights to forbid circumvention of\r\ntechnological measures.\r\n\r\n  4. Conveying Verbatim Copies.\r\n\r\n  You may convey verbatim copies of the Program's source code as you\r\nreceive it, in any medium, provided that you conspicuously and\r\nappropriately publish on each copy an appropriate copyright notice;\r\nkeep intact all notices stating that this License and any\r\nnon-permissive terms added in accord with section 7 apply to the code;\r\nkeep intact all notices of the absence of any warranty; and give all\r\nrecipients a copy of this License along with the Program.\r\n\r\n  You may charge any price or no price for each copy that you convey,\r\nand you may offer support or warranty protection for a fee.\r\n\r\n  5. Conveying Modified Source Versions.\r\n\r\n  You may convey a work based on the Program, or the modifications to\r\nproduce it from the Program, in the form of source code under the\r\nterms of section 4, provided that you also meet all of these conditions:\r\n\r\n    a) The work must carry prominent notices stating that you modified\r\n    it, and giving a relevant date.\r\n\r\n    b) The work must carry prominent notices stating that it is\r\n    released under this License and any conditions added under section\r\n    7.  This requirement modifies the requirement in section 4 to\r\n    \"keep intact all notices\".\r\n\r\n    c) You must license the entire work, as a whole, under this\r\n    License to anyone who comes into possession of a copy.  This\r\n    License will therefore apply, along with any applicable section 7\r\n    additional terms, to the whole of the work, and all its parts,\r\n    regardless of how they are packaged.  This License gives no\r\n    permission to license the work in any other way, but it does not\r\n    invalidate such permission if you have separately received it.\r\n\r\n    d) If the work has interactive user interfaces, each must display\r\n    Appropriate Legal Notices; however, if the Program has interactive\r\n    interfaces that do not display Appropriate Legal Notices, your\r\n    work need not make them do so.\r\n\r\n  A compilation of a covered work with other separate and independent\r\nworks, which are not by their nature extensions of the covered work,\r\nand which are not combined with it such as to form a larger program,\r\nin or on a volume of a storage or distribution medium, is called an\r\n\"aggregate\" if the compilation and its resulting copyright are not\r\nused to limit the access or legal rights of the compilation's users\r\nbeyond what the individual works permit.  Inclusion of a covered work\r\nin an aggregate does not cause this License to apply to the other\r\nparts of the aggregate.\r\n\r\n  6. Conveying Non-Source Forms.\r\n\r\n  You may convey a covered work in object code form under the terms\r\nof sections 4 and 5, provided that you also convey the\r\nmachine-readable Corresponding Source under the terms of this License,\r\nin one of these ways:\r\n\r\n    a) Convey the object code in, or embodied in, a physical product\r\n    (including a physical distribution medium), accompanied by the\r\n    Corresponding Source fixed on a durable physical medium\r\n    customarily used for software interchange.\r\n\r\n    b) Convey the object code in, or embodied in, a physical product\r\n    (including a physical distribution medium), accompanied by a\r\n    written offer, valid for at least three years and valid for as\r\n    long as you offer spare parts or customer support for that product\r\n    model, to give anyone who possesses the object code either (1) a\r\n    copy of the Corresponding Source for all the software in the\r\n    product that is covered by this License, on a durable physical\r\n    medium customarily used for software interchange, for a price no\r\n    more than your reasonable cost of physically performing this\r\n    conveying of source, or (2) access to copy the\r\n    Corresponding Source from a network server at no charge.\r\n\r\n    c) Convey individual copies of the object code with a copy of the\r\n    written offer to provide the Corresponding Source.  This\r\n    alternative is allowed only occasionally and noncommercially, and\r\n    only if you received the object code with such an offer, in accord\r\n    with subsection 6b.\r\n\r\n    d) Convey the object code by offering access from a designated\r\n    place (gratis or for a charge), and offer equivalent access to the\r\n    Corresponding Source in the same way through the same place at no\r\n    further charge.  You need not require recipients to copy the\r\n    Corresponding Source along with the object code.  If the place to\r\n    copy the object code is a network server, the Corresponding Source\r\n    may be on a different server (operated by you or a third party)\r\n    that supports equivalent copying facilities, provided you maintain\r\n    clear directions next to the object code saying where to find the\r\n    Corresponding Source.  Regardless of what server hosts the\r\n    Corresponding Source, you remain obligated to ensure that it is\r\n    available for as long as needed to satisfy these requirements.\r\n\r\n    e) Convey the object code using peer-to-peer transmission, provided\r\n    you inform other peers where the object code and Corresponding\r\n    Source of the work are being offered to the general public at no\r\n    charge under subsection 6d.\r\n\r\n  A separable portion of the object code, whose source code is excluded\r\nfrom the Corresponding Source as a System Library, need not be\r\nincluded in conveying the object code work.\r\n\r\n  A \"User Product\" is either (1) a \"consumer product\", which means any\r\ntangible personal property which is normally used for personal, family,\r\nor household purposes, or (2) anything designed or sold for incorporation\r\ninto a dwelling.  In determining whether a product is a consumer product,\r\ndoubtful cases shall be resolved in favor of coverage.  For a particular\r\nproduct received by a particular user, \"normally used\" refers to a\r\ntypical or common use of that class of product, regardless of the status\r\nof the particular user or of the way in which the particular user\r\nactually uses, or expects or is expected to use, the product.  A product\r\nis a consumer product regardless of whether the product has substantial\r\ncommercial, industrial or non-consumer uses, unless such uses represent\r\nthe only significant mode of use of the product.\r\n\r\n  \"Installation Information\" for a User Product means any methods,\r\nprocedures, authorization keys, or other information required to install\r\nand execute modified versions of a covered work in that User Product from\r\na modified version of its Corresponding Source.  The information must\r\nsuffice to ensure that the continued functioning of the modified object\r\ncode is in no case prevented or interfered with solely because\r\nmodification has been made.\r\n\r\n  If you convey an object code work under this section in, or with, or\r\nspecifically for use in, a User Product, and the conveying occurs as\r\npart of a transaction in which the right of possession and use of the\r\nUser Product is transferred to the recipient in perpetuity or for a\r\nfixed term (regardless of how the transaction is characterized), the\r\nCorresponding Source conveyed under this section must be accompanied\r\nby the Installation Information.  But this requirement does not apply\r\nif neither you nor any third party retains the ability to install\r\nmodified object code on the User Product (for example, the work has\r\nbeen installed in ROM).\r\n\r\n  The requirement to provide Installation Information does not include a\r\nrequirement to continue to provide support service, warranty, or updates\r\nfor a work that has been modified or installed by the recipient, or for\r\nthe User Product in which it has been modified or installed.  Access to a\r\nnetwork may be denied when the modification itself materially and\r\nadversely affects the operation of the network or violates the rules and\r\nprotocols for communication across the network.\r\n\r\n  Corresponding Source conveyed, and Installation Information provided,\r\nin accord with this section must be in a format that is publicly\r\ndocumented (and with an implementation available to the public in\r\nsource code form), and must require no special password or key for\r\nunpacking, reading or copying.\r\n\r\n  7. Additional Terms.\r\n\r\n  \"Additional permissions\" are terms that supplement the terms of this\r\nLicense by making exceptions from one or more of its conditions.\r\nAdditional permissions that are applicable to the entire Program shall\r\nbe treated as though they were included in this License, to the extent\r\nthat they are valid under applicable law.  If additional permissions\r\napply only to part of the Program, that part may be used separately\r\nunder those permissions, but the entire Program remains governed by\r\nthis License without regard to the additional permissions.\r\n\r\n  When you convey a copy of a covered work, you may at your option\r\nremove any additional permissions from that copy, or from any part of\r\nit.  (Additional permissions may be written to require their own\r\nremoval in certain cases when you modify the work.)  You may place\r\nadditional permissions on material, added by you to a covered work,\r\nfor which you have or can give appropriate copyright permission.\r\n\r\n  Notwithstanding any other provision of this License, for material you\r\nadd to a covered work, you may (if authorized by the copyright holders of\r\nthat material) supplement the terms of this License with terms:\r\n\r\n    a) Disclaiming warranty or limiting liability differently from the\r\n    terms of sections 15 and 16 of this License; or\r\n\r\n    b) Requiring preservation of specified reasonable legal notices or\r\n    author attributions in that material or in the Appropriate Legal\r\n    Notices displayed by works containing it; or\r\n\r\n    c) Prohibiting misrepresentation of the origin of that material, or\r\n    requiring that modified versions of such material be marked in\r\n    reasonable ways as different from the original version; or\r\n\r\n    d) Limiting the use for publicity purposes of names of licensors or\r\n    authors of the material; or\r\n\r\n    e) Declining to grant rights under trademark law for use of some\r\n    trade names, trademarks, or service marks; or\r\n\r\n    f) Requiring indemnification of licensors and authors of that\r\n    material by anyone who conveys the material (or modified versions of\r\n    it) with contractual assumptions of liability to the recipient, for\r\n    any liability that these contractual assumptions directly impose on\r\n    those licensors and authors.\r\n\r\n  All other non-permissive additional terms are considered \"further\r\nrestrictions\" within the meaning of section 10.  If the Program as you\r\nreceived it, or any part of it, contains a notice stating that it is\r\ngoverned by this License along with a term that is a further\r\nrestriction, you may remove that term.  If a license document contains\r\na further restriction but permits relicensing or conveying under this\r\nLicense, you may add to a covered work material governed by the terms\r\nof that license document, provided that the further restriction does\r\nnot survive such relicensing or conveying.\r\n\r\n  If you add terms to a covered work in accord with this section, you\r\nmust place, in the relevant source files, a statement of the\r\nadditional terms that apply to those files, or a notice indicating\r\nwhere to find the applicable terms.\r\n\r\n  Additional terms, permissive or non-permissive, may be stated in the\r\nform of a separately written license, or stated as exceptions;\r\nthe above requirements apply either way.\r\n\r\n  8. Termination.\r\n\r\n  You may not propagate or modify a covered work except as expressly\r\nprovided under this License.  Any attempt otherwise to propagate or\r\nmodify it is void, and will automatically terminate your rights under\r\nthis License (including any patent licenses granted under the third\r\nparagraph of section 11).\r\n\r\n  However, if you cease all violation of this License, then your\r\nlicense from a particular copyright holder is reinstated (a)\r\nprovisionally, unless and until the copyright holder explicitly and\r\nfinally terminates your license, and (b) permanently, if the copyright\r\nholder fails to notify you of the violation by some reasonable means\r\nprior to 60 days after the cessation.\r\n\r\n  Moreover, your license from a particular copyright holder is\r\nreinstated permanently if the copyright holder notifies you of the\r\nviolation by some reasonable means, this is the first time you have\r\nreceived notice of violation of this License (for any work) from that\r\ncopyright holder, and you cure the violation prior to 30 days after\r\nyour receipt of the notice.\r\n\r\n  Termination of your rights under this section does not terminate the\r\nlicenses of parties who have received copies or rights from you under\r\nthis License.  If your rights have been terminated and not permanently\r\nreinstated, you do not qualify to receive new licenses for the same\r\nmaterial under section 10.\r\n\r\n  9. Acceptance Not Required for Having Copies.\r\n\r\n  You are not required to accept this License in order to receive or\r\nrun a copy of the Program.  Ancillary propagation of a covered work\r\noccurring solely as a consequence of using peer-to-peer transmission\r\nto receive a copy likewise does not require acceptance.  However,\r\nnothing other than this License grants you permission to propagate or\r\nmodify any covered work.  These actions infringe copyright if you do\r\nnot accept this License.  Therefore, by modifying or propagating a\r\ncovered work, you indicate your acceptance of this License to do so.\r\n\r\n  10. Automatic Licensing of Downstream Recipients.\r\n\r\n  Each time you convey a covered work, the recipient automatically\r\nreceives a license from the original licensors, to run, modify and\r\npropagate that work, subject to this License.  You are not responsible\r\nfor enforcing compliance by third parties with this License.\r\n\r\n  An \"entity transaction\" is a transaction transferring control of an\r\norganization, or substantially all assets of one, or subdividing an\r\norganization, or merging organizations.  If propagation of a covered\r\nwork results from an entity transaction, each party to that\r\ntransaction who receives a copy of the work also receives whatever\r\nlicenses to the work the party's predecessor in interest had or could\r\ngive under the previous paragraph, plus a right to possession of the\r\nCorresponding Source of the work from the predecessor in interest, if\r\nthe predecessor has it or can get it with reasonable efforts.\r\n\r\n  You may not impose any further restrictions on the exercise of the\r\nrights granted or affirmed under this License.  For example, you may\r\nnot impose a license fee, royalty, or other charge for exercise of\r\nrights granted under this License, and you may not initiate litigation\r\n(including a cross-claim or counterclaim in a lawsuit) alleging that\r\nany patent claim is infringed by making, using, selling, offering for\r\nsale, or importing the Program or any portion of it.\r\n\r\n  11. Patents.\r\n\r\n  A \"contributor\" is a copyright holder who authorizes use under this\r\nLicense of the Program or a work on which the Program is based.  The\r\nwork thus licensed is called the contributor's \"contributor version\".\r\n\r\n  A contributor's \"essential patent claims\" are all patent claims\r\nowned or controlled by the contributor, whether already acquired or\r\nhereafter acquired, that would be infringed by some manner, permitted\r\nby this License, of making, using, or selling its contributor version,\r\nbut do not include claims that would be infringed only as a\r\nconsequence of further modification of the contributor version.  For\r\npurposes of this definition, \"control\" includes the right to grant\r\npatent sublicenses in a manner consistent with the requirements of\r\nthis License.\r\n\r\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\r\npatent license under the contributor's essential patent claims, to\r\nmake, use, sell, offer for sale, import and otherwise run, modify and\r\npropagate the contents of its contributor version.\r\n\r\n  In the following three paragraphs, a \"patent license\" is any express\r\nagreement or commitment, however denominated, not to enforce a patent\r\n(such as an express permission to practice a patent or covenant not to\r\nsue for patent infringement).  To \"grant\" such a patent license to a\r\nparty means to make such an agreement or commitment not to enforce a\r\npatent against the party.\r\n\r\n  If you convey a covered work, knowingly relying on a patent license,\r\nand the Corresponding Source of the work is not available for anyone\r\nto copy, free of charge and under the terms of this License, through a\r\npublicly available network server or other readily accessible means,\r\nthen you must either (1) cause the Corresponding Source to be so\r\navailable, or (2) arrange to deprive yourself of the benefit of the\r\npatent license for this particular work, or (3) arrange, in a manner\r\nconsistent with the requirements of this License, to extend the patent\r\nlicense to downstream recipients.  \"Knowingly relying\" means you have\r\nactual knowledge that, but for the patent license, your conveying the\r\ncovered work in a country, or your recipient's use of the covered work\r\nin a country, would infringe one or more identifiable patents in that\r\ncountry that you have reason to believe are valid.\r\n\r\n  If, pursuant to or in connection with a single transaction or\r\narrangement, you convey, or propagate by procuring conveyance of, a\r\ncovered work, and grant a patent license to some of the parties\r\nreceiving the covered work authorizing them to use, propagate, modify\r\nor convey a specific copy of the covered work, then the patent license\r\nyou grant is automatically extended to all recipients of the covered\r\nwork and works based on it.\r\n\r\n  A patent license is \"discriminatory\" if it does not include within\r\nthe scope of its coverage, prohibits the exercise of, or is\r\nconditioned on the non-exercise of one or more of the rights that are\r\nspecifically granted under this License.  You may not convey a covered\r\nwork if you are a party to an arrangement with a third party that is\r\nin the business of distributing software, under which you make payment\r\nto the third party based on the extent of your activity of conveying\r\nthe work, and under which the third party grants, to any of the\r\nparties who would receive the covered work from you, a discriminatory\r\npatent license (a) in connection with copies of the covered work\r\nconveyed by you (or copies made from those copies), or (b) primarily\r\nfor and in connection with specific products or compilations that\r\ncontain the covered work, unless you entered into that arrangement,\r\nor that patent license was granted, prior to 28 March 2007.\r\n\r\n  Nothing in this License shall be construed as excluding or limiting\r\nany implied license or other defenses to infringement that may\r\notherwise be available to you under applicable patent law.\r\n\r\n  12. No Surrender of Others' Freedom.\r\n\r\n  If conditions are imposed on you (whether by court order, agreement or\r\notherwise) that contradict the conditions of this License, they do not\r\nexcuse you from the conditions of this License.  If you cannot convey a\r\ncovered work so as to satisfy simultaneously your obligations under this\r\nLicense and any other pertinent obligations, then as a consequence you may\r\nnot convey it at all.  For example, if you agree to terms that obligate you\r\nto collect a royalty for further conveying from those to whom you convey\r\nthe Program, the only way you could satisfy both those terms and this\r\nLicense would be to refrain entirely from conveying the Program.\r\n\r\n  13. Use with the GNU Affero General Public License.\r\n\r\n  Notwithstanding any other provision of this License, you have\r\npermission to link or combine any covered work with a work licensed\r\nunder version 3 of the GNU Affero General Public License into a single\r\ncombined work, and to convey the resulting work.  The terms of this\r\nLicense will continue to apply to the part which is the covered work,\r\nbut the special requirements of the GNU Affero General Public License,\r\nsection 13, concerning interaction through a network will apply to the\r\ncombination as such.\r\n\r\n  14. Revised Versions of this License.\r\n\r\n  The Free Software Foundation may publish revised and/or new versions of\r\nthe GNU General Public License from time to time.  Such new versions will\r\nbe similar in spirit to the present version, but may differ in detail to\r\naddress new problems or concerns.\r\n\r\n  Each version is given a distinguishing version number.  If the\r\nProgram specifies that a certain numbered version of the GNU General\r\nPublic License \"or any later version\" applies to it, you have the\r\noption of following the terms and conditions either of that numbered\r\nversion or of any later version published by the Free Software\r\nFoundation.  If the Program does not specify a version number of the\r\nGNU General Public License, you may choose any version ever published\r\nby the Free Software Foundation.\r\n\r\n  If the Program specifies that a proxy can decide which future\r\nversions of the GNU General Public License can be used, that proxy's\r\npublic statement of acceptance of a version permanently authorizes you\r\nto choose that version for the Program.\r\n\r\n  Later license versions may give you additional or different\r\npermissions.  However, no additional obligations are imposed on any\r\nauthor or copyright holder as a result of your choosing to follow a\r\nlater version.\r\n\r\n  15. Disclaimer of Warranty.\r\n\r\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\r\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\r\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\r\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\r\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\r\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\r\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r\n\r\n  16. Limitation of Liability.\r\n\r\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\r\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\r\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\r\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\r\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\r\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\r\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\r\nSUCH DAMAGES.\r\n\r\n  17. Interpretation of Sections 15 and 16.\r\n\r\n  If the disclaimer of warranty and limitation of liability provided\r\nabove cannot be given local legal effect according to their terms,\r\nreviewing courts shall apply local law that most closely approximates\r\nan absolute waiver of all civil liability in connection with the\r\nProgram, unless a warranty or assumption of liability accompanies a\r\ncopy of the Program in return for a fee.\r\n\r\n                     END OF TERMS AND CONDITIONS\r\n\r\n            How to Apply These Terms to Your New Programs\r\n\r\n  If you develop a new program, and you want it to be of the greatest\r\npossible use to the public, the best way to achieve this is to make it\r\nfree software which everyone can redistribute and change under these terms.\r\n\r\n  To do so, attach the following notices to the program.  It is safest\r\nto attach them to the start of each source file to most effectively\r\nstate the exclusion of warranty; and each file should have at least\r\nthe \"copyright\" line and a pointer to where the full notice is found.\r\n\r\n    <one line to give the program's name and a brief idea of what it does.>\r\n    Copyright (C) <year>  <name of author>\r\n\r\n    This program is free software: you can redistribute it and/or modify\r\n    it under the terms of the GNU General Public License as published by\r\n    the Free Software Foundation, either version 3 of the License, or\r\n    (at your option) any later version.\r\n\r\n    This program is distributed in the hope that it will be useful,\r\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\n    GNU General Public License for more details.\r\n\r\n    You should have received a copy of the GNU General Public License\r\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\r\n\r\nAlso add information on how to contact you by electronic and paper mail.\r\n\r\n  If the program does terminal interaction, make it output a short\r\nnotice like this when it starts in an interactive mode:\r\n\r\n    <program>  Copyright (C) <year>  <name of author>\r\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r\n    This is free software, and you are welcome to redistribute it\r\n    under certain conditions; type `show c' for details.\r\n\r\nThe hypothetical commands `show w' and `show c' should show the appropriate\r\nparts of the General Public License.  Of course, your program's commands\r\nmight be different; for a GUI interface, you would use an \"about box\".\r\n\r\n  You should also get your employer (if you work as a programmer) or school,\r\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\r\nFor more information on this, and how to apply and follow the GNU GPL, see\r\n<https://www.gnu.org/licenses/>.\r\n\r\n  The GNU General Public License does not permit incorporating your program\r\ninto proprietary programs.  If your program is a subroutine library, you\r\nmay consider it more useful to permit linking proprietary applications with\r\nthe library.  If this is what you want to do, use the GNU Lesser General\r\nPublic License instead of this License.  But first, please read\r\n<https://www.gnu.org/licenses/why-not-lgpl.html>.\r\n"
  },
  {
    "path": "README.md",
    "content": "# 📖 Shell - 帮助文档\r\n\r\n[![GitHub license](https://img.shields.io/github/license/XIU2/Shell.svg?style=flat-square&color=3ba675&logo=github)](https://github.com/XIU2/Shell/)\r\n[![GitHub Star](https://img.shields.io/github/stars/XIU2/Shell.svg?style=flat-square&label=Star&color=3ba675&logo=github)](https://github.com/XIU2/Shell/)\r\n[![GitHub Fork](https://img.shields.io/github/forks/XIU2/Shell.svg?style=flat-square&label=Fork&color=3ba675&logo=github)](https://github.com/XIU2/Shell/)\r\n[![SHELL.XIU2.XYZ](https://img.shields.io/static/v1?label=%20&message=SHELL.XIU2.XYZ&style=flat-square&labelColor=42B983&color=3ba675&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAUElEQVR42mN02tn8n4ECwEg1A/a61eBUtOHxGTh78vUdNDYAm+JcTY+hZAA2vwfImmDIOe9qobIBMIDNuchiMMOGiAHY/E5SGJBlAKmAYgMA9YZy4TweQEoAAAAASUVORK5CYII=)](https://shell.xiu2.xyz)\r\n\r\n🔧 自用的一些乱七八糟脚本，有什么问题请发 [Issues](https://github.com/XIU2/Shell/issues/new/choose)，**觉得好用请点个⭐鼓励一下下~**  \r\n\r\n> _分享我其他开源项目：[**TrackersList.com** - 全网热门 BT Tracker 列表！有效提高 BT 下载速度~](https://github.com/XIU2/TrackersListCollection) <img src=\"https://img.shields.io/github/stars/XIU2/TrackersListCollection.svg?style=flat-square&label=Star&color=4285dd&logo=github\" height=\"16px\" />_  \r\n> _[**CloudflareSpeedTest** - 🌩 测试 Cloudflare CDN 延迟和速度，获取最快 IP (IPv4+IPv6)~](https://github.com/XIU2/CloudflareSpeedTest) <img src=\"https://img.shields.io/github/stars/XIU2/CloudflareSpeedTest.svg?style=flat-square&label=Star&color=4285dd&logo=github\" height=\"16px\" />_  \r\n> _[**UserScript** - 🐵 Github 高速下载、知乎增强、自动无缝翻页、护眼模式 等十几个**油猴脚本**~](https://github.com/XIU2/UserScript) <img src=\"https://img.shields.io/github/stars/XIU2/UserScript.svg?style=flat-square&label=Star&color=4285dd&logo=github\" height=\"16px\" />_  \r\n> _[📚「阅读」APP 精品书源~](https://github.com/XIU2/Yuedu) <img src=\"https://img.shields.io/github/stars/XIU2/Yuedu.svg?style=flat-square&label=Star&color=4285dd&logo=github\" height=\"16px\" /> ，[**SNIProxy** - 🧷 支持全平台、全系统、前置代理等~](https://github.com/XIU2/SNIProxy) <img src=\"https://img.shields.io/github/stars/XIU2/SNIProxy.svg?style=flat-square&label=Star&color=4285dd&logo=github\" height=\"16px\" />_\r\n\r\n****\r\n\r\n## 使用说明\r\n\r\n> **如果当前位于 Github，请先访问：[https://shell.xiu2.xyz](https://shell.xiu2.xyz)**  \r\n\r\n在左边侧栏中选择脚本，即可看到详细安装及使用说明等。\r\n\r\n> 如遇到脚本报错，请先查看脚本相关文档中是否说明，如没有请通过 [issue](https://github.com/XIU2/Shell/issues/new/choose) 提供完整报错内容及相关截图！  \r\n\r\n****\r\n\r\n## 问题反馈\r\n\r\n- 请通过 [GitHub issue](https://github.com/XIU2/Shell/issues) 提交问题。  \r\n- 记得提供完整报错内容及相关截图！\r\n- 问题描述越详细越好（我不怕看着累，就怕看不到）！  \r\n\r\n****\r\n\r\n## 其他说明\r\n\r\n本项目中的脚本仅供日常学习使用，不得用于任何商业用途。  \r\n学习使用请遵守您所在国家的法律，任何非法行为由使用者本身承担。  \r\n\r\n有什么好玩的也可以建议我写相关脚本，虽然我可能不听不听不听不听。🙄  \r\n\r\n****\r\n\r\n## 赞赏支持\r\n\r\n![微信赞赏](https://bitbucket.org/xiu2/xiu2/raw/master/img/zs-01.png)![支付宝赞赏](https://bitbucket.org/xiu2/xiu2/raw/master/img/zs-02.png)\r\n\r\n****\r\n\r\n## License\r\n\r\nThe GPL-3.0 License."
  },
  {
    "path": "index.html",
    "content": "﻿<!DOCTYPE html>\r\n<html>\r\n\t<head>\r\n\t\t<meta charset=\"UTF-8\" />\r\n\t\t<title>XIU2/SHELL - 帮助文档</title>\r\n\t\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\r\n\t\t<meta name=\"keywords\" content=\"SHELL,XIU2,X.I.U,西柚秀,脚本,服务器脚本,一键脚本,Linux脚本,Linux一键脚本\" />\r\n\t\t<meta name=\"description\" content=\"一些乱七八糟的 Linux 一键脚本！\" />\r\n\t\t<meta name=\"author\" contect=\"XIU2,X.I.U,西柚秀\" />\r\n\t\t<meta name=\"viewport\" content=\"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0\" />\r\n\t\t<link rel=\"icon\" type=\"image/x-icon\" href=\"img/favicon.ico\">\r\n\t\t<link rel=\"stylesheet\" href=\"https://cdn.jsdmirror.com/npm/docsify@4.12.2/lib/themes/vue.css\" />\r\n\t\t<style  type=\"text/css\">\r\n\t\t\tdetails {margin-left: 10px;}\r\n\t\t\tsummary {color: var(--theme-color,#3aa273);cursor: help;}\r\n\t\t\tsummary, button {outline:none;}\r\n\t\t\t.markdown-section table {margin-top: 1.2em;}\r\n\t\t\ta {text-decoration:none;}\r\n\t\t\t::-webkit-scrollbar {width: 0px;height: 0px}\r\n\t\t\thr {border: none;height: 1px;margin: 1.2em 0;background-color: #eee;}\r\n\t\t\t.sidebar-nav > ul > li > hr {width: 95%;}\r\n\t\t\t.sidebar ul li a {color: #858585;}\r\n\t\t\t.sidebar-nav > ul > li > ul > li > a > em {color: #858585;}\r\n\t\t\t.sidebar-nav > ul > li > ul > li > a > strong > em {font-weight: normal;font-size: 10px;color: #bbb;transform: scale(0.9);display: inline-block;}\r\n\t\t\tli .active > a > em {color: #42B983 !important;}\r\n\t\t</style>\r\n\t</head>\r\n\t<body>\r\n\t\t<style  type=\"text/css\">\r\n\t\t.docsify-copy-code-button {padding: 0.3em 1.2em;font-size: 13px;}\r\n\t\t.docsify-tabs--classic .docsify-tabs__tab--active {box-shadow: inset 0 var(--docsifytabs-tab-highlight-px) 0 0 #45af7f;}\r\n\t\t.docsify-tabs--material .docsify-tabs__tab--active {box-shadow: 0 var(--docsifytabs-tab-highlight-px) 0 0 #45af7f;background: #fbfbfb;}\r\n\t\ta {text-decoration:none}\r\n\t\t::-webkit-scrollbar {width: 0px;height: 0px}\r\n\t\t.markdown-section blockquote p {font-weight: normal;margin-left: 0;}\r\n\t\t</style>\r\n\t\t<div id=\"app\">Load...</div>\r\n\t\t<script>\r\n\t\t\twindow.$docsify={\r\n\t\t\t\tname:'XIU2/SHELL',\r\n\t\t\t\trepo:'XIU2/Shell',\r\n\t\t\t\tloadSidebar:'../md/sidebar.md',\r\n\t\t\t\tauto2top:true,\r\n\t\t\t\tsubMaxLevel:3,\r\n\t\t\t\tmaxLevel:4,\r\n\t\t\t\tcopyCode:{buttonText : '复制',errorText  : '复制失败',successText: '已复制'},\r\n\t\t\t\ttabs: {persist: false,sync: true,theme: 'classic',tabComments: true,tabHeadings: true}\r\n\t\t\t}\r\n\t\t</script>\r\n\t\t<script src=\"https://cdn.jsdmirror.com/npm/docsify@4.12.2/lib/docsify.min.js\"></script>\r\n\t\t<script src=\"https://cdn.jsdmirror.com/npm/prismjs@1.28.0/components/prism-bash.min.js\"></script><!--  bash代码高亮插件 -->\r\n\t\t<script src=\"https://cdn.jsdmirror.com/npm/docsify-copy-code@2.1.1/dist/docsify-copy-code.min.js\"></script><!--  复制代码功能插件 -->\r\n\t</body>\r\n</html>\r\n"
  },
  {
    "path": "lanzou_up.sh",
    "content": "#!/usr/bin/env bash\nPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin\nexport PATH\n# --------------------------------------------------------------\n#\t系统: ALL\n#\t项目: 蓝奏云上传文件\n#\t版本: 1.0.4\n#\t作者: XIU2\n#\t官网: https://shell.xiu2.xyz\n#\t项目: https://github.com/XIU2/Shell\n# --------------------------------------------------------------\n\nUSERNAME=\"XXX\" # 蓝奏云用户名\nCOOKIE_PHPDISK_INFO=\"XXX\" # 替换 XXX 为 Cookie 中 phpdisk_info 的值\nCOOKIE_YLOGIN=\"XXX\" # 替换 XXX 为 Cookie 中 ylogin 的值\nTOKEN=\"XXX\" # 微信推送链接 Token，可选\n\nUA=\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36\"\nHEADER_CHECK_LOGIN=\"User-Agent: ${UA}\nReferer: https://up.woozooo.com/mydisk.php?item=files&action=index&u=${USERNAME}\nAccept-Language: zh-CN,zh;q=0.9\"\n\nURL_ACCOUNT=\"https://pc.woozooo.com/account.php\"\nURL_UPLOAD=\"https://up.woozooo.com/fileup.php\"\n\nINFO=\"[信息]\" && ERROR=\"[错误]\" && TIP=\"[注意]\"\n\n# 检查是否已登录\n_CHECK_LOGIN() {\n\tif [[ -z \"${COOKIE_PHPDISK_INFO}\" || \"${COOKIE_PHPDISK_INFO}\" == \"XXX\" ]]; then\n\t\techo -e \"${ERROR} 请指定 Cookie 中 phpdisk_info 的值！\"\n\tfi\n\tif [[ -z \"${COOKIE_YLOGIN}\" || \"${COOKIE_YLOGIN}\" == \"XXX\" ]]; then\n\t\techo -e \"${ERROR} 请指定 Cookie 中 ylogin 的值！\"\n\tfi\n\n\tHTML_CHECK_LOGIN=$(curl -s --http1.1 -b \"ylogin=${COOKIE_YLOGIN};phpdisk_info=${COOKIE_PHPDISK_INFO}\" -H \"${HEADER_CHECK_LOGIN}\" \"${URL_ACCOUNT}\"|grep \"登录\")\n\t[[ ! -z \"${HTML_CHECK_LOGIN}\" ]]  && _NOTICE \"ERROR\" \"Cookie 已失效，请更新！\"\n}\n\n# 上传文件\n_UPLOAD() {\n\t[[ $(du \"${NAME_FILE}\"|awk '{print $1}') -gt 100000000 ]] && _NOTICE \"ERROR\" \"${NAME}文件大于 100MB！\"\n\tHTML_UPLOAD=$(curl --connect-timeout 120 -m 5000 --retry 2 -s -b \"ylogin=${COOKIE_YLOGIN};phpdisk_info=${COOKIE_PHPDISK_INFO}\" -H \"${URL_UPLOAD}\" -F \"task=1\" -F \"id=WU_FILE_0\" -F \"folder_id=${FOLDER_ID}\" -F \"name=${NAME}\" -F \"upload_file=@${NAME_FILE}\" \"${URL_UPLOAD}\"|grep '\\\\u4e0a\\\\u4f20\\\\u6210\\\\u529f')\n\t[[ -z \"${HTML_UPLOAD}\" ]] && _NOTICE \"ERROR\" \"${NAME}文件上传失败！\"\n\techo -e \"${INFO} 文件上传成功！[$(date '+%Y/%m/%d %H:%M')]\"\n}\n\n# 消息推送至微信\n_NOTICE() {\n\tPARAMETER_1=\"$1\"\n\tPARAMETER_2=\"$2\"\n    if [[ \"${TOKEN}\" != \"\" && \"${TOKEN}\" != \"XXX\" ]]; then\n\t    # 微信推送 Server酱 https://sc.ftqq.com/3.version\n\t    #wget --no-check-certificate -t2 -T5 -4 -U \"${UA}\" -qO- \"https://sc.ftqq.com/${TOKEN}.send?text=${PARAMETER_1}${PARAMETER_2}\"\n\t    # 微信推送 pushplus http://pushplus.hxtrip.com/\n\t    wget --no-check-certificate -t2 -T5 -4 -U \"${UA}\" -qO- \"http://pushplus.hxtrip.com/customer/push/send?token=${TOKEN}&title=${PARAMETER_1}&content=${PARAMETER_2}\"\n    fi\n    if [[ ${PARAMETER_1} == \"INFO\" ]]; then\n\t\techo -e \"${INFO} ${PARAMETER_2} [$(date '+%Y/%m/%d %H:%M')]\"\n\telse \n\t\techo -e \"${ERROR} ${PARAMETER_2} [$(date '+%Y/%m/%d %H:%M')]\"\n\tfi\n\texit 1\n}\n\nNAME=\"$1\" # 文件名\nNAME_FILE=\"$2\" # 文件路径\nFOLDER_ID=\"$3\" # 上传文件夹ID\nif [[ -z \"${NAME}\" ]]; then\n\techo -e \"${ERROR} 未指定文件名！\" && exit 1\nelif [[ -z \"${NAME_FILE}\" ]]; then\n\techo -e \"${ERROR} 未指定文件路径！\" && exit 1\nelif [[ -z \"${FOLDER_ID}\" ]]; then\n\techo -e \"${ERROR} 未指定上传文件夹ID！\" && exit 1\nfi\n_CHECK_LOGIN\n_UPLOAD"
  },
  {
    "path": "md/lanzou_up.md",
    "content": "# 📑 lanzou_up.sh\r\n\r\n## 脚本介绍\r\n\r\n很早之前，为了实现自动制作便携版并上传 qBittorret、qBittorretEE 到蓝奏云网盘，我就特地写了这个脚本来解决上传文件到蓝奏云网盘的问题。  \r\n\r\n该脚本作用很简单，**自动登陆并上传文件到蓝奏云指定文件夹**，方便 Linux 系统使用 或 其他脚本调用。  \r\n\r\n?> _[ **「油猴脚本」蓝奏云网盘增强！** 刷新不回根目录、后退返回上一级、右键文件显示菜单、自动显示更多文件、自动打开/复制分享链接、拖入文件自动显示上传框...](https://github.com/XIU2/UserScript#脚本列表)_  \r\n\r\n### 脚本版本\r\n\r\n**最新版本：** v1.0.4\r\n\r\n### 系统要求\r\n\r\n所有 Linux 系统均支持。\r\n\r\n****\r\n\r\n## 下载安装\r\n\r\n先下载脚本并赋予执行权限，还不能运行，需要简单配置一下。\r\n\r\n``` bash\r\nwget -N --no-check-certificate https://shell.xiu2.xyz/lanzou_up.sh && chmod +x lanzou_up.sh\r\n```\r\n\r\n****\r\n\r\n## 使用方法\r\n\r\n### 账号配置\r\n\r\n使用 vim 或 nano 来编辑脚本，下面以 nano 为例。  \r\n``` bash\r\nnano lanzou_up.sh\r\n\r\n# 打开脚本文件后，可以看到脚本头部有以下三行内容。\r\n# 修改 XXX 为你的蓝奏云用户名，并指定 Cookie (获取方法见下)。\r\n# 然后按下 Ctrl+X 并回车两下即可保存。\r\n\r\nUSERNAME=\"XXX\" # 蓝奏云用户名\r\nCOOKIE_PHPDISK_INFO=\"XXX\" # 替换 XXX 为 Cookie 中 phpdisk_info 的值\r\nCOOKIE_YLOGIN=\"XXX\" # 替换 XXX 为 Cookie 中 ylogin 的值\r\nTOKEN=\"XXX\" # 微信推送链接 Token，可选\r\n```\r\n\r\n> 脚本支持推送错误消息至微信，但是需要配置 TOKEN，支持 [PushPlus(默认)](http://pushplus.hxtrip.com)、[Server酱](https://sc.ftqq.com/3.version)，自行了解，不需要可留空或保留 XXX。  \r\n\r\n\r\n### 获取Cookie\r\n\r\n网页端登陆蓝奏云后，按 **F12** 键，然后如下图所示依次点击：*Application - Cookies - https://pc.woozooo.com*  \r\n这样就能看到 Cookie 中的 *phpdisk_info(值就是那一大串字符)* 和 *ylogin(值就是那几位数字)* 了。  \r\n双击值即可按 **Ctrl+C** 复制，然后将脚本头部对应变量的 *XXX* 替换即可。  \r\n\r\n![蓝奏云获取文件夹ID](https://shell.xiu2.xyz/img/lanzou_up-03.png)\r\n\r\n****\r\n\r\n再尝试上传文件前，你还需要知道 **文件夹 ID** 才行。  \r\n\r\n### 获取文件夹ID\r\n\r\n网页端登陆蓝奏云，找到目标文件夹，*右键文件夹名称 - 检查*。如下图所示，红框中的就是文件夹 ID *(880498)*。  \r\n\r\n![蓝奏云获取文件夹ID](https://shell.xiu2.xyz/img/lanzou_up-01.png)\r\n\r\n### 上传文件\r\n\r\n知道 文件夹 ID 了，那就先随便找个文件（注意文件后缀要满足蓝奏云要求，且文件不大于 100MB），然后就可以上传了：  \r\n\r\n``` bash\r\n# 格式：\r\nbash lanzou_up.sh \"文件名\" \"文件路径\" \"文件夹 ID\"\r\n\r\n# 示例\r\nbash lanzou_up.sh \"233.zip\" \"/root/233.zip\" \"880498\"\r\n```\r\n\r\n****\r\n\r\n## 更新日志\r\n\r\n#### 2026年05月06日，版本 v1.0.4 :id=104\r\n - **1. 修复** Cookie 检查判断。  \r\n\r\n#### 2020年11月10日，版本 v1.0.3 :id=103\r\n - **1. 新增** 上传超时时间。  \r\n\r\n#### 2020年11月09日，版本 v1.0.2 :id=102\r\n - **1. 新增** 提示信息时显示当前时间。  \r\n\r\n#### 2020年09月10日，版本 v1.0.1 :id=101\r\n - **1. 移除** 用户名登陆方式。  \r\n`刚发布没几天就发现用户名登陆方式失效了，所以现在只能用 Cookie 方式登陆了。`\r\n\r\n#### 2020年09月06日，版本 v1.0.0 :id=100\r\n - **1. 发布** 第一个版本。\r\n"
  },
  {
    "path": "md/qa.md",
    "content": "### \\# 脚本运行出现错误了怎么办？\r\n\r\n不要慌，先去 **[Github Issues](https://github.com/XIU2/Shell/issues)** 中看看是否已经有其他人出现过**类似问题**了（记得看看 [Closed](https://github.com/XIU2/Shell/issues?q=is%3Aissue+is%3Aclosed) 的）。  \r\n\r\n如果没有类似问题，请发个 **[Issues](https://github.com/XIU2/Shell/issues/new?assignees=&labels=&template=--bug.md&title=%5BBUG%2Fxxx.sh%5D+-+%E4%B8%80%E5%8F%A5%E8%AF%9D%E8%AF%B4%E6%98%8E%E6%83%85%E5%86%B5)** 告诉我，越详细越好（有截图更好）！\r\n\r\n****\r\n\r\n### \\# 下载脚本时报错 wget: command not found\r\n\r\n这个是因为你的 Linux 系统太过于精简，缺少基本的下载工具 wget，装个就好了。\r\n\r\n#### CentOS 系统：\r\n\r\n```bash\r\nyum update\r\nyum install wget -y\r\n```\r\n\r\n#### Debian/Ubuntu 系统：\r\n\r\n```bash\r\napt-get update\r\napt-get install wget -y\r\n\r\n# 如果你是较新版本的系统，可以把命令中的 apt-get 替换为 apt（新版包管理器）\r\n```\r\n\r\n如果没有报错，说明安装成功，继续下载安装脚本即可。\r\n\r\n****\r\n\r\n?> 稍后补充"
  },
  {
    "path": "md/qb_p.md",
    "content": "# 📑 qb_p.sh\r\n\r\n## 脚本介绍\r\n\r\n本来是制作便携版给自己用的，后来一些人希望我分享出去，于是为了实现自动制作便携版已失效~~并上传到蓝奏云网盘~~，我就特地写了这个脚本。  \r\n\r\n该脚本作用很简单，**下载最新版本 qBittorrent 制作为便携版并上传到蓝奏云**，效果：[蓝奏云](https://xiu.lanzoub.com/b073jjwta)。  \r\n\r\n### 脚本版本\r\n\r\n**最新版本：** v1.0.7\r\n\r\n### 系统要求\r\n\r\n所有 Linux 系统均支持。\r\n\r\n****\r\n\r\n## 下载安装\r\n\r\n因为涉及到解压缩，而系统自带的 unzip 并不能解压 .exe ，所以需要额外安装 7z。  \r\n\r\n``` bash\r\n# CentOS 系统执行：\r\nyum install p7zip-full -y\r\n\r\n# Debian/Ubuntu 系统执行：\r\napt-get install p7zip-full -y\r\n```\r\n\r\n然后下载脚本并赋予执行权限，还不能运行，需要简单配置一下。  \r\n\r\n``` bash\r\nwget -N --no-check-certificate https://shell.xiu2.xyz/qb_p.sh && chmod +x qb_p.sh\r\n```\r\n\r\n****\r\n\r\n## 使用方法\r\n\r\n### 首次配置\r\n\r\n使用 vim 或 nano 来编辑脚本，下面以 nano 为例。  \r\n``` bash\r\nnano qb_p.sh\r\n\r\n# 打开脚本文件后，可以看到脚本头部有以下几行内容。\r\n# 根据自己的情况修改后下面的变量内容。\r\n# 然后按下 Ctrl+X 并回车两下即可保存。\r\n\r\nFOLDER_ID=\"12345\" # 蓝奏云网盘要上传文件的文件夹 ID\r\nTOKEN=\"XXX\" # 微信推送链接 Token，可选\r\nFOLDER=\"/root/qBittorrent\" # 脚本工作目录（下载、解压、压缩、上传等操作都在这个文件夹内），脚本会自动创建文件夹\r\nLZY_PATH=\"/root/lanzou_up.sh\" # 蓝奏云上传文件脚本位置\r\nFILE_FORMAT=\"zip\" # 最后打包的压缩包格式，推荐 zip 或 7z\r\n```\r\n\r\n?> 脚本支持推送错误消息至微信，但是需要配置 TOKEN，支持 [PushPlus(默认)](http://pushplus.hxtrip.com)、[Server酱](https://sc.ftqq.com/3.version)，自行了解，不需要可留空或保留 XXX。  \r\n已失效~~蓝奏云文件夹ID获取方法：[https://shell.xiu2.xyz/#/md/lanzou_up?id=获取文件夹ID](https://shell.xiu2.xyz/#/md/lanzou_up?id=%e8%8e%b7%e5%8f%96%e6%96%87%e4%bb%b6%e5%a4%b9id)  \r\n蓝奏云上传文件脚本：[https://shell.xiu2.xyz/#/md/lanzou_up](https://shell.xiu2.xyz/#/md/lanzou_up)~~  \r\n\r\n然后去 [蓝奏云](https://xiu.lanzoub.com/b073jjwta) 下载一个最新版本，把压缩包内的 `profile` 文件夹放到服务器的 `qBittorrent/Other` 文件夹下（没有就新建，可以添加其他说明文件，就像我做的那样）。  \r\n\r\n配置完毕后，就可以先试一试能不能正常使用了！  \r\n\r\n### 使用示例\r\n\r\n``` bash\r\n# 格式：\r\nbash qb_p.sh \"指定版本号 (可选)\"\r\n\r\n# 示例，最新版本：\r\nbash qb_p.sh\r\n# 示例，指定版本：\r\nbash qb_p.sh \"4.2.3\"\r\n```\r\n\r\n****\r\n\r\n## 更新日志\r\n\r\n#### 2026年05月06日，版本 v1.0.7 :id=107\r\n - **1. 新增** 只保留 10 个压缩包文件（默认注释）。\r\n - **2. 新增** 一些进度提示。\r\n - **3. 适配** 最新的多版本文件改动。\r\n\r\n#### 2025年01月07日，版本 v1.0.6 :id=106\r\n - **1. 适配** 最新的多版本文件改动。  \r\n\r\n#### 2023年06月06日，版本 v1.0.5 :id=105\r\n - **1. 适配** 最新的多版本文件。  \r\n\r\n#### 2022年01月07日，版本 v1.0.4 :id=104\r\n - **1. 修复** 下载失败一次后，后续下载都会失败的问题。  \r\n\r\n#### 2020年10月24日，版本 v1.0.3 :id=103\r\n - **1. 修复** 压缩前没有添加便携配置文件的问题。  \r\n\r\n#### 2020年09月10日，版本 v1.0.2 :id=102\r\n - **1. 修复** 最终压缩包文件名后缀前面少个点的问题（这就很尴尬了...）。  \r\n\r\n#### 2020年09月06日，版本 v1.0.1 :id=101\r\n - **1. 新增** 自定义压缩包格式功能（详见[首次配置](#首次配置)）。  \r\n - **2. 更换** 默认压缩格式为 zip。  \r\n - **3. 优化** 最后打包为压缩包时的路径为相对路径。  \r\n\r\n#### 2020年09月06日，版本 v1.0.0 :id=100\r\n - **1. 发布** 第一个版本。\r\n"
  },
  {
    "path": "md/qbee_p.md",
    "content": "# 📑 qbee_p.sh\r\n\r\n## 脚本介绍\r\n\r\n本来是制作便携版给自己用的，后来一些人希望我分享出去，于是为了实现自动制作便携版~~并上传到蓝奏云网盘~~(已失效)，我就特地写了这个脚本。  \r\n\r\n该脚本作用很简单，**下载最新版本 qBittorrentEE 制作为便携版并上传到蓝奏云**，效果：[蓝奏云](https://xiu.lanzoub.com/b073dnr7g)。  \r\n\r\n### 脚本版本\r\n\r\n**最新版本：** v1.0.8\r\n\r\n### 系统要求\r\n\r\n所有 Linux 系统均支持。\r\n\r\n****\r\n\r\n## 下载安装\r\n\r\n因为涉及到解压缩，而系统自带的 unzip 并不能解压 .exe ，所以需要额外安装 7z。  \r\n\r\n``` bash\r\n# CentOS 系统执行：\r\nyum install p7zip-full -y\r\n\r\n# Debian/Ubuntu 系统执行：\r\napt-get install p7zip-full -y\r\n```\r\n\r\n然后下载脚本并赋予执行权限，还不能运行，需要简单配置一下。  \r\n\r\n``` bash\r\nwget -N --no-check-certificate https://shell.xiu2.xyz/qbee_p.sh && chmod +x qbee_p.sh\r\n```\r\n\r\n****\r\n\r\n## 使用方法\r\n\r\n### 首次配置\r\n\r\n使用 vim 或 nano 来编辑脚本，下面以 nano 为例。  \r\n``` bash\r\nnano qbee_p.sh\r\n\r\n# 打开脚本文件后，可以看到脚本头部有以下几行内容。\r\n# 根据自己的情况修改后下面的变量内容。\r\n# 然后按下 Ctrl+X 并回车两下即可保存。\r\n\r\nFOLDER_ID=\"12345\" # 蓝奏云网盘要上传文件的文件夹 ID\r\nTOKEN=\"XXX\" # 微信推送链接 Token，可选\r\nFOLDER=\"/root/qBittorrentEE\" # 脚本工作目录（下载、解压、压缩、上传等操作都在这个文件夹内），脚本会自动创建文件夹\r\nLZY_PATH=\"/root/lanzou_up.sh\" # 蓝奏云上传文件脚本位置\r\nFILE_FORMAT=\"zip\" # 最后打包的压缩包格式，推荐 zip 或 7z\r\n```\r\n\r\n?> 脚本支持推送错误消息至微信，但是需要配置 TOKEN，支持 [PushPlus(默认)](http://pushplus.hxtrip.com)、[Server酱](https://sc.ftqq.com/3.version)，自行了解，不需要可留空或保留 XXX。  \r\n已失效~~蓝奏云文件夹ID获取方法：[https://shell.xiu2.xyz/#/md/lanzou_up?id=获取文件夹ID](https://shell.xiu2.xyz/#/md/lanzou_up?id=%e8%8e%b7%e5%8f%96%e6%96%87%e4%bb%b6%e5%a4%b9id)  \r\n蓝奏云上传文件脚本：[https://shell.xiu2.xyz/#/md/lanzou_up](https://shell.xiu2.xyz/#/md/lanzou_up)~~  \r\n\r\n然后去 [蓝奏云](https://xiu.lanzoub.com/b073jjwta) 下载一个最新版本，把压缩包内的 `profile` 文件夹放到服务器的 `qBittorrentEE/Other` 文件夹下（没有就新建，可以添加其他说明文件，就像我做的那样）。  \r\n\r\n配置完毕后，就可以先试一试能不能正常使用了！  \r\n\r\n### 使用示例\r\n\r\n``` bash\r\n# 格式：\r\nbash qbee_p.sh \"指定版本号 (可选)\"\r\n\r\n# 示例，最新版本：\r\nbash qbee_p.sh\r\n# 示例，指定版本：\r\nbash qbee_p.sh \"4.25.11\"\r\n```\r\n\r\n****\r\n\r\n## 更新日志\r\n\r\n#### 2026年05月06日，版本 v1.0.8 :id=108\r\n - **1. 新增** 只保留 10 个压缩包文件（默认注释）。\r\n - **2. 新增** 一些进度提示。\r\n\r\n#### 2025年01月07日，版本 v1.0.7 :id=107\r\n - **1. 适配** 最新的多版本文件改动。  \r\n\r\n#### 2023年06月06日，版本 v1.0.6 :id=106\r\n - **1. 适配** 最新的多版本文件。  \r\n\r\n#### 2022年01月07日，版本 v1.0.5 :id=105\r\n - **1. 修复** 下载失败一次后，后续下载都会失败的问题。  \r\n\r\n#### 2020年10月24日，版本 v1.0.4 :id=104\r\n - **1. 修复** 压缩前没有添加便携配置文件的问题。  \r\n\r\n#### 2020年09月28日，版本 v1.0.3 :id=103\r\n - **1. 修复** 因脚本变量中 [FOLDER_DOWNLOAD_UNZIP] 错误，而导致的更新错误的问题。  \r\n\r\n#### 2020年09月10日，版本 v1.0.2 :id=102\r\n - **1. 修复** 最终压缩包文件名后缀前面少个点的问题（这就很尴尬了...）。  \r\n\r\n#### 2020年09月06日，版本 v1.0.1 :id=101\r\n - **1. 新增** 自定义压缩包格式功能（详见[首次配置](#首次配置)）。  \r\n - **2. 更换** 默认压缩格式为 zip。  \r\n - **3. 优化** 最后打包为压缩包时的路径为相对路径。  \r\n\r\n#### 2020年09月06日，版本 v1.0.0 :id=100\r\n - **1. 发布** 第一个版本。\r\n"
  },
  {
    "path": "md/sidebar.md",
    "content": "- ****  \r\n   - [· *lanzou_up.sh* ***- 蓝奏云上传文件***](md/lanzou_up.md)\r\n   - [· *qb_p.sh* ***- qBittorrent 自动制作便携版***](md/qb_p.md)\r\n   - [· *qbee_p.sh* ***- qBittorrentEE 自动制作便携版***](md/qbee_p.md)\r\n   - [· *unblock163.sh* ***- 解锁网易云音乐灰色无版权***](md/unblock163.md)\r\n- ****  \r\n   - [· *Q&A* ***- 常见问题***](md/qa.md)\r\n   - [· *Z&S* ***- 赞赏支持***](md/zs.md)\r\n"
  },
  {
    "path": "md/unblock163.md",
    "content": "# 📑 unblock163.sh\r\n\r\n## 脚本介绍\r\n\r\n?> 该脚本基于 [UnblockNeteaseMusic](https://github.com/UnblockNeteaseMusic/server) 项目。  \r\n\r\nUnblockNeteaseMusic 是一个可以解锁网易云音乐灰色无版权音乐的代理工具。  \r\n原理是通过替换无版权音乐的链接为其他音源（QQ、酷我、酷狗、百度、咪咕、JOOX等）来实现解锁无版权音乐。**相当于在网易云音乐客户端中听全网版权音乐！**  \r\n\r\n?> 该脚本只适用于服务器，如果只想本地使用，请使用我写的 ~~[Windows 版](https://xiu.lanzoub.com/b0sopazc)~~ (被律师函警告，已停止更新)！  \r\n**建议有条件的部署在国内服务器**，国外服务器只能用 QQ 音源，况且部署在国外相比国内或本地会慢上不少。\r\n\r\n### 脚本版本\r\n**最新版本：** v1.1.9  \r\n\r\n### 系统要求\r\nCentOS 6+ / Debian 6+ / Ubuntu 14.04 +  \r\n\r\n****\r\n\r\n## 下载安装\r\n\r\n!> **注意：**因为涉及防火墙端口开关、服务脚本安装，所以脚本需要以 ROOT 用户执行。\r\n\r\n``` bash\r\n# 如果你不是 ROOT 用户，请执行下面这行代码切换为 ROOT 用户。  \r\n# 如果你已经是 ROOT 用户了，那么请跳过下面这行代码！\r\n\r\nsudo su\r\n\r\n# 执行上面一行代码后会提示你输入当前用户的密码，回车后没有报错即可继续。\r\n```\r\n\r\n****\r\n\r\n?> 如果你要更新脚本，除了使用脚本中的 **[0. 更新脚本]** 功能以外，还可以再次输入下面这一行代码。\r\n\r\n执行下面一行代码下载并运行脚本：\r\n\r\n``` bash\r\nwget -N --no-check-certificate https://shell.xiu2.xyz/unblock163.sh && chmod +x unblock163.sh && bash unblock163.sh\r\n```\r\n\r\n下载运行后会提示你输入数字来选择要做什么。\r\n输入 **1** ，就会开始安装了，根据提示依次输入配置信息(或直接回车使用默认配置)即可。\r\n\r\n``` bash\r\n请输入数字 [0-10]:1\r\n[信息] 开始设置 用户配置...\r\n请输入要使用的代理端口。 [1-65535]\r\n[注意] 如果你在本地通过 Hosts 方式使用该代理，那么只能选择 80 端口，格式示例：80\r\n[注意] 如果需要搭配自签证书，那么还需要配置 HTTPS 端口，格式：HTTP:HTTPS，两个端口不能相同，格式示例：80:443\"\r\n(默认: 80):\r\n\r\n------------------------\r\n\t代理端口 :  80 \r\n------------------------\r\n\r\n请输入要使用的音源排序。 [qq kuwo kugou baidu xiami migu joox]\r\n[注意] 音源排序指的是，无版权音乐会根据此处顺序优先匹配首位音源，如果匹配到就返回，反之就继续往后匹配。\r\n[注意] 不同音源之间请用空格隔开。\r\n(默认: qq migu kuwo kugou baidu):\r\n\r\n------------------------\r\n\t音源排序 :  qq migu kuwo kugou baidu \r\n------------------------\r\n\r\n是否启用严格模式？[Y/n]\r\n[注意] 启用严格模式后，本代理仅允许网易云音乐域名访问，即本地设备只能通过 Host 或 PAC 使用，强烈建议开启，否则所有设备流量都会经过本代理。\r\n(默认：Y [启用]):\r\n\r\n------------------------\r\n\t严格模式 :  YES \r\n------------------------\r\n\r\n指定网易服务器 IP，不懂请跳过。[格式：IPv4]\r\n(默认为空):\r\n\r\n------------------------\r\n\t指定 IP :   \r\n------------------------\r\n\r\n[信息] 开始安装/配置 依赖...\r\n[信息] 开始下载/安装...\r\n...\r\n```\r\n如果安装过程没有出错，那么最后就会提示：\r\n``` bash\r\n\tUnblockNeteaseMusic 配置信息：\r\n\t------------------------\r\n\t本机地址: X.X.X.X\r\n\t代理端口: 80\r\n\t音源排序: qq migu kuwo kugou baidu\r\n\t严格模式: YES\r\n\t指定 IP: \r\n\r\n\tPAC 地址: http://X.X.X.X:80/proxy.pac\r\n```\r\n\r\n****\r\n\r\n## 使用方法\r\n\r\n### 本地使用\r\n安装并启动成功后，就可以在本地设备上使用了。  \r\n以下两种模式任选其一，不要同时使用。\r\n\r\n#### Hosts模式\r\n在 Hosts 末尾中添加下面两行：\r\n``` bash\r\nX.X.X.X music.163.com\r\nX.X.X.X interface.music.163.com\r\n```\r\n> X.X.X.X 指的是你的服务器IP，记得修改，不要傻傻的跟着写。\r\n\r\n#### PAC模式\r\n如果无法配置 Hosts（例如手机），那么可以使用 PAC。\r\n修改设备的代理自动配置为下面一行内容：\r\n``` bash\r\nhttp://X.X.X.X:端口/proxy.pac\r\n```\r\n> X.X.X.X 指的是你的服务器IP，端口是你的代理端口，记得修改，不要傻傻的跟着写。\r\n\r\n| 客户端平台    | PAC 设置步骤 |\r\n| :------ | :------------------------------- |\r\n| **Windows** | _设置 **->** 工具 **->** 自定义代理(客户端内) **->** HTTP代理 **->** 服务器: ... 端口: ..._ |\r\n| **UWP** | _Windows 设置 **->** 网络和 Internet **->** 代理 **->** 勾选\\[使用设置脚本\\] **->** 脚本地址: ..._ |\r\n| **Linux** | _系统设置 **->** 网络 **->** 网络代理 **->** 方法:自动 **->** 配置 URL: ..._ |\r\n| **macOS** | _系统偏好设置 **->** 网络 **->** 高级 **->** 代理 **->** 自动代理配置 **->** URL: ..._ |\r\n| **Android** | _WLAN **->** 修改网络 **->** 高级选项 **->** 代理 **->** 代理自动配置 **->** PAC网址: ..._ |\r\n| **iOS** | _无线局域网 **->** HTTP 代理 **->** 配置代理 **->** 自动 **->** URL: ..._ |\r\n\r\n****\r\n\r\n### 脚本说明\r\n运行脚本\r\n``` bash\r\nbash unblock163.sh\r\n```\r\n输入对应的数字来执行相应的命令。\r\n``` bash\r\n  UnblockNeteaseMusic 一键脚本 [vX.X.X]\r\n  \r\n  0. 更新脚本\r\n----------\r\n  1. 安装\r\n  2. 更新\r\n  3. 卸载\r\n----------\r\n  4. 启动\r\n  5. 停止\r\n  6. 重启\r\n----------\r\n  7. 设置 配置信息\r\n  8. 查看 账号信息\r\n  9. 查看 日志信息\r\n 10. 查看 链接信息\r\n\r\n 当前状态: 已安装 并 已启动\r\n\r\n 请输入数字 [0-10]:\r\n ```\r\n\r\n****\r\n\r\n### 文件位置\r\n - **安装目录：**/usr/local/UnblockNeteaseMusic\r\n - **日志文件：**/usr/local/UnblockNeteaseMusic/UnblockNeteaseMusic.log\r\n\r\n ****\r\n \r\n### 其他命令\r\n除了用脚本启动、停止、重启以外，还能通过其他命令操作。\r\n - **启动：**/etc/init.d/unblock163 start\r\n - **停止：**/etc/init.d/unblock163 stop\r\n - **重启：**/etc/init.d/unblock163 restart\r\n - **查看状态：**/etc/init.d/unblock163 status\r\n \r\n ****\r\n \r\n## 注意事项\r\n\r\n### 启动失败的可能原因\r\n\r\n#### 1. 端口被占用\r\n如果日志中显示以下内容，即说明端口被占用了。\r\n<details>\r\n<summary>点击展开 查看更多</summary>\r\n\r\n```\r\nHTTP Server running @ http://0.0.0.0:80\r\nevents.js:174\r\n      throw er; // Unhandled 'error' event\r\n      ^\r\n\r\nError: listen EADDRINUSE: address already in use 0.0.0.0:80\r\n    at Server.setupListenHandle [as _listen2] (net.js:1279:14)\r\n    at listenInCluster (net.js:1327:12)\r\n    at doListen (net.js:1460:7)\r\n    at process._tickCallback (internal/process/next_tick.js:63:19)\r\nEmitted 'error' event at:\r\n    at emitErrorNT (net.js:1306:8)\r\n    at process._tickCallback (internal/process/next_tick.js:63:19)\r\n```\r\n请使用 `ss -ltp|grep 端口号` 查看是被哪个程序占用了。  \r\n例如提示如下内容，则可以使用 `kill -9 2333` 命令来结束该进程（如果有两个 pid 就结束最后那个）。  \r\n```\r\nState         Recv-Q         Send-Q                    Local Address:Port                     Peer Address:Port\r\nLISTEN0      128           0.0.0.0:80         0.0.0.0:*    users:((\"nginx\",pid=6666,fd=14),(\"nginx\",pid=2333,fd=14))\r\n```\r\n\r\n</details>\r\n\r\n****\r\n\r\n### 其他\r\n\r\n#### 阿里云/腾讯云/微软云/谷歌云等无法连接的可能原因\r\n阿里云/腾讯云/微软云/谷歌云等服务商的云服务器，服务器与网络实际上是分开的，所以分为内网防火墙和外网防火墙，脚本只能修改到内网防火墙，外网防火墙需要你自行去后台寻找 [防火墙/安全规则/端口规则] 等字样相关选项开放代理端口。\r\n\r\n****\r\n\r\n## 更新日志\r\n\r\n#### 2022年08月31日，版本 v1.1.9 :id=119\r\n - **1. 更新** UnblockNeteaseMusic 仓库源镜像源。  \r\n\r\n#### 2022年07月16日，版本 v1.1.8 :id=118\r\n - **1. 更新** UnblockNeteaseMusic 仓库源镜像源。  \r\n\r\n#### 2022年04月16日，版本 v1.1.7 :id=117\r\n - **1. 更新** UnblockNeteaseMusic 仓库源镜像源。  \r\n\r\n#### 2022年02月14日，版本 v1.1.6 :id=116\r\n - **1. 更新** UnblockNeteaseMusic 仓库源镜像源。  \r\n\r\n#### 2021年09月21日，版本 v1.1.5 :id=115\r\n - **1. 调整** 调整 严格模式 与 Endpoint 模式分开配置。  \r\n - **2. 调整** Node 版本。  \r\n - **3. 更新** 音源。\r\n\r\n#### 2021年09月20日，版本 v1.1.4 :id=114\r\n - **1. 调整** 软件源为第三方持续维护的版本。  \r\n\r\n****\r\n\r\n<details>\r\n<summary>点击展开 查看更多</summary>\r\n\r\n#### 2021年07月26日，版本 v1.1.3 :id=113\r\n - **1. 修复** aarch64 ARMv8 支持。  \r\n\r\n#### 2021年07月26日，版本 v1.1.2 :id=112\r\n - **1. 新增** aarch64 ARMv8 支持。  \r\n\r\n#### 2021年03月25日，版本 v1.1.1 :id=111\r\n - **1. 调整** UnblockNeteaseMusic 仓库源为国内镜像源。  \r\n> 有效解决国内服务器从 Github 下载慢/无法下载的问题。\r\n\r\n#### 2020年12月01日，版本 v1.1.0 :id=110\r\n - **1. 新增** 指定网易云音乐 IP（即 -f 参数）。  \r\n\r\n#### 2020年09月06日，版本 v1.0.9 :id=109\r\n - **1. 更新** 脚本更新地址、系统服务脚本地址（不影响旧脚本检查更新）。  \r\n - **2. 修复** 安装过程中，修改服务器时区可能报错的问题（纯粹强迫症）。\r\n\r\n#### 2020年06月17日，版本 v1.0.8 :id=108\r\n - **1. 修复** 查看链接信息时，[显示 IP+IP归属地 格式]选项报错的问题。  \r\n\r\n#### 2020年06月09日，版本 v1.0.7 :id=107\r\n - **1. 修复** 监听双端口时，无法查看链接信息的问题。  \r\n\r\n#### 2020年04月05日，版本 v1.0.6 :id=106\r\n - **1. 修复** 当使用自签证书时，配置信息中代理端口显示不正确的问题。  \r\n\r\n#### 2019年12月02日，版本 v1.0.5 :id=105\r\n - **1. 修复** 安装时异常退出的问题。  \r\n\r\n#### 2019年11月09日，版本 v1.0.4 :id=104\r\n - **1. 新增** 支持 HTTP:HTTPS 监听双端口，搭配自签证书使用。  \r\n \r\n#### 2019年09月09日，版本 v1.0.3 :id=103\r\n - **1. 优化** 获取 Node 最新版本失败后，将使用备用的版本号。  \r\n\r\n#### 2019年09月09日，版本 v1.0.2 :id=102\r\n - **1. 修复** 部分系统因根证书不完整而导致下载失败的问题。  \r\n \r\n#### 2019年09月03日，版本 v1.0.1 :id=101\r\n - **1. 修复** 谷歌云、腾讯云这类服务器安装后无法使用的问题。  \r\n \r\n#### 2019年08月31日，版本 v1.0.0 :id=100\r\n - **1. 发布** 第一个版本。  \r\n\r\n</details>"
  },
  {
    "path": "md/zs.md",
    "content": "### \\# 赞赏支持\r\n\r\n![微信赞赏](https://bitbucket.org/xiu2/xiu2/raw/master/img/zs-01.png)![支付宝赞赏](https://bitbucket.org/xiu2/xiu2/raw/master/img/zs-02.png)"
  },
  {
    "path": "qb_p.sh",
    "content": "#!/usr/bin/env bash\nPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin\nexport PATH\n# --------------------------------------------------------------\n#\t系统: ALL\n#\t项目: qBittorrent 便携版制作 脚本\n#\t版本: 1.0.7\n#\t作者: XIU2\n#\t官网: https://shell.xiu2.xyz\n#\t项目: https://github.com/XIU2/Shell\n# --------------------------------------------------------------\n\n# 首次使用脚本前，请先配置好 FOLDER_ID、TOKEN、FOLDER、LZY_PATH 四个变量。\nFOLDER_ID=\"12345\" # 蓝奏云网盘要上传文件的文件夹 ID， https://shell.xiu2.xyz/#/md/lanzou_up?id=%e8%8e%b7%e5%8f%96%e6%96%87%e4%bb%b6%e5%a4%b9id\nTOKEN=\"XXX\" # 微信推送链接 Token，可选\nFOLDER=\"/root/qBittorrent\" # 脚本工作目录（下载、解压、压缩、上传等操作都在这个文件夹内），脚本会自动创建文件夹\nLZY_PATH=\"/root/lanzou_up.sh\" # 蓝奏云上传文件脚本位置， https://shell.xiu2.xyz/#/md/lanzou_up\nFILE_FORMAT=\"zip\" # 最后打包的压缩包格式，推荐 zip 或 7z\n\nUA=\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36\"\nFOLDER_DOWNLOAD=\"${FOLDER}/Download\" # 存放下载文件的文件夹\nFOLDER_DOWNLOAD_UNZIP=\"${FOLDER_DOWNLOAD}/qBittorrent\" # 解压下载文件的文件夹\nFOLDER_OTHER=\"${FOLDER}/Other\" # 存放配置等文件文件夹\nFOLDER_UPLOAD=\"${FOLDER}/Upload\" # 存放压缩后文件 并 上传的文件夹\nFILE_OLD_VER=\"${FOLDER}/old_ver.txt\" # 存放旧版本号的文件（每次执行脚本都会检查最新版本）\n\nARRAY=(_x64\n_lt20_x64)\n\nINFO=\"[信息]\" && ERROR=\"[错误]\" && TIP=\"[注意]\"\n\n# 检查最新版本，可以通过 _CHECK_VER \"x.x.x\" 来指定版本\n_CHECK_VER(){\n\tNEW_VER=$1 # 此处是手动指定版本号时的代码\n\t[[ -z ${NEW_VER} ]] && NEW_VER=$(wget -qO- https://api.github.com/repos/qbittorrent/qBittorrent/tags | grep \"name\"|grep -v \"beta\"|grep -v \"alpha\"|grep -v \"rc\"| head -n 1| awk -F \":\" '{print $2}'| sed 's/\\\"//g;s/,//g;s/ //g;s/release-//')\n\t[[ -z ${NEW_VER} ]] && _NOTICE \"ERROR\"  \"qBittorrent最新版本获取失败！\"\n\t[[ ! -e ${FOLDER} ]] && mkdir \"${FOLDER}\" # 如果主文件夹不存在，就新建\n\t[[ ! -e ${FILE_OLD_VER} ]] && echo -n ${NEW_VER} > ${FILE_OLD_VER} # 如果旧版本文件不存在，说明是首次运行，则把当前版本号写入该文件\n\t[[ $(cat ${FILE_OLD_VER}) == ${NEW_VER} ]] && echo -e \"${INFO} 已经是最新版本！${NEW_VER} [$(date '+%Y/%m/%d %H:%M')]\" && exit 1\n\techo -e \"${INFO} 检测到新版本 ${NEW_VER} 开始下载...\"\n}\n\n# 下载\n_DOWNLOAD(){\n\t[[ ! -e ${FOLDER_DOWNLOAD} ]] && mkdir \"${FOLDER_DOWNLOAD}\" # 如果下载文件夹不存在，就新建\n\tcd ${FOLDER_DOWNLOAD}\n\n\tif ! wget --no-check-certificate -q -t2 -T5 -4 -O \"qbittorrent${1}.exe\" \"https://sourceforge.net/projects/qbittorrent/files/qbittorrent-win32/qbittorrent-${NEW_VER}/qbittorrent_${NEW_VER}${1}_setup.exe/download\"; then\n\t\trm -f \"qbittorrent${1}.exe\"\n\t\t_NOTICE \"ERROR\" \"qBittorrent${1}_v${NEW_VER}下载失败!\"\n\tfi\n}\n\n# 解压\n_UNZIP(){\n\t[[ -e ${FOLDER_DOWNLOAD_UNZIP} ]] && rm -rf \"${FOLDER_DOWNLOAD_UNZIP}\" # 如果解压文件夹存在，就删除并重建\n\tmkdir \"${FOLDER_DOWNLOAD_UNZIP}\"\n\n\t7z x -bb0 -x'!qbittorrent.pdb' -x'!$PLUGINSDIR' -o\"${FOLDER_DOWNLOAD_UNZIP}\" \"qbittorrent${1}.exe\" > /dev/null # 解压\n\t[[ ! -e \"${FOLDER_DOWNLOAD_UNZIP}/qbittorrent.exe\" ]] && _NOTICE \"ERROR\" \"qBittorrent${1}_v${NEW_VER}解压失败！\"\n\n\trm -rf \"qbittorrent${1}.exe\"\n\tcd \"${FOLDER_DOWNLOAD_UNZIP}/translations\"\n\trm -f $(ls|egrep -v 'zh_') # 删除非中文语言文件，如果需要全语言，则注释这一行及上一行（行首加井号）\n}\n\n# 压缩\n_ZIP(){\n\tcd ${FOLDER_DOWNLOAD}\n\n\t# 复制配置等文件到文件夹内\n\tcp -r \"${FOLDER_OTHER}\"/* \"${FOLDER_DOWNLOAD_UNZIP}\"\n\n\t7z a -bb0 \"qBittorrent_v${NEW_VER}${1}_便携版.${FILE_FORMAT}\" \"qBittorrent\" > /dev/null # 压缩\n\trm -rf \"${FOLDER_DOWNLOAD_UNZIP}\" # 删除前面解压，已经无用文件夹\n\t[[ ! -e \"qBittorrent_v${NEW_VER}${1}_便携版.${FILE_FORMAT}\" ]] && _NOTICE \"ERROR\" \"qBittorrent_v${NEW_VER}${1} 压缩失败！\"\n\n\t[[ ! -e ${FOLDER_UPLOAD} ]] && mkdir \"${FOLDER_UPLOAD}\" # 如果上传文件夹不存在，就新建\n\tmv \"qBittorrent_v${NEW_VER}${1}_便携版.${FILE_FORMAT}\" \"${FOLDER_UPLOAD}\" # 移动到上传文件夹\n}\n\n# 上传\n_UPLOAD(){\n\tfor (( i=0; i <= ((${#ARRAY[*]}-1)); i++ ))\n\tdo\n\t\techo -e \"${INFO} 开始上传 qBittorrent_v${NEW_VER}${ARRAY[i]}_便携版.${FILE_FORMAT}...\"\n\t\tbash ${LZY_PATH} \"${FOLDER_UPLOAD}/qBittorrent_v${NEW_VER}${ARRAY[i]}_便携版.${FILE_FORMAT}\" \"${FOLDER_ID}\"\n\t\t[[ ${?} -ne 0 ]] && echo -e \"${ERROR} 上传到蓝奏云失败，终止后续！\" && exit 1\n\tdone\n\t\n\t#_NOTICE \"INFO\" \"qBittorrent_v${NEW_VER}\" # 你可以取消井号注释，这样每次更新也会推送消息至微信\n}\n\n# 扫尾，控制上传文件夹内文件数量为最大 10 个\n_CLEANUP(){\n\tcd ${FOLDER_UPLOAD}\n\tFILE_COUNT=$(ls -1 | wc -l)\n\tif [[ ${FILE_COUNT} -gt 10 ]]; then\n\t\tREMOVE_COUNT=$((FILE_COUNT-10))\n\t\tls -1t | tail -n +11 | xargs rm -f\n\tfi\n}\n\n# 消息推送至微信\n_NOTICE() {\n\tPARAMETER_1=\"$1\"\n\tPARAMETER_2=\"$2\"\n\tif [[ \"${TOKEN}\" != \"\" && \"${TOKEN}\" != \"XXX\" ]]; then\n\t    # 微信推送 Server酱 https://sc.ftqq.com/3.version\n\t\t#wget --no-check-certificate -t2 -T5 -4 -U \"${UA}\" -qO- \"https://sc.ftqq.com/${TOKEN}.send?text=${PARAMETER_1}${PARAMETER_2}\"\n\t\t# 微信推送 pushplus http://pushplus.hxtrip.com/\n\t\twget --no-check-certificate -t2 -T5 -4 -U \"${UA}\" -qO- \"http://pushplus.hxtrip.com/customer/push/send?token=${TOKEN}&title=${PARAMETER_1}&content=${PARAMETER_2}\"\n\tfi\n\tif [[ ${PARAMETER_1} == \"INFO\" ]]; then\n\t\techo -e \"${INFO} ${PARAMETER_2}\"\n\telse\n\t\techo -e \"${ERROR} ${PARAMETER_2}\"\n\tfi\n\texit 1\n}\n\n_CHECK_VER \"$1\" # 运行脚本的时候传递参数可以指定版本号，例：bash qb_p.sh \"4.2.3\"\n\nfor (( i=0; i <= ((${#ARRAY[*]}-1)); i++ ))\n\tdo\n\t\t[[ -e \"${FOLDER_UPLOAD}/qBittorrent_v${NEW_VER}${ARRAY[i]}_便携版.${FILE_FORMAT}\" ]]  && echo -e \"${INFO} qBittorrent_v${NEW_VER}${ARRAY[i]}_便携版.${FILE_FORMAT} 已经存在，跳过...\" && continue # 如果压缩包已经存在，就跳过下载、解压、压缩步骤，直接进入下一轮循环（下一个版本）\n\t\t_DOWNLOAD \"${ARRAY[i]}\"\n\t\t_UNZIP \"${ARRAY[i]}\"\n\t\t_ZIP \"${ARRAY[i]}\"\ndone\n\necho -n ${NEW_VER} > ${FILE_OLD_VER}\n#_UPLOAD # 如果不想上传到蓝奏云，可以把这行注释掉（行首加井号）\n#_CLEANUP # 控制上传文件夹内文件数量为最大 10 个"
  },
  {
    "path": "qbee_p.sh",
    "content": "#!/usr/bin/env bash\nPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin\nexport PATH\n# --------------------------------------------------------------\n#\t系统: ALL\n#\t项目: qBittorrent Enhanced Edition 便携版制作 脚本\n#\t版本: 1.0.8\n#\t作者: XIU2\n#\t官网: https://shell.xiu2.xyz\n#\t项目: https://github.com/XIU2/Shell\n# --------------------------------------------------------------\n\n# 首次使用脚本前，请先配置好 FOLDER_ID、TOKEN、FOLDER、LZY_PATH 四个变量。\nFOLDER_ID=\"12345\" # 蓝奏云网盘要上传文件的文件夹 ID， https://shell.xiu2.xyz/#/md/lanzou_up?id=%e8%8e%b7%e5%8f%96%e6%96%87%e4%bb%b6%e5%a4%b9id\nTOKEN=\"XXX\" # 微信推送链接 Token，可选\nFOLDER=\"/root/qBittorrentEE\" # 脚本工作目录（下载、解压、压缩、上传等操作都在这个文件夹内），脚本会自动创建文件夹\nLZY_PATH=\"/root/lanzou_up.sh\" # 蓝奏云上传文件脚本位置， https://shell.xiu2.xyz/#/md/lanzou_up\nFILE_FORMAT=\"zip\" # 最后打包的压缩包格式，推荐 zip 或 7z\n\nUA=\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36\"\nFOLDER_DOWNLOAD=\"${FOLDER}/Download\" # 存放下载文件的文件夹\nFOLDER_DOWNLOAD_UNZIP=\"${FOLDER_DOWNLOAD}/qBittorrentEE\" # 解压下载文件的文件夹\nFOLDER_OTHER=\"${FOLDER}/Other\" # 存放配置等文件文件夹\nFOLDER_UPLOAD=\"${FOLDER}/Upload\" # 存放压缩后文件 并 上传的文件夹\nFILE_OLD_VER=\"${FOLDER}/old_ver.txt\" # 存放旧版本号的文件（每次执行脚本都会检查最新版本）\n\nINFO=\"[信息]\" && ERROR=\"[错误]\" && TIP=\"[注意]\"\n\n# 检查最新版本，可以通过 _CHECK_VER \"x.x.x\" 来指定版本\n_CHECK_VER(){\n\tNEW_VER=$1 # 此处是手动指定版本号时的代码\n\t[[ -z ${NEW_VER} ]] && NEW_VER=$(wget -qO- https://api.github.com/repos/c0re100/qBittorrent-Enhanced-Edition/releases| grep \"tag_name\"| head -n 1| awk -F \":\" '{print $2}'| sed 's/\\\"//g;s/,//g;s/ //g;s/release-//')\n\t[[ -z ${NEW_VER} ]] && _NOTICE \"ERROR\"  \"qBittorrentEE最新版本获取失败！\"\n\t[[ ! -e ${FOLDER} ]] && mkdir \"${FOLDER}\" # 如果主文件夹不存在，就新建\n\t[[ ! -e ${FILE_OLD_VER} ]] && echo -n ${NEW_VER} > ${FILE_OLD_VER} # 如果旧版本文件不存在，说明是首次运行，则把当前版本号写入该文件\n\t[[ $(cat ${FILE_OLD_VER}) == ${NEW_VER} ]] && echo -e \"${INFO} 已经是最新版本！${NEW_VER} [$(date '+%Y/%m/%d %H:%M')]\" && exit 1\n\techo -e \"${INFO} 检测到新版本 ${NEW_VER} 开始下载...\"\n}\n\n# 下载\n_DOWNLOAD(){\n\t[[ ! -e ${FOLDER_DOWNLOAD} ]] && mkdir \"${FOLDER_DOWNLOAD}\" # 如果下载文件夹不存在，就新建\n\tcd ${FOLDER_DOWNLOAD}\n\tif ! wget --no-check-certificate -q -t2 -T5 -4 -U \"${UA}\" -O \"qbittorrentEE_x64.exe\" \"https://github.com/c0re100/qBittorrent-Enhanced-Edition/releases/download/release-${NEW_VER}/qbittorrent_enhanced_${NEW_VER}_x64_setup.exe\"; then\n\trm -f qbittorrentEE_x64.exe\n\t_NOTICE \"ERROR\" \"qBittorrentEE_x64_v${NEW_VER}下载失败!\"\n\tfi\n}\n\n# 解压\n_UNZIP(){\n\t[[ -e ${FOLDER_DOWNLOAD_UNZIP} ]] && rm -rf \"${FOLDER_DOWNLOAD_UNZIP}\" # 如果解压文件夹存在，就删除并重建\n\tmkdir \"${FOLDER_DOWNLOAD_UNZIP}\"\n\t7z x -bb0 -x'!qbittorrent.pdb' -x'!$PLUGINSDIR' -o\"${FOLDER_DOWNLOAD_UNZIP}\" qbittorrentEE_x64.exe > /dev/null # 解压64位文件\n\t[[ ! -e \"${FOLDER_DOWNLOAD_UNZIP}/qbittorrent.exe\" ]] && _NOTICE \"ERROR\" \"qBittorrentEE_x64_v${NEW_VER} 解压失败！\"\n\trm -rf qbittorrentEE_x64.exe\n\tcd \"${FOLDER_DOWNLOAD_UNZIP}/translations\"\n\trm -f $(ls|egrep -v 'zh_') # 删除非中文语言文件，如果需要全语言，则注释这一行及上一行（行首加井号）\n}\n\n# 压缩\n_ZIP(){\n\tcd ${FOLDER_DOWNLOAD}\n\t# 复制配置等文件到文件夹内\n\tcp -r \"${FOLDER_OTHER}\"/* \"${FOLDER_DOWNLOAD_UNZIP}\"\n\t7z a -bb0 \"qBittorrentEE_v${NEW_VER}_x64_便携版.${FILE_FORMAT}\" \"qBittorrentEE\" \"\" > /dev/null # 压缩\n\trm -rf \"${FOLDER_DOWNLOAD_UNZIP}\" # 删除前面解压，已经无用文件夹\n\t[[ ! -e \"qBittorrentEE_v${NEW_VER}_x64_便携版.${FILE_FORMAT}\" ]] && _NOTICE \"ERROR\" \"qBittorrentEE_v${NEW_VER} 压缩失败！\"\n\t[[ ! -e ${FOLDER_UPLOAD} ]] && mkdir \"${FOLDER_UPLOAD}\" # 如果上传文件夹不存在，就新建\n\tmv \"qBittorrentEE_v${NEW_VER}_x64_便携版.${FILE_FORMAT}\" \"${FOLDER_UPLOAD}\" # 移动到上传文件夹\n\n}\n\n#上传\n_UPLOAD(){\n\techo -e \"${INFO} 开始上传 qBittorrentEE_v${NEW_VER}_x64_便携版.${FILE_FORMAT}...\"\n\tbash ${LZY_PATH} \"${FOLDER_UPLOAD}/qBittorrentEE_v${NEW_VER}_x64_便携版.${FILE_FORMAT}\" \"${FOLDER_ID}\"\n\t[[ ${?} -ne 0 ]] && echo -e \"${ERROR} 上传到蓝奏云失败，终止后续！\" && exit 1\n\t#_NOTICE \"INFO\" \"qBittorrentEE_v${NEW_VER}\" # 你可以取消井号注释，这样每次更新也会推送消息至微信\n}\n\n# 扫尾，控制上传文件夹内文件数量为最大 10 个\n_CLEANUP(){\n\tcd ${FOLDER_UPLOAD}\n\tFILE_COUNT=$(ls -1 | wc -l)\n\tif [[ ${FILE_COUNT} -gt 10 ]]; then\n\t\tREMOVE_COUNT=$((FILE_COUNT-10))\n\t\tls -1t | tail -n +11 | xargs rm -f\n\tfi\n}\n\n# 通知\n_NOTICE() {\n\tPARAMETER_1=\"$1\"\n\tPARAMETER_2=\"$2\"\n\tif [[ \"${TOKEN}\" != \"\" && \"${TOKEN}\" != \"XXX\" ]]; then\n\t    # 微信推送 Server酱 https://sc.ftqq.com/3.version\n\t\t#wget --no-check-certificate -t2 -T5 -4 -U \"${UA}\" -qO- \"https://sc.ftqq.com/${TOKEN}.send?text=${PARAMETER_1}${PARAMETER_2}\"\n\t\t# 微信推送 pushplus http://pushplus.hxtrip.com/\n\t\twget --no-check-certificate -t2 -T5 -4 -U \"${UA}\" -qO- \"http://pushplus.hxtrip.com/customer/push/send?token=${TOKEN}&title=${PARAMETER_1}&content=${PARAMETER_2}\"\n\tfi\n\tif [[ ${PARAMETER_1} == \"INFO\" ]]; then\n\t\techo -e \"${INFO} ${PARAMETER_2}\"\n\telse\n\t\techo -e \"${ERROR} ${PARAMETER_2}\"\n\tfi\n\texit 1\n}\n\n_CHECK_VER \"$1\" # 运行脚本的时候传递参数可以指定版本号，例：bash qbee_p.sh \"4.2.5.11\"\n[[ -e \"${FOLDER_UPLOAD}/qBittorrentEE_v${NEW_VER}_x64_便携版.${FILE_FORMAT}\" ]] && echo -e \"${INFO} qBittorrentEE_v${NEW_VER}_x64_便携版.${FILE_FORMAT} 已经存在，跳过...\" && exit 1\n_DOWNLOAD\n_UNZIP\n_ZIP\n\necho -n ${NEW_VER} > ${FILE_OLD_VER}\n#_UPLOAD # 如果不想上传到蓝奏云，可以把这行注释掉（行首加井号）\n#_CLEANUP # 控制上传文件夹内文件数量为最大 10 个"
  },
  {
    "path": "service/unblock163_centos",
    "content": "#!/bin/bash\n# chkconfig: 2345 90 10\n# description: UnblockNeteaseMusic: a tool to unlock NetEase cloud music.\n\n### BEGIN INIT INFO\n# Provides:          UnblockNeteaseMusic\n# Required-Start:    $network $syslog\n# Required-Stop:     $network\n# Default-Start:     2 3 4 5\n# Default-Stop:      0 1 6\n# Short-Description: UnblockNeteaseMusic: a tool to unlock NetEase cloud music.\n# Description:       Start or stop the UnblockNeteaseMusic\n### END INIT INFO\n\n##### 我的变量 #####\nexport ENABLE_LOCAL_VIP=true\n#export ENABLE_HTTPDNS=true\n#export LOG_LEVEL=debug\n####################\n\nNAME=\"UnblockNeteaseMusic\"\nNAME_BIN=\"UnblockNeteaseMusic\"\nFOLDER=\"/usr/local/UnblockNeteaseMusic\"\nFILE=\"${FOLDER}/app.js\"\nFILE_CONF=\"${FOLDER}/UnblockNeteaseMusic.conf\"\nFILE_LOG=\"${FOLDER}/UnblockNeteaseMusic.log\"\nFILE_NODE=\"${FOLDER}/node/bin/node\"\n\nGREEN_FONT_PREFIX=\"\\033[32m\" && RED_FONT_PREFIX=\"\\033[31m\" && GREEN_BACKGROUND_PREFIX=\"\\033[42;37m\" && RED_BACKGROUND_PREFIX=\"\\033[41;37m\" && FONT_COLOR_SUFFIX=\"\\033[0m\"\nINFO=\"${GREEN_FONT_PREFIX}[信息]${FONT_COLOR_SUFFIX}\" && ERROR=\"${RED_FONT_PREFIX}[错误]${FONT_COLOR_SUFFIX}\" && TIP=\"${GREEN_FONT_PREFIX}[注意]${FONT_COLOR_SUFFIX}\"\nRETVAL=0\n\n_CHECK_PID(){\n\tPID=$(ps -ef |grep \"${NAME_BIN}\" |grep -v \"grep\" |grep -v \"init.d\" |grep -v \"service\" |awk '{print $2}')\n\tif [[ ! -z \"${PID}\" ]]; then\n\t\treturn 0\n\telse\n\t\treturn 1\n\tfi\n}\n_CONFIG_READ(){\n\t[[ ! -e ${FILE_CONF} ]] && echo -e \"${ERROR} ${NAME} 配置文件不存在 !\" && exit 1\n\tPORT=$(cat ${FILE_CONF}|grep 'PORT = '|awk -F 'PORT = ' '{print $NF}')\n\tSOURCE=$(cat ${FILE_CONF}|grep 'SOURCE = '|awk -F 'SOURCE = ' '{print $NF}')\n\tSTRICT=$(cat ${FILE_CONF}|grep 'STRICT = '|awk -F 'STRICT = ' '{print $NF}')\n\tENDPOINT=$(cat ${FILE_CONF}|grep 'ENDPOINT = '|awk -F 'ENDPOINT = ' '{print $NF}')\n\tENDPOINTURL=$(cat ${FILE_CONF}|grep 'ENDPOINTURL = '|awk -F 'ENDPOINTURL = ' '{print $NF}')\n\tFORCEHOST=$(cat ${FILE_CONF}|grep 'FORCEHOST = '|awk -F 'FORCEHOST = ' '{print $NF}')\n}\n_START(){\n\t_CHECK_PID\n\tif [[ ${?} == 0 ]]; then\n\t\techo -e \"${INFO} $NAME (PID ${PID}) 正在运行...\" && exit 0\n\telse\n\t\t_CONFIG_READ\n\t\techo -e \"${INFO} $NAME 启动中...\"\n\t\tulimit -n 51200\n\t\tif [[ \"${STRICT}\" == \"NO\" ]]; then\n\t\t\tARGUMENTS_S=\"\"\n\t\telse\n\t\t\tARGUMENTS_S=\"-s\"\n\t\tfi\n\t\tif [[ \"${ENDPOINT}\" == \"NO\" ]]; then\n\t\t\tARGUMENTS_E=\"\"\n\t\telse\n\t\t\tARGUMENTS_E=\"-e ${ENDPOINTURL}\"\n\t\tfi\n\t\tif [[ -z \"${FORCEHOST}\" ]]; then\n\t\t\tARGUMENTS_F=\"\"\n\t\telse\n\t\t\tARGUMENTS_F=\"-f\"\n\t\tfi\n\t\tnohup \"${FILE_NODE}\" \"${FILE}\" -a 0.0.0.0 -p ${PORT} -o ${SOURCE} ${ARGUMENTS_S} ${ARGUMENTS_E} ${ARGUMENTS_F} ${FORCEHOST} > \"${FILE_LOG}\" 2>&1 &\n\t\tsleep 2s\n\t\t_CHECK_PID\n\t\tif [[ ${?} == 0 ]]; then\n\t\t\techo -e \"${INFO} $NAME 启动成功 !\"\n\t\telse\n\t\t\techo -e \"${ERROR} $NAME 启动失败(请运行脚本查看日志错误输出内容) !\"\n\t\tfi\n\tfi\n}\n_STOP(){\n\t_CHECK_PID\n\tif [[ ${?} == 0 ]]; then\n\t\tkill -9 \"${PID}\"\n\t\tRETVAL=${?}\n\t\tif [[ ${RETVAL} == 0 ]]; then\n\t\t\techo -e \"${INFO} $NAME 停止成功 !\"\n\t\telse\n\t\t\techo -e \"${ERROR} $NAME 停止失败 !\"\n\t\tfi\n\telse\n\t\techo -e \"${INFO} $NAME 未运行\"\n\t\tRETVAL=1\n\tfi\n}\n_STATUS(){\n\t_CHECK_PID\n\tif [[ ${?} == 0 ]]; then\n\t\t_CONFIG_READ\n\t\techo -e \"${INFO} $NAME (PID ${PID}) 正在运行...\"\n\telse\n\t\techo -e \"${INFO} $NAME 未运行 !\"\n\t\tRETVAL=1\n\tfi\n}\n_RESTART(){\n\t_STOP\n\t_START\n}\ncase \"$1\" in\n\tstart|stop|restart|status)\n\tINDEX=$(echo ${1^^})\n\t_${INDEX}\n\t;;\n\t*)\n\techo -e \"使用方法: $0 { start | stop | restart | status }\"\n\tRETVAL=1\n\t;;\nesac\nexit $RETVAL\n"
  },
  {
    "path": "service/unblock163_debian",
    "content": "#!/bin/bash\n\n\n\n### BEGIN INIT INFO\n# Provides:          UnblockNeteaseMusic\n# Required-Start:    $network $local_fs $remote_fs\n# Required-Stop:     $network $local_fs $remote_fs\n# Default-Start:     2 3 4 5\n# Default-Stop:      0 1 6\n# Short-Description: UnblockNeteaseMusic: a tool to unlock NetEase cloud music.\n# Description:       Start or stop the UnblockNeteaseMusic\n### END INIT INFO\n\n##### 我的变量 #####\nexport ENABLE_LOCAL_VIP=true\n#export ENABLE_HTTPDNS=true\n#export LOG_LEVEL=debug\n####################\n\nNAME=\"UnblockNeteaseMusic\"\nNAME_BIN=\"UnblockNeteaseMusic\"\nFOLDER=\"/usr/local/UnblockNeteaseMusic\"\nFILE=\"${FOLDER}/app.js\"\nFILE_CONF=\"${FOLDER}/UnblockNeteaseMusic.conf\"\nFILE_LOG=\"${FOLDER}/UnblockNeteaseMusic.log\"\nFILE_NODE=\"${FOLDER}/node/bin/node\"\n\nGREEN_FONT_PREFIX=\"\\033[32m\" && RED_FONT_PREFIX=\"\\033[31m\" && GREEN_BACKGROUND_PREFIX=\"\\033[42;37m\" && RED_BACKGROUND_PREFIX=\"\\033[41;37m\" && FONT_COLOR_SUFFIX=\"\\033[0m\"\nINFO=\"${GREEN_FONT_PREFIX}[信息]${FONT_COLOR_SUFFIX}\" && ERROR=\"${RED_FONT_PREFIX}[错误]${FONT_COLOR_SUFFIX}\" && TIP=\"${GREEN_FONT_PREFIX}[注意]${FONT_COLOR_SUFFIX}\"\nRETVAL=0\n\n_CHECK_PID(){\n\tPID=$(ps -ef |grep \"${NAME_BIN}\" |grep -v \"grep\" |grep -v \"init.d\" |grep -v \"service\" |awk '{print $2}')\n\tif [[ ! -z \"${PID}\" ]]; then\n\t\treturn 0\n\telse\n\t\treturn 1\n\tfi\n}\n_CONFIG_READ(){\n\t[[ ! -e ${FILE_CONF} ]] && echo -e \"${ERROR} ${NAME} 配置文件不存在 !\" && exit 1\n\tPORT=$(cat ${FILE_CONF}|grep 'PORT = '|awk -F 'PORT = ' '{print $NF}')\n\tSOURCE=$(cat ${FILE_CONF}|grep 'SOURCE = '|awk -F 'SOURCE = ' '{print $NF}')\n\tSTRICT=$(cat ${FILE_CONF}|grep 'STRICT = '|awk -F 'STRICT = ' '{print $NF}')\n\tENDPOINT=$(cat ${FILE_CONF}|grep 'ENDPOINT = '|awk -F 'ENDPOINT = ' '{print $NF}')\n\tENDPOINTURL=$(cat ${FILE_CONF}|grep 'ENDPOINTURL = '|awk -F 'ENDPOINTURL = ' '{print $NF}')\n\tFORCEHOST=$(cat ${FILE_CONF}|grep 'FORCEHOST = '|awk -F 'FORCEHOST = ' '{print $NF}')\n}\n_START(){\n\t_CHECK_PID\n\tif [[ ${?} == 0 ]]; then\n\t\techo -e \"${INFO} $NAME (PID ${PID}) 正在运行...\" && exit 0\n\telse\n\t\t_CONFIG_READ\n\t\techo -e \"${INFO} $NAME 启动中...\"\n\t\tulimit -n 51200\n\t\tif [[ \"${STRICT}\" == \"NO\" ]]; then\n\t\t\tARGUMENTS_S=\"\"\n\t\telse\n\t\t\tARGUMENTS_S=\"-s\"\n\t\tfi\n\t\tif [[ \"${ENDPOINT}\" == \"NO\" ]]; then\n\t\t\tARGUMENTS_E=\"\"\n\t\telse\n\t\t\tARGUMENTS_E=\"-e ${ENDPOINTURL}\"\n\t\tfi\n\t\tif [[ -z \"${FORCEHOST}\" ]]; then\n\t\t\tARGUMENTS_F=\"\"\n\t\telse\n\t\t\tARGUMENTS_F=\"-f\"\n\t\tfi\n\t\tnohup \"${FILE_NODE}\" \"${FILE}\" -a 0.0.0.0 -p ${PORT} -o ${SOURCE} ${ARGUMENTS_S} ${ARGUMENTS_E} ${ARGUMENTS_F} ${FORCEHOST} > \"${FILE_LOG}\" 2>&1 &\n\t\tsleep 2s\n\t\t_CHECK_PID\n\t\tif [[ ${?} == 0 ]]; then\n\t\t\techo -e \"${INFO} $NAME 启动成功 !\"\n\t\telse\n\t\t\techo -e \"${ERROR} $NAME 启动失败(请运行脚本查看日志错误输出内容) !\"\n\t\tfi\n\tfi\n}\n_STOP(){\n\t_CHECK_PID\n\tif [[ ${?} == 0 ]]; then\n\t\tkill -9 \"${PID}\"\n\t\tRETVAL=${?}\n\t\tif [[ ${RETVAL} == 0 ]]; then\n\t\t\techo -e \"${INFO} $NAME 停止成功 !\"\n\t\telse\n\t\t\techo -e \"${ERROR} $NAME 停止失败 !\"\n\t\tfi\n\telse\n\t\techo -e \"${INFO} $NAME 未运行\"\n\t\tRETVAL=1\n\tfi\n}\n_STATUS(){\n\t_CHECK_PID\n\tif [[ ${?} == 0 ]]; then\n\t\t_CONFIG_READ\n\t\techo -e \"${INFO} $NAME (PID ${PID}) 正在运行...\"\n\telse\n\t\techo -e \"${INFO} $NAME 未运行 !\"\n\t\tRETVAL=1\n\tfi\n}\n_RESTART(){\n\t_STOP\n\t_START\n}\ncase \"$1\" in\n\tstart|stop|restart|status)\n\tINDEX=$(echo ${1^^})\n\t_${INDEX}\n\t;;\n\t*)\n\techo -e \"使用方法: $0 { start | stop | restart | status }\"\n\tRETVAL=1\n\t;;\nesac\nexit $RETVAL\n"
  },
  {
    "path": "unblock163.sh",
    "content": "#!/usr/bin/env bash\nPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin\nexport PATH\n# --------------------------------------------------------------\n#\t系统: CentOS/Debian/Ubuntu\n#\t项目: 解锁网易云音乐\n#\t版本: 1.1.9\n#\t作者: XIU2\n#\t官网: https://shell.xiu2.xyz\n#\t项目: https://github.com/XIU2/Shell\n# --------------------------------------------------------------\n\nNOW_VER_SHELL=\"1.1.5\"\nNEW_VER_NODE_BACKUP=\"16.9.1\"\nFILEPASH=$(cd \"$(dirname \"$0\")\"; pwd)\nFILEPASH_NOW=$(echo -e \"${FILEPASH}\"|awk -F \"$0\" '{print $1}')\nNAME=\"UnblockNeteaseMusic\"\nNAME_PID=\"UnblockNeteaseMusic\"\nNAME_SERVICE=\"unblock163\"\nFOLDER=\"/usr/local/UnblockNeteaseMusic\"\nFILE=\"${FOLDER}/app.js\"\nFOLDER_NODE=\"/usr/local/UnblockNeteaseMusic/node\"\nFILE_NODE=\"${FOLDER_NODE}/bin/node\"\nFILE_CONF=\"${FOLDER}/UnblockNeteaseMusic.conf\"\nFILE_LOG=\"${FOLDER}/UnblockNeteaseMusic.log\"\nFILE_CRONTAB=\"/usr/bin/crontab\"\n\nGREEN_FONT_PREFIX=\"\\033[32m\" && RED_FONT_PREFIX=\"\\033[31m\" && GREEN_BACKGROUND_PREFIX=\"\\033[42;37m\" && RED_BACKGROUND_PREFIX=\"\\033[41;37m\" && FONT_COLOR_SUFFIX=\"\\033[0m\"\nINFO=\"${GREEN_FONT_PREFIX}[信息]${FONT_COLOR_SUFFIX}\" && ERROR=\"${RED_FONT_PREFIX}[错误]${FONT_COLOR_SUFFIX}\" && TIP=\"${GREEN_FONT_PREFIX}[注意]${FONT_COLOR_SUFFIX}\"\n\n# 获取各项信息\n_CHECK_INFO(){\n\tif [[ \"${1}\" == \"ROOT\" ]]; then\n\t\t[[ $EUID != 0 ]] && echo -e \"${ERROR} 当前非ROOT账号(或没有ROOT权限)，无法继续操作，请更换ROOT账号或使用 ${GREEN_BACKGROUND_PREFIX}sudo su${FONT_COLOR_SUFFIX} 命令获取临时ROOT权限（执行后可能会提示输入当前账号的密码）。\" && exit 1\n\telif [[ \"${1}\" == \"OS\" ]]; then\n\t\tif [[ -f /etc/redhat-release ]]; then\n\t\t\tSYSTEM_RELEASE=\"centos\"\n\t\telif cat /etc/issue | grep -q -E -i \"debian\"; then\n\t\t\tSYSTEM_RELEASE=\"debian\"\n\t\telif cat /etc/issue | grep -q -E -i \"ubuntu\"; then\n\t\t\tSYSTEM_RELEASE=\"ubuntu\"\n\t\telif cat /etc/issue | grep -q -E -i \"centos|red hat|redhat\"; then\n\t\t\tSYSTEM_RELEASE=\"centos\"\n\t\telif cat /proc/version | grep -q -E -i \"debian\"; then\n\t\t\tSYSTEM_RELEASE=\"debian\"\n\t\telif cat /proc/version | grep -q -E -i \"ubuntu\"; then\n\t\t\tSYSTEM_RELEASE=\"ubuntu\"\n\t\telif cat /proc/version | grep -q -E -i \"centos|red hat|redhat\"; then\n\t\t\tSYSTEM_RELEASE=\"centos\"\n\t\tfi\n\t\tSYSTEM_BIT=$(uname -m)\n\telif [[ \"${1}\" == \"INSTALL_STATUS\" ]]; then\n\t\t[[ ! -e \"${FILE}\" ]] && echo -e \"${ERROR} ${NAME} 没有安装，请检查 !\" && exit 1\n\telif [[ \"${1}\" == \"CRONTAB_INSTALL_STATUS\" ]]; then\n\t\tif [[ ! -e \"${FILE_CRONTAB}\" ]]; then\n\t\t\techo -e \"${ERROR} Crontab 没有安装，开始安装...\"\n\t\t\tif [[ \"${SYSTEM_RELEASE}\" == \"centos\" ]]; then\n\t\t\t\tyum install crond -y\n\t\t\telse\n\t\t\t\tapt-get install cron -y\n\t\t\tfi\n\t\t\tif [[ ! -e \"${FILE_CRONTAB}\" ]]; then\n\t\t\t\techo -e \"${ERROR} Crontab 安装失败，请检查！\" && exit 1\n\t\t\telse\n\t\t\t\techo -e \"${INFO} Crontab 安装成功！\"\n\t\t\tfi\n\t\tfi\n\telif [[ \"${1}\" == \"PID\" ]]; then\n\t\tPID=$(ps -ef| grep \"${NAME_PID}\"| grep -v \"grep\" | grep -v \"init.d\" |grep -v \"service\" |awk '{print $2}')\n\telif [[ \"${1}\" == \"NEW_VER_NODE\" ]]; then\n\t\tNEW_VER_NODE=$(wget -qO- https://nodejs.org/en/download/current/| grep \"Latest Current Version\"| awk -F '<strong>' '{print $2}'| awk -F '</strong>' '{print $1}')\n\t\t[[ -z \"${NEW_VER_NODE}\" ]] && NEW_VER_NODE=\"${NEW_VER_NODE_BACKUP}\"\n\t\techo -e \"${INFO} 检测到 Node 最新版本为 [ ${NEW_VER_NODE} ]\"\n\telif [[ \"${1}\" == \"IPV4\" ]]; then\n\t\tIPV4=$(wget -qO- -4 -t1 -T2 ipinfo.io/ip)\n\t\tif [[ -z \"${IPV4}\" ]]; then\n\t\t\tIPV4=$(wget -qO- -4 -t1 -T2 api.ip.sb/ip)\n\t\t\tif [[ -z \"${IPV4}\" ]]; then\n\t\t\t\tIPV4=$(wget -qO- -4 -t1 -T2 members.3322.org/dyndns/getip)\n\t\t\t\tif [[ -z \"${IPV4}\" ]]; then\n\t\t\t\t\tIPV4=\"IPv4地址获取失败\"\n\t\t\t\tfi\n\t\t\tfi\n\t\tfi\n\telif [[ \"${1}\" == \"IP_ADDRESS\" ]]; then\n\t\tif [[ ! -z \"${TARGET_IP}\" ]]; then\n\t\t\tfor((IP_ADDRESS_INTEGER = ${TARGET_IP_TOTAL}; IP_ADDRESS_INTEGER >= 1; IP_ADDRESS_INTEGER--))\n\t\t\tdo\n\t\t\t\tIP_ADDRESS_IP=$(echo \"${TARGET_IP}\" |sed -n \"$IP_ADDRESS_INTEGER\"p)\n\t\t\t\tIP_ADDRESS_IP_ADDRESS=$(wget -qO- -t2 -T3 http://freeapi.ipip.net/${IP_ADDRESS_IP}|sed 's/\\\"//g;s/,//g;s/\\[//g;s/\\]//g')\n\t\t\t\techo -e \"${GREEN_FONT_PREFIX}${IP_ADDRESS_IP}${FONT_COLOR_SUFFIX} (${IP_ADDRESS_IP_ADDRESS})\"\n\t\t\t\tsleep 1s\n\t\t\tdone\n\t\tfi\n\tfi\n}\n# 安装前置依赖\n_INSTALLATION_DEPENDENCY(){\n\tGIT_VER=$(git --version)\n\tXZ_VER=$(xz -V)\n\tTAR_VER=$(tar --version)\n\t[[ -z \"${GIT_VER}\" ]] && PACK_NAME=\"${pack_name}git \"\n\t[[ -z \"${XZ_VER}\" ]] && pack_name=\"${pack_name}xz  \"\n\t[[ -z \"${TAR_VER}\" ]] && pack_name=\"${pack_name}tar \"\n\tif [[ ! -z \"${PACK_NAME}\" ]]; then\n\t\tif [[ \"${SYSTEM_RELEASE}\" == \"centos\" ]]; then\n\t\t\tyum update\n\t\t\tyum install -y ${PACK_NAME}\n\t\telse\n\t\t\tapt-get update\n\t\t\tapt-get install -y ${PACK_NAME}\n\t\tfi\n\tfi\n\tGIT_VER=$(git --version)\n\tXZ_VER=$(xz -V)\n\tTAR_VER=$(tar --version)\n\t[[ -z \"${GIT_VER}\" ]] && echo -e \"${ERROR} 依赖 Git 安装失败，请检查！\" && exit 1\n\t[[ -z \"${XZ_VER}\" ]] && echo -e \"${ERROR} 解压缩依赖 xz 安装失败，请检查！\" && exit 1\n\t[[ -z \"${TAR_VER}\" ]] && echo -e \"${ERROR} 解压缩依赖 tar 安装失败，请检查！\" && exit 1\n\n\t# 修改服务器时区为北京时间\n\tMD5_SHANGHAI=$(md5sum /usr/share/zoneinfo/Asia/Shanghai | awk '{print $1}')\n\tMD5_LOCALTIME=$(md5sum /etc/localtime | awk '{print $1}')\n\t[[ \"${MD5_SHANGHAI}\" != \"${MD5_LOCALTIME}\" ]] && \\cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime\n}\n# 下载主程序\n_DOWNLOAD(){\n\t[[  -e \"${FOLDER}\" ]] && rm -rf \"${FOLDER}\"\n\techo -e \"${INFO} 开始安装 ${NAME} ...\"\n\tenv GIT_SSL_NO_VERIFY=true git clone -b enhanced https://ghproxy.com/https://github.com/UnblockNeteaseMusic/server.git \"${FOLDER}\"\n\t[[ ! -e \"${FOLDER}\" ]] && echo -e \"${ERROR} ${NAME} 下载失败 !\" && _INSTALLATION_FAILURE_CLEANUP\n\techo -e \"${INFO} ${NAME} 安装完成，开始安装其依赖 Node ...\"\t\n\t_DOWNLOAD_NODE\n}\n# 下载NODE\n_DOWNLOAD_NODE(){\n\tcd \"${FOLDER}\"\t\n\t[[  -e \"${FOLDER_NODE}\" ]] && rm -rf \"${FOLDER_NODE}\"\n\tif [[ \"${SYSTEM_BIT}\" == \"x86_64\" ]]; then\n\t\tFILE_NAME=\"node-v${NEW_VER_NODE}-linux-x64\"\n\t\twget --no-check-certificate \"https://nodejs.org/dist/v${NEW_VER_NODE}/${FILE_NAME}.tar.xz\"\n\telse\n\t\tFILE_NAME=\"node-v${NEW_VER_NODE}-linux-arm64\"\n\t\twget --no-check-certificate \"https://nodejs.org/dist/v${NEW_VER_NODE}/${FILE_NAME}.tar.xz\"\n\tfi\n\t[[ ! -e \"${FILE_NAME}.tar.xz\" ]] && echo -e \"${ERROR} 依赖 Node 压缩包下载失败！\" && _INSTALLATION_FAILURE_CLEANUP\n\txz -d \"${FILE_NAME}.tar.xz\"\n\t[[ ! -e \"${FILE_NAME}.tar\" ]] && echo -e \"${ERROR} 依赖 Node 压缩包解压失败（可能是 压缩包损坏 或者 没有安装解压工具 xz）！\" && _INSTALLATION_FAILURE_CLEANUP\n\ttar -xf \"${FILE_NAME}.tar\"\n\t[[ ! -e \"${FILE_NAME}\" ]] && echo -e \"${ERROR} 依赖 Node 压缩包解压失败（可能是 压缩包损坏 或者 没有安装解压工具 tar）！\" && _INSTALLATION_FAILURE_CLEANUP\n\tmv \"${FILE_NAME}\" \"node\"\n\t[[ ! -e \"${FOLDER_NODE}\" ]] && echo -e \"${ERROR} 依赖 Node 文件夹重命名失败！\" && _INSTALLATION_FAILURE_CLEANUP\n\tchmod +x \"{FILE_NODE}\"\n\trm \"${FILE_NAME}\"*\n}\n# 安装系统服务\n_SERVICE(){\n\tif [[ \"${SYSTEM_RELEASE}\" = \"centos\" ]]; then\n\t\twget --no-check-certificate \"https://shell.xiu2.xyz/service/${NAME_SERVICE}_centos\" -O \"/etc/init.d/${NAME_SERVICE}\"\n\t\t[[ !  -e \"/etc/init.d/${NAME_SERVICE}\" ]] && echo -e \"${ERROR} ${NAME} 服务管理脚本下载失败 !\" && _INSTALLATION_FAILURE_CLEANUP\n\t\tchmod +x \"/etc/init.d/${NAME_SERVICE}\"\n\t\tchkconfig --add \"${NAME_SERVICE}\"\n\t\tchkconfig \"${NAME_SERVICE}\" on\n\telse\n\t\twget --no-check-certificate \"https://shell.xiu2.xyz/service/${NAME_SERVICE}_debian\" -O \"/etc/init.d/${NAME_SERVICE}\"\n\t\t[[ !  -e \"/etc/init.d/${NAME_SERVICE}\" ]] && echo -e \"${ERROR} ${NAME} 服务管理脚本下载失败 !\" && _INSTALLATION_FAILURE_CLEANUP\n\t\tchmod +x \"/etc/init.d/${NAME_SERVICE}\"\n\t\tupdate-rc.d -f \"${NAME_SERVICE}\" defaults\n\tfi\n\techo -e \"${INFO} ${NAME} 服务管理脚本下载完成 !\"\n}\n# 安装失败善后处理\n_INSTALLATION_FAILURE_CLEANUP() {\n\t[[  -e \"${FOLDER}\" ]] && rm -rf \"${FOLDER}\"\n\t[[ -e \"/etc/init.d/${NAME_SERVICE}\" ]] && rm -rf \"${FOLDER}\"\n\texit 1\n}\n# 读入/写出配置\n_CONFIG_OPERATION(){\n\tif [[ \"${1}\" == \"READ\" ]]; then\n\t\t[[ ! -e \"${FILE_CONF}\" ]] && echo -e \"${ERROR} ${NAME} 配置文件不存在 !\" && exit 1\n\t\tPORT=$(cat ${FILE_CONF}|grep 'PORT = '|awk -F 'PORT = ' '{print $NF}')\n\t\tSOURCE=$(cat ${FILE_CONF}|grep 'SOURCE = '|awk -F 'SOURCE = ' '{print $NF}')\n\t\tSTRICT=$(cat ${FILE_CONF}|grep 'STRICT = '|awk -F 'STRICT = ' '{print $NF}')\n\t\tENDPOINT=$(cat ${FILE_CONF}|grep 'ENDPOINT = '|awk -F 'ENDPOINT = ' '{print $NF}')\n\t\tENDPOINTURL=$(cat ${FILE_CONF}|grep 'ENDPOINTURL = '|awk -F 'ENDPOINTURL = ' '{print $NF}')\n\t\tFORCEHOST=$(cat ${FILE_CONF}|grep 'FORCEHOST = '|awk -F 'FORCEHOST = ' '{print $NF}')\n\telif [[ \"${1}\" == \"WRITE\" ]]; then\n\t\tcat > ${FILE_CONF}<<-EOF\nPORT = ${PORT}\nSOURCE = ${SOURCE}\nSTRICT = ${STRICT}\nENDPOINT = ${ENDPOINT}\nENDPOINTURL = ${ENDPOINTURL}\nFORCEHOST = ${FORCEHOST}\nEOF\n\tfi\n}\n# 设置选择\n_SET(){\n\t_CHECK_INFO \"INSTALL_STATUS\"\n\techo && echo -e \"你要做什么？\n ${GREEN_FONT_PREFIX}1.${FONT_COLOR_SUFFIX}  修改 代理端口\n ${GREEN_FONT_PREFIX}2.${FONT_COLOR_SUFFIX}  修改 音源排序\n ${GREEN_FONT_PREFIX}3.${FONT_COLOR_SUFFIX}  修改 严格模式\n ${GREEN_FONT_PREFIX}4.${FONT_COLOR_SUFFIX}  修改 配置 ENDPOINT\n ${GREEN_FONT_PREFIX}5.${FONT_COLOR_SUFFIX}  修改 指定 IP\n ${GREEN_FONT_PREFIX}6.${FONT_COLOR_SUFFIX}  修改 全部配置\" && echo\n\tread -e -p \"(默认: 取消):\" SET_INDEX\n\t[[ -z \"${SET_INDEX}\" ]] && echo \"已取消...\" && exit 1\n\tif [[ \"${SET_INDEX}\" == \"1\" ]]; then\n\t\t_CONFIG_OPERATION \"READ\"\n\t\tOLD_PORT=\"${PORT}\"\n\t\t_PORT_SET\n\t\t_CONFIG_OPERATION \"WRITE\"\n\t\t_IPTABLES_OPTION \"DEL\" \"${OLD_PORT}\"\n\t\t_IPTABLES_OPTION \"ADD\"\n\t\t_RESTART\n\telif [[ \"${SET_INDEX}\" == \"2\" ]]; then\n\t\t_CONFIG_OPERATION \"READ\"\n\t\t_SOURCE_SET\n\t\t_CONFIG_OPERATION \"WRITE\"\n\t\t_RESTART\n\telif [[ \"${SET_INDEX}\" == \"3\" ]]; then\n\t\t_CONFIG_OPERATION \"READ\"\n\t\t_STRICT_SET\n\t\t_CONFIG_OPERATION \"WRITE\"\n\t\t_RESTART\n\telif [[ \"${SET_INDEX}\" == \"4\" ]]; then\n\t\t_CONFIG_OPERATION \"READ\"\n\t\t_ENDPOINT_SET\n\t\t_CONFIG_OPERATION \"WRITE\"\n\t\t_RESTART\n\telif [[ \"${SET_INDEX}\" == \"5\" ]]; then\n\t\t_CONFIG_OPERATION \"READ\"\n\t\t_FORCEHOST_SET\n\t\t_CONFIG_OPERATION \"WRITE\"\n\t\t_RESTART\n\telif [[ \"${SET_INDEX}\" == \"6\" ]]; then\n\t\t_CONFIG_OPERATION \"READ\"\n\t\tOLD_PORT=\"${PORT}\"\n\t\t_PORT_SET\n\t\t_SOURCE_SET\n\t\t_STRICT_SET\n\t\t_ENDPOINT_SET\n\t\t_FORCEHOST_SET\n\t\t_CONFIG_OPERATION \"WRITE\"\n\t\t_IPTABLES_OPTION \"DEL\" \"${OLD_PORT}\"\n\t\t_IPTABLES_OPTION \"ADD\"\n\t\t_RESTART\n\telse\n\t\techo -e \"${ERROR} 请输入正确的数字！ [1-6]\" && exit 1\n\tfi\n}\n# 修改 端口\n_PORT_SET() {\n\twhile true\n\t\tdo\n\t\techo -e \"请输入要使用的代理端口。 [1-65535]\"\n\t\techo -e \"${TIP} 如果你在本地通过 Hosts 方式使用该代理，那么只能选择 80 端口，格式示例：80\"\n\t\techo -e \"${TIP} 如果需要搭配自签证书，那么还需要配置 HTTPS 端口，格式：HTTP:HTTPS，两个端口不能相同，格式示例：80:443\"\n\t\tread -e -p \"(默认: 80):\" PORT\n\t\t[[ -z \"${PORT}\" ]] && PORT=\"80\"\n\t\tPORT_FORMAT_DETECTION=$(echo \"${PORT}\"|grep \":\")\n\t\tif [[ -z ${PORT_FORMAT_DETECTION} ]]; then\n\t\t\t\techo $((${PORT}+0)) &>/dev/null\n\t\t\t\tif [[ ${?} == 0 ]]; then\n\t\t\t\t\tif (( ${PORT} >= 1 )) && (( ${PORT} <= 65536 )); then\n\t\t\t\t\t\techo && echo \"------------------------\"\n\t\t\t\t\t\techo -e \"\t代理端口 : ${RED_BACKGROUND_PREFIX} ${PORT} ${FONT_COLOR_SUFFIX}\"\n\t\t\t\t\t\techo \"------------------------\" && echo\n\t\t\t\t\t\tbreak\n\t\t\t\t\telse\n\t\t\t\t\t\techo \"输入错误，请输入正确的端口。\"\n\t\t\t\t\tfi\n\t\t\t\telse\n\t\t\t\t\techo \"输入错误，请输入正确的端口。\"\n\t\t\t\tfi\n\t\telse\n\t\t\t\techo && echo \"------------------------\"\n\t\t\t\techo -e \"\t代理端口 : ${RED_BACKGROUND_PREFIX} ${PORT} ${FONT_COLOR_SUFFIX}\"\n\t\t\t\techo \"------------------------\" && echo\n\t\t\t\tbreak\n\t\tfi\n\t\tdone\n}\n# 修改 音源\n_SOURCE_SET() {\n\techo -e \"请输入要使用的音源排序。 [kuwo kugou pyncmd qq migu bilibili joox youtube]\"\n\techo -e \"${TIP} 音源排序指的是，无版权音乐会根据此处顺序优先匹配首位音源，如果匹配到就返回，反之就继续往后匹配。\"\n\techo -e \"${TIP} 不同音源之间请用空格隔开。\"\n\tread -e -p \"(默认: kuwo kugou):\" SOURCE\n\t[[ -z \"${SOURCE}\" ]] && SOURCE=\"kuwo kugou\"\n\tSOURCE=$(echo \"${SOURCE}\"|sed -e 's/^ *//g;s/ *$//g')\n\techo && echo \"------------------------\"\n\techo -e \"\t音源排序 : ${RED_BACKGROUND_PREFIX} ${SOURCE} ${FONT_COLOR_SUFFIX}\"\n\techo \"------------------------\" && echo\n}\n# 修改 严格模式\n_STRICT_SET() {\n\techo -e \"是否启用严格模式？[Y/n]\"\n\techo -e \"${TIP} 启用严格模式后，本代理仅允许网易云音乐域名访问，即本地设备只能通过 Host 或 PAC 使用，强烈建议开启，否则所有设备流量都会经过本代理。\"\n\tread -e -p \"(默认：N [禁用]):\" STRICT\n\t[[ -z \"${STRICT}\" ]] && STRICT=\"N\"\n\tif [[ \"${STRICT}\" == [Nn] ]]; then\n\t\tSTRICT=\"NO\"\n\telse\n\t\tSTRICT=\"YES\"\n\t\tif [[ \"${ENDPOINT}\" == \"YES\" && \"${ENDPOINTURL}\" != \"http://music.163.com\" ]]; then\n\t\t\tENDPOINT=\"NO\"\n\t\t\techo -e \"\t检测到 ENDPOINTURL 服务器不是网易云，强制关闭ENDPOINT功能。\"\n\t\tfi\n\tfi\n\techo && echo \"------------------------\"\n\techo -e \"\t严格模式 : ${RED_BACKGROUND_PREFIX} ${STRICT} ${FONT_COLOR_SUFFIX}\"\n\techo \"------------------------\" && echo\n}\n# 配置 ENDPOINT\n_ENDPOINT_SET() {\n\techo -e \"是否启用 ENDPOINT 功能？[Y/n]\"\n\techo -e \"${TIP} 启用 ENDPOINT 功能后，需要指定虚拟网易云音乐的域名。如不清楚作用，请勿开启。\"\n\tread -e -p \"(默认：N [禁用]):\" ENDPOINT\n\t[[ -z \"${ENDPOINT}\" ]] && ENDPOINT=\"N\"\n\tif [[ \"${ENDPOINT}\" == [Nn] ]]; then\n\t\tENDPOINT=\"NO\"\n\telse\n\t\tENDPOINT=\"YES\"\n\t\techo -e \"指定ENDPOINT服务器：\"\n\t\tread -e -p \"(默认为：http://music.163.com ):\" ENDPOINTURL\n\t\t[[ -z \"${ENDPOINTURL}\" ]] && ENDPOINTURL=\"http://music.163.com\"\n\t\tif [[ \"${ENDPOINTURL}\" != \"http://music.163.com\" ]]; then\n\t\t\tSTRICT=\"NO\"\n\t\t\techo -e \"\t检测到 ENDPOINTURL 服务器不是网易云，强制禁用严格模式。\"\n\t\tfi\n\tfi\n\techo && echo \"------------------------\"\n\techo -e \"\tENDPOINT模式 : ${RED_BACKGROUND_PREFIX} ${ENDPOINT} ${FONT_COLOR_SUFFIX}\"\n\techo -e \"\tENDPOINTURL : ${RED_BACKGROUND_PREFIX} ${ENDPOINTURL} ${FONT_COLOR_SUFFIX}\"\n\techo \"------------------------\" && echo\n}\n# 修改 指定网易服务器 IP\n_FORCEHOST_SET() {\n\techo -e \"指定网易服务器 IP，不懂请跳过。[格式：IPv4]\"\n\tread -e -p \"(默认为空):\" FORCEHOST\n\techo && echo \"------------------------\"\n\techo -e \"\t指定 IP : ${RED_BACKGROUND_PREFIX} ${FORCEHOST} ${FONT_COLOR_SUFFIX}\"\n\techo \"------------------------\" && echo\n}\n# 安装\n_INSTALL() {\n\t_CHECK_INFO \"ROOT\"\n\t[[ -e \"${FILE}\" ]] && echo -e \"${ERROR} 检测到 ${NAME} 已安装 !\" && exit 1\n\techo -e \"${INFO} 开始设置 用户配置...\"\n\t_PORT_SET\n\t_SOURCE_SET\n\t_STRICT_SET\n\t_ENDPOINT_SET\n\t_FORCEHOST_SET\n\techo -e \"${INFO} 开始安装/配置 依赖...\"\n\t_INSTALLATION_DEPENDENCY\n\techo -e \"${INFO} 开始下载/安装...\"\n\t_CHECK_INFO \"NEW_VER_NODE\"\n\t_DOWNLOAD\n\techo -e \"${INFO} 开始下载/安装 服务脚本(init)...\"\n\t_SERVICE\n\techo -e \"${INFO} 开始写入 配置文件...\"\n\t_CONFIG_OPERATION \"WRITE\"\n\techo -e \"${INFO} 开始设置 iptables防火墙...\"\n\t_IPTABLES_OPTION \"SET\"\n\techo -e \"${INFO} 开始添加 iptables防火墙规则...\"\n\t_IPTABLES_OPTION \"ADD\"\n\techo -e \"${INFO} 开始保存 iptables防火墙规则...\"\n\t_IPTABLES_OPTION \"SAVE\"\n\techo -e \"${INFO} 所有步骤 安装完毕，开始启动...\"\n\t_START\n}\n# 更新主程序\n_UPDATE(){\n\t_CHECK_INFO \"INSTALL_STATUS\"\n\techo -e \"\\n${INFO} 开始更新...\"\n\tcd \"${FOLDER}\"\n\tenv GIT_SSL_NO_VERIFY=true git pull\n\t_UPDATE_NODE\n\techo -e \"${INFO} 更新完成！开始重启...\\n\"\n\t_RESTART\n}\n# 更新NODE\n_UPDATE_NODE(){\n        echo -e \"\\n${INFO} 开始更新NODE...\"\n        _CHECK_INFO \"NEW_VER_NODE\"\n        NOW_VER_NODE=$(\"${FILE_NODE}\" -v | awk -F 'v' '{print $2}')\n        if [[ \"${NEW_VER_NODE}}\" != \"${NOW_VER_NODE}}\" ]]; then\n\t_DOWNLOAD_NODE\n                echo -e \"脚本已更新为最新版本[ ${NEW_VER_NODE} ] !\"\n        else\n                echo -e \"NODE当前为最新版本不需更新 !\"\n        fi\n}\n# 卸载\n_UNINSTALL() {\n\t_CHECK_INFO \"INSTALL_STATUS\"\n\techo -e \"确定要卸载 ${NAME} ? (y/N)\\n\"\n\tread -e -p \"(默认: n):\" UNINSTALL_YN\n\t[[ -z \"${UNINSTALL_YN}\" ]] && UNINSTALL_YN=\"n\"\n\tif [[ \"${UNINSTALL_YN}\" == [Yy] ]]; then\n\t\t_CHECK_INFO \"PID\"\n\t\t[[ ! -z \"${PID}\" ]] && kill -9 \"${PID}\"\n\t\tif [[ -e ${FILE_CONF} ]]; then\n\t\t\t_CONFIG_OPERATION \"READ\"\n\t\t\t_IPTABLES_OPTION \"DEL\"\n\t\t\t_IPTABLES_OPTION \"SAVE\"\n\t\tfi\n\t\t[[ -e \"${FOLDER}\" ]] && rm -rf \"${FOLDER}\"\n\t\tif [[ -e \"/etc/init.d/${NAME_SERVICE}\"  ]];then\n\t\t\tif [[ \"${SYSTEM_RELEASE}\" = \"centos\" ]]; then\n\t\t\t\tchkconfig --del \"${NAME_SERVICE}\"\n\t\t\telse\n\t\t\t\tupdate-rc.d -f \"${NAME_SERVICE}\" remove\n\t\t\tfi\n\t\t\trm -rf \"/etc/init.d/${NAME_SERVICE}\"\n\t\tfi\n\t\techo -e \"\\n${INFO} ${NAME} 卸载完成 !\\n\"\n\telse\n\t\techo -e \"\\n${INFO} 卸载已取消...\\n\"\n\tfi\n}\n# 启动\n_START(){\n\t_CHECK_INFO \"INSTALL_STATUS\"\n\t_CHECK_INFO \"PID\"\n\t[[ ! -z \"${PID}\" ]] && echo -e \"${ERROR} ${NAME} 正在运行，请检查 !\" && exit 1\n\t\"/etc/init.d/${NAME_SERVICE}\" start\n\t_CHECK_INFO \"PID\"\n\t[[ ! -z \"${PID}\" ]] && _VIEW\n}\n# 停止\n_STOP(){\n\t_CHECK_INFO \"INSTALL_STATUS\"\n\t_CHECK_INFO \"PID\"\n\t[[ -z \"${PID}\" ]] && echo -e \"${ERROR} ${NAME} 没有运行，请检查 !\" && exit 1\n\t\"/etc/init.d/${NAME_SERVICE}\" stop\n}\n# 重启\n_RESTART(){\n\t_CHECK_INFO \"INSTALL_STATUS\"\n\t_CHECK_INFO \"PID\"\n\t[[ ! -z \"${PID}\" ]] && \"/etc/init.d/${NAME_SERVICE}\" stop\n\t\"/etc/init.d/${NAME_SERVICE}\" start\n\t_CHECK_INFO \"PID\"\n\t[[ ! -z \"${PID}\" ]] && _VIEW\n}\n# 查看 配置信息\n_VIEW(){\n\t_CHECK_INFO \"INSTALL_STATUS\"\n\t_CONFIG_OPERATION \"READ\"\n\t_CHECK_INFO \"IPV4\"\n\tPORT_HTTP=$(echo ${PORT} | awk -F ':' '{print $(NF-1)}')\n\tclear\n\techo -e \"\\n\tUnblockNeteaseMusic 配置信息：\n\t------------------------\n\t本机地址: ${GREEN_FONT_PREFIX}${IPV4}${FONT_COLOR_SUFFIX}\n\t代理端口: ${GREEN_FONT_PREFIX}${PORT}${FONT_COLOR_SUFFIX}\n\t音源排序: ${GREEN_FONT_PREFIX}${SOURCE}${FONT_COLOR_SUFFIX}\n\t严格模式: ${GREEN_FONT_PREFIX}${STRICT}${FONT_COLOR_SUFFIX}\n\tENDPOINT模式: ${GREEN_FONT_PREFIX}${ENDPOINT}${FONT_COLOR_SUFFIX}\n\tENDPOINTURL: ${GREEN_FONT_PREFIX}${ENDPOINTURL}${FONT_COLOR_SUFFIX}\n\t指定 IP: ${GREEN_FONT_PREFIX}${FORCEHOST}${FONT_COLOR_SUFFIX}\\n\n\tPAC 地址: ${RED_FONT_PREFIX}http://${IPV4}:${PORT_HTTP}/proxy.pac${FONT_COLOR_SUFFIX}\\n\"\n}\n# 查看 日志\n_VIEW_LOG(){\n\t_CHECK_INFO \"INSTALL_STATUS\"\n\t[[ ! -e \"${FILE_LOG}\" ]] && echo -e \"${ERROR} ${NAME} 日志文件不存在 !\" && exit 1\n\techo -e \"\\n${TIP} 按 ${RED_FONT_PREFIX}Ctrl+C${FONT_COLOR_SUFFIX} 终止查看日志\\n 如果需要查看完整日志内容，请使用 ${RED_FONT_PREFIX}cat ${FILE_LOG}${FONT_COLOR_SUFFIX} 命令。\"\n\ttail -f \"${FILE_LOG}\"\n}\n# 查看 链接信息\n_VIEW_CONNECTION_INFO_WITH(){\n\t_CONFIG_OPERATION \"READ\"\n\tPORT_FORMAT_DETECTION=$(echo \"${PORT}\"|grep \":\")\n\t[[ ! -z ${PORT_FORMAT_DETECTION} ]] && PORT=$(echo \"${PORT}\"|sed 's/:/ /g')\n\tfor ONE_PORT in ${PORT}\n\t\tdo\n\t\tTARGET_IP=$(ss state connected sport = :${ONE_PORT} -tn|sed '1d'|awk '{print $NF}'|awk -F ':' '{print $(NF-1)}'|sort -u)\n\t\t\tif [[ -z ${TARGET_IP} ]]; then\n\t\t\t\tTARGET_IP_TOTAL=\"0\"\n\t\t\t\techo -e \"端口: ${GREEN_FONT_PREFIX}\"${ONE_PORT}\"${FONT_COLOR_SUFFIX}\\t 链接IP总数: ${GREEN_FONT_PREFIX}\"${TARGET_IP_TOTAL}\"${FONT_COLOR_SUFFIX}\\t 当前链接IP: \"\n\t\t\telse\n\t\t\t\tTARGET_IP_TOTAL=$(echo -e \"${TARGET_IP}\"|wc -l)\n\t\t\t\tif [[ \"${1}\" == \"IP_ADDRESS\" ]]; then\n\t\t\t\t\techo -e \"端口: ${GREEN_FONT_PREFIX}\"${ONE_PORT}\"${FONT_COLOR_SUFFIX}\\t 链接IP总数: ${GREEN_FONT_PREFIX}\"${TARGET_IP_TOTAL}\"${FONT_COLOR_SUFFIX}\\t 当前链接IP: \"\n\t\t\t\t\t_CHECK_INFO \"IP_ADDRESS\"\n\t\t\t\t\techo\n\t\t\t\telse\n\t\t\t\t\tTARGET_IP=$(echo -e \"\\n${TARGET_IP}\")\n\t\t\t\t\techo -e \"端口: ${GREEN_FONT_PREFIX}\"${ONE_PORT}\"${FONT_COLOR_SUFFIX}\\t 链接IP总数: ${GREEN_FONT_PREFIX}\"${TARGET_IP_TOTAL}\"${FONT_COLOR_SUFFIX}\\t 当前链接IP: ${GREEN_FONT_PREFIX}${TARGET_IP}${FONT_COLOR_SUFFIX}\\n\"\n\t\t\t\tfi\n\t\t\tfi\n\t\t\tTARGET_IP=\"\"\n\t\tdone\n}\n# 选择 链接信息\n_VIEW_CONNECTION_INFO(){\n\t#_CHECK_INFO \"INSTALL_STATUS\"\n\techo && echo -e \"请选择要显示的格式：\n ${GREEN_FONT_PREFIX}1.${FONT_COLOR_SUFFIX} 显示 IP 格式\n ${GREEN_FONT_PREFIX}2.${FONT_COLOR_SUFFIX} 显示 IP+IP归属地 格式\" && echo\n\tread -e -p \"(默认: 1):\" VIEW_CONNECTION_INFO_INDEX\n\t[[ -z \"${VIEW_CONNECTION_INFO_INDEX}\" ]] && VIEW_CONNECTION_INFO_INDEX=\"1\"\n\tif [[ \"${VIEW_CONNECTION_INFO_INDEX}\" == \"1\" ]]; then\n\t\t_VIEW_CONNECTION_INFO_WITH\n\telif [[ \"${VIEW_CONNECTION_INFO_INDEX}\" == \"2\" ]]; then\n\t\techo -e \"${TIP} 检测IP归属地(IP源：ipip.net)，如果IP较多，可能时间会比较长...\"\n\t\t_VIEW_CONNECTION_INFO_WITH \"IP_ADDRESS\"\n\telse\n\t\techo -e \"${ERROR} 请输入正确的数字 [1-2]\" && exit 1\n\tfi\n}\n# 配置 防火墙\n_IPTABLES_OPTION(){\n\tif [[ \"${1}\" == \"ADD\" ]]; then\n\t\tif [[ ! \"${2}\" ]]; then\n\t\t\tADD_PORT=\"${PORT}\"\n\t\telse\n\t\t\tADD_PORT=\"${2}\"\n\t\tfi\n\t\tiptables -I INPUT -m state --state NEW -m tcp -p tcp --dport ${ADD_PORT} -j ACCEPT\n\t\tiptables -I INPUT -m state --state NEW -m udp -p udp --dport ${ADD_PORT} -j ACCEPT\n\t\tip6tables -I INPUT -m state --state NEW -m tcp -p tcp --dport ${ADD_PORT} -j ACCEPT\n\t\tip6tables -I INPUT -m state --state NEW -m udp -p udp --dport ${ADD_PORT} -j ACCEPT\n\telif [[ \"${1}\" == \"DEL\" ]]; then\n\t\tif [[ ! \"${2}\" ]]; then\n\t\t\tDEL_PORT=\"${PORT}\"\n\t\telse\n\t\t\tDEL_PORT=\"${2}\"\n\t\tfi\n\t\tiptables -D INPUT -m state --state NEW -m tcp -p tcp --dport ${DEL_PORT} -j ACCEPT\n\t\tiptables -D INPUT -m state --state NEW -m udp -p udp --dport ${DEL_PORT} -j ACCEPT\n\t\tip6tables -D INPUT -m state --state NEW -m tcp -p tcp --dport ${DEL_PORT} -j ACCEPT\n\t\tip6tables -D INPUT -m state --state NEW -m udp -p udp --dport ${DEL_PORT} -j ACCEPT\n\telif [[ \"${1}\" == \"SAVE\" ]]; then\n\t\tif [[ \"${SYSTEM_RELEASE}\" == \"centos\" ]]; then\n\t\t\tservice iptables save\n\t\t\tservice ip6tables save\n\t\telse\n\t\t\tiptables-save > /etc/iptables.up.rules\n\t\t\tip6tables-save > /etc/ip6tables.up.rules\n\t\tfi\n\telif [[ \"${1}\" == \"SET\" ]]; then\n\t\tif [[ \"${SYSTEM_RELEASE}\" == \"centos\" ]]; then\n\t\t\tservice iptables save\n\t\t\tservice ip6tables save\n\t\t\tchkconfig --level 2345 iptables on\n\t\t\tchkconfig --level 2345 ip6tables on\n\t\telse\n\t\t\tiptables-save > /etc/iptables.up.rules\n\t\t\tip6tables-save > /etc/ip6tables.up.rules\n\t\t\techo -e '#!/bin/bash\\n/sbin/iptables-restore < /etc/iptables.up.rules\\n/sbin/ip6tables-restore < /etc/ip6tables.up.rules' > /etc/network/if-pre-up.d/iptables\n\t\t\tchmod +x /etc/network/if-pre-up.d/iptables\n\t\tfi\n\tfi\n}\n# 更新脚本\n_UPDATE_SHELL(){\n\tNEW_VER_SHELL=$(wget --no-check-certificate -qO- -t1 -T3 \"https://shell.xiu2.xyz/unblock163.sh\"|grep 'NOW_VER_SHELL=\"'|awk -F \"=\" '{print $NF}'|sed 's/\\\"//g'|head -1)\n\t[[ -z \"${NEW_VER_SHELL}\" ]] && echo -e \"${ERROR} 获取脚本最新版本失败！无法链接到 Github !\" && exit 1\n\t#if [[ \"${NEW_VER_SHELL}\" != \"${NOW_VER_SHELL}\" ]]; then\n\t\tif [[ -e \"/etc/init.d/${NAME_SERVICE}\" ]]; then\n\t\t\trm -rf \"/etc/init.d/${NAME_SERVICE}\"\n\t\t\t_SERVICE\n\t\tfi\n\t\twget -N --no-check-certificate \"https://shell.xiu2.xyz/unblock163.sh\"\n\t\tchmod +x \"${FILEPASH_NOW}/unblock163.sh\"\n\t\techo -e \"脚本已更新为最新版本[ ${NEW_VER_SHELL} ] !\\n${TIP} 因为更新方式为直接覆盖当前运行的脚本，所以可能下面会提示一些报错，无视即可。\" && exit 0\n\t#else\n\t\t#echo -e \"脚本当前为最新版本[ ${NEW_VER_SHELL} ] !\" && exit 0\n\t#fi\n}\n# 脚本起始位置\n_CHECK_INFO \"OS\"\n[[ \"${SYSTEM_RELEASE}\" != \"centos\" ]] && [[ \"${SYSTEM_RELEASE}\" != \"debian\" ]]  && [[ \"${SYSTEM_RELEASE}\" != \"ubuntu\" ]] && echo -e \"${ERROR} 本脚本不支持当前系统 ${SYSTEM_RELEASE} !\" && exit 1\n[[ \"${SYSTEM_BIT}\" !=  \"x86_64\" ]] && [[ \"${SYSTEM_BIT}\" !=  \"aarch64\" ]] && echo -e \"${ERROR} ${NAME} 的依赖 Node 不支持当前系统位数 ${SYSTEM_BIT} !\" && exit 1\n\n\techo && echo -e \"  UnblockNeteaseMusic 一键脚本 ${RED_FONT_PREFIX}[v${NOW_VER_SHELL}]${FONT_COLOR_SUFFIX}\n  \n ${GREEN_FONT_PREFIX} 0.${FONT_COLOR_SUFFIX} 更新脚本\n----------\n ${GREEN_FONT_PREFIX} 1.${FONT_COLOR_SUFFIX} 安装\n ${GREEN_FONT_PREFIX} 2.${FONT_COLOR_SUFFIX} 更新\n ${GREEN_FONT_PREFIX} 3.${FONT_COLOR_SUFFIX} 卸载\n----------\n ${GREEN_FONT_PREFIX} 4.${FONT_COLOR_SUFFIX} 启动\n ${GREEN_FONT_PREFIX} 5.${FONT_COLOR_SUFFIX} 停止\n ${GREEN_FONT_PREFIX} 6.${FONT_COLOR_SUFFIX} 重启\n----------\n ${GREEN_FONT_PREFIX} 7.${FONT_COLOR_SUFFIX} 设置 配置信息\n ${GREEN_FONT_PREFIX} 8.${FONT_COLOR_SUFFIX} 查看 配置信息\n ${GREEN_FONT_PREFIX} 9.${FONT_COLOR_SUFFIX} 查看 日志信息\n ${GREEN_FONT_PREFIX}10.${FONT_COLOR_SUFFIX} 查看 链接信息\\n\"\n\tif [[ -e \"${FILE}\" ]]; then\n\t\t_CHECK_INFO \"PID\"\n\t\tif [[ ! -z \"${PID}\" ]]; then\n\t\t\techo -e \" 当前状态: ${GREEN_FONT_PREFIX}已安装${FONT_COLOR_SUFFIX} 并 ${GREEN_FONT_PREFIX}已启动${FONT_COLOR_SUFFIX}\"\n\t\telse\n\t\t\techo -e \" 当前状态: ${GREEN_FONT_PREFIX}已安装${FONT_COLOR_SUFFIX} 但 ${RED_FONT_PREFIX}未启动${FONT_COLOR_SUFFIX}\"\n\t\tfi\n\telse\n\t\techo -e \" 当前状态: ${RED_FONT_PREFIX}未安装${FONT_COLOR_SUFFIX}\"\n\tfi\n\techo\n\tread -e -p \" 请输入数字 [0-10]:\" num\n\tcase \"$num\" in\n\t\t0)\n\t\t_UPDATE_SHELL\n\t\t;;\n\t\t1)\n\t\t_INSTALL\n\t\t;;\n\t\t2)\n\t\t_UPDATE\n\t\t;;\n\t\t3)\n\t\t_UNINSTALL\n\t\t;;\n\t\t4)\n\t\t_START\n\t\t;;\n\t\t5)\n\t\t_STOP\n\t\t;;\n\t\t6)\n\t\t_RESTART\n\t\t;;\n\t\t7)\n\t\t_SET\n\t\t;;\n\t\t8)\n\t\t_VIEW\n\t\t;;\n\t\t9)\n\t\t_VIEW_LOG\n\t\t;;\n\t\t10)\n\t\t_VIEW_CONNECTION_INFO\n\t\t;;\n\t\t*)\n\t\techo \"请输入正确数字 [0-10]\"\n\t\t;;\n\tesac\n\t\n"
  }
]