[
  {
    "path": ".github/ISSUE_TEMPLATE/bug.yml",
    "content": "name: Bug Report / Сообщение об ошибке\ndescription: File a bug report / Сообщить об ошибке в программе\nlabels: [ bug ]\nassignees: romanvht\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        ### If you have trouble with specific websites or or can't configure the app, please use the [discussions section](https://github.com/dovecoteescapee/ByeDPIAndroid/discussions) to discuss it. This template is only for reporting bugs in the ByeDPI program.\n        ### Если у вас не работают какие-то сайты или не получается настроить приложение, используйте [раздел дискуссий](https://github.com/dovecoteescapee/ByeDPIAndroid/discussions) для обсуждения этого. Этот шаблон предназначен только для сообщений об ошибках в программе ByeDPI.\n  - type: textarea\n    id: bug\n    attributes:\n      label: Describe the bug / Описание ошибки\n      description: A clear and concise description of what the bug is / Четкое и краткое описание ошибки\n    validations:\n      required: true\n  - type: textarea\n    id: reproduce\n    attributes:\n      label: To Reproduce / Как воспроизвести\n      description: Steps to reproduce the behavior / Шаги для воспроизведения проблемы\n      value: |\n        1. Go to '...'\n        2. Click on '....'\n        3. Scroll down to '....'\n        4. See error\n    validations:\n      required: true\n  - type: textarea\n    id: expected\n    attributes:\n      label: Expected behavior / Ожидаемое поведение\n      description: A clear and concise description of what you expected to happen / Четкое и краткое описание ожидаемого поведения\n    validations:\n      required: true\n  - type: textarea\n    id: screenshots\n    attributes:\n      label: Screenshots / Скриншоты\n      description: If applicable, add screenshots to help explain your problem / При необходимости добавьте скриншоты, чтобы объяснить вашу проблему\n  - type: textarea\n    id: environment\n    attributes:\n      label: Environment / Окружение\n      description: Please complete the following information / Пожалуйста, заполните следующую информацию\n      value: |\n        **Smartphone / Смартфон:**\n        - Device: [e.g. Pixel Fold, Samsung Galaxy S24]\n        - Android version: [e.g. 10]\n        - ByeDPI version: [e.g. 1.0.2]\n    validations:\n      required: true\n  - type: textarea\n    id: context\n    attributes:\n      label: Additional context / Дополнительная информация\n      description: Add any other context about the problem here / Добавьте любую другую информацию о проблеме здесь\n  - type: checkboxes\n    id: checklist\n    attributes:\n      label: Before you submit / Прежде чем отправить\n      options:\n        - label: I have searched the open and closed issues for duplicates / Я искал(а) открытые и закрытые задачи на предмет дубликатов\n          required: true\n        - label: This is not a question, feature request, or general feedback / Это не вопрос, предложение новой функциональности или общий отзыв\n          required: true\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: false\ncontact_links:\n  - name: Questions about the program on Github / Вопросы по програме на Github\n    url: https://github.com/dovecoteescapee/ByeDPIAndroid/discussions\n    about: Please do not ask questions in the issue tracker / Пожалуйста, не задавайте вопросы в трекере задач\n  - name: Questions about the program on NTC.party / Вопросы по програме на NTC.party\n    url: https://ntc.party/c/community-software/byedpi/39\n    about: Please do not ask questions in the issue tracker / Пожалуйста, не задавайте вопросы в трекере задач\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature.yml",
    "content": "name: Feature request / Предложить новую функциональность\ndescription: Suggest an idea for this project / Предложить идею для проекта\nlabels: [ enhancement ]\nassignees: romanvht\nbody:\n  - type: textarea\n    id: problem\n    attributes:\n      label: What problem does your proposal solve? / Какую проблему решает ваше предложение?\n      description: A clear and concise description of what the problem is / Четкое и краткое описание проблемы\n    validations:\n      required: true\n  - type: textarea\n    id: solution\n    attributes:\n      label: Describe the solution you'd like / Опишите решение, которое вы предлагаете\n      description: A clear and concise description of what you want to happen / Четкое и краткое описание того, что вы хотите, чтобы произошло\n    validations:\n      required: true\n  - type: textarea\n    id: alternatives\n    attributes:\n      label: Describe alternatives you've considered / Опишите альтернативные варианты, которые вы рассматривали\n      description: A clear and concise description of any alternative solutions or features you've considered / Четкое и краткое описание любых альтернативных решений или функций, которые вы рассматривали\n    validations:\n      required: true\n  - type: checkboxes\n    id: checklist\n    attributes:\n      label: Before you submit / Прежде чем отправить\n      options:\n        - label: I have searched the open and closed issues for duplicates / Я искал(а) открытые и закрытые задачи на предмет дубликатов\n          required: true\n        - label: I have verified that this feature does not already exist / Я убедился(ась), что эта функция еще не существует\n          required: true\n"
  },
  {
    "path": ".gitignore",
    "content": "# OS\n.DS_Store\n\n# IDE\n.idea/\n.kotlin/\n*.iml\n\n# Gradle\n.gradle/\nbuild/\n\n# Local config\nlocal.properties\n\n# Android\n/captures\n.externalNativeBuild\n.cxx\n\n# JNI\napp/src/main/jniLibs/"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"hev-socks5-tunnel\"]\n\tpath = app/src/main/jni/hev-socks5-tunnel\n\turl = https://github.com/heiher/hev-socks5-tunnel.git\n[submodule \"byedpi\"]\n\tpath = app/src/main/cpp/byedpi\n\turl = https://github.com/hufrea/byedpi.git\n"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>.\n"
  },
  {
    "path": "README-en.md",
    "content": "<div align=\"center\">\n  <p>\n    <img src=\"https://github.com/romanvht/ByeDPIAndroid/raw/master/.github/images/app.svg\" alt=\"Логотип ByeDPI\" width=\"200\" />\n  </p>\n  <h1>ByeByeDPI Android</h1>\n  <p>\n    <a href=\"README.md\">Русский</a> |\n    English |\n    <a href=\"README-tr.md\">Türkçe</a>\n  </p>\n  <p>\n    <a href=\"https://github.com/romanvht/ByeByeDPI/releases/latest\"><img src=\"https://img.shields.io/github/v/release/romanvht/ByeByeDPI\" alt=\"Latest Release\" /></a>\n    <a href=\"https://github.com/romanvht/ByeByeDPI/releases\"><img src=\"https://img.shields.io/github/downloads/romanvht/ByeByeDPI/total\" alt=\"Downloads\" /></a>\n    <a href=\"https://github.com/romanvht/ByeByeDPI/blob/master/LICENSE\"><img src=\"https://img.shields.io/github/license/romanvht/ByeByeDPI\" alt=\"License\" /></a>\n    <a href=\"https://github.com/romanvht/ByeByeDPI\"><img src=\"https://img.shields.io/github/languages/code-size/romanvht/ByeByeDPI\" alt=\"GitHub code size in bytes\"/></a>\n  </p>\n</div>\n\nAn Android application that locally runs ByeDPI and routes all traffic through it.\n\nFor stable operation, you may need to adjust the settings. You can read more about different settings in the [ByeDPI documentation](https://github.com/hufrea/byedpi/blob/v0.13/README.md).\n\nThis application is **not** a VPN. It uses Android's VPN mode to route traffic but does not transmit anything to a remote server. It does not encrypt traffic or hide your IP address.\n\nThis application is a fork of [ByeDPIAndroid](https://github.com/dovecoteescapee/ByeDPIAndroid).\n\n---\n\n### Features\n* Autostart service on device boot\n* Saving lists of command-line parameters\n* Improved compatibility with Android TV/BOX\n* Per-app split tunneling\n* Import/export settings\n\n### Usage\n* To enable auto-start, activate the option in settings.\n* It is recommended to connect to the VPN once to accept the request.\n* After that, upon device startup, the application will automatically launch the service based on settings (VPN/Proxy).\n* Comprehensive instruction from the community [ByeByeDPI-Manual (En)](https://github.com/BDManual/ByeByeDPI-Manual)\n\n### How to use ByeByeDPI with AdGuard?\n* Start ByeByeDPI in proxy mode.\n* Add ByeByeDPI to AdGuard exclusions on the \"App Management\" tab.\n* In AdGuard settings, specify the proxy:\n```plaintext\nProxy Type: SOCKS5\nHost: 127.0.0.1\nPort: 1080 (default)\n```\n\n### Building\n1. Clone the repository with submodules:\n   ```bash\n   git clone --recurse-submodules\n   ```\n2. Run the build script from the root of the repository:\n   ```bash\n   ./gradlew assembleRelease\n   ```\n3. The APK will be in `app/build/outputs/apk/release/`\n\n> P.S.: hev_socks5_tunnel will not build under Windows, you will need to use WSL\n\n### Signature Hash\nSHA-256:\n`77:45:10:75:AC:EA:40:64:06:47:5D:74:D4:59:88:3A:49:A6:40:51:FA:F3:2E:42:F7:18:F3:F9:77:7A:8D:FB`\n\n### Dependencies\n- [ByeDPI](https://github.com/hufrea/byedpi)\n- [hev-socks5-tunnel](https://github.com/heiher/hev-socks5-tunnel)\n"
  },
  {
    "path": "README-tr.md",
    "content": "<div align=\"center\">\n  <p>\n    <img src=\"https://github.com/romanvht/ByeDPIAndroid/raw/master/.github/images/app.svg\" alt=\"Логотип ByeDPI\" width=\"200\" />\n  </p>\n  <h1>ByeByeDPI Android</h1>\n  <p>\n    <a href=\"README.md\">Русский</a> |\n    <a href=\"README-en.md\">English</a> |\n    Türkçe\n  </p>\n  <p>\n    <a href=\"https://github.com/romanvht/ByeByeDPI/releases/latest\"><img src=\"https://img.shields.io/github/v/release/romanvht/ByeByeDPI\" alt=\"Latest Release\" /></a>\n    <a href=\"https://github.com/romanvht/ByeByeDPI/releases\"><img src=\"https://img.shields.io/github/downloads/romanvht/ByeByeDPI/total\" alt=\"Downloads\" /></a>\n    <a href=\"https://github.com/romanvht/ByeByeDPI/blob/master/LICENSE\"><img src=\"https://img.shields.io/github/license/romanvht/ByeByeDPI\" alt=\"License\" /></a>\n    <a href=\"https://github.com/romanvht/ByeByeDPI\"><img src=\"https://img.shields.io/github/languages/code-size/romanvht/ByeByeDPI\" alt=\"GitHub code size in bytes\"/></a>\n  </p>\n</div>\n\nByeDPI'yi yerel olarak çalıştıran ve tüm trafiği bunun üzerinden yönlendiren bir Android uygulaması.\n\nKararlı bir çalışma için ayarları yapmanız gerekebilir. Farklı ayarlar hakkında daha fazla bilgiye [ByeDPI dökümantasyonundan](https://github.com/hufrea/byedpi/blob/v0.13/README.md) ulaşabilirsiniz.\n\nBu uygulama **VPN** değildir. Trafiği yönlendirmek için Android'in VPN modunu kullanır ancak herhangi bir veriyi uzak bir sunucuya iletmez. Trafiği şifrelemez veya IP adresinizi gizlemez.\n\nBu uygulama, [ByeDPIAndroid](https://github.com/dovecoteescapee/ByeDPIAndroid) uygulamasının bir çatallamasıdır.\n\n---\n\n### Özellikler\n* Cihaz başlatıldığında hizmetin otomatik başlatılması\n* Komut satırı parametrelerinin listelerinin kaydedilmesi\n* Android TV/BOX ile geliştirilmiş uyumluluk\n* Uygulama başına bölünmüş tünelleme\n* Ayarları içe/dışa aktarma\n\n### Kullanım\n* Otomatik başlatmayı etkinleştirmek için ayarlarda seçeneği aktifleştirin.\n* İlk başta VPN'e bağlanarak isteği kabul etmeniz önerilir.\n* Bundan sonra, cihaz başlatıldığında, uygulama ayarlara göre (VPN/Proxy) hizmeti otomatik olarak başlatacaktır.\n* Topluluktan kapsamlı talimatlar [ByeByeDPI-Manual (İngilizce)](https://github.com/BDManual/ByeByeDPI-Manual)\n\n### Türkiye İle İlgili\n* Uygulama Türkiyede uygulanan DPI'ı aşmak için şuanlık yeterlidir. İlk başta çalıştırdığınızda uygulama DPI'ı aşamayabilir. UI editöründen rastgele taktikler deneyebilirsiniz veya şuan Deneysel özellik olan proxy modundan bazı argümanlar alıp onları Komut satırı editöründe deneyebilirsiniz.\n* Türkiye ile alakalı destek için Discord: [nyaex](https://github.com/nyaexx)\n\n\n### ByeByeDPI'yi AdGuard ile nasıl kullanırım?\n* ByeByeDPI'yi proxy modunda başlatın.\n* ByeByeDPI'yi AdGuard dışlamalarına \"Uygulama Yönetimi\" sekmesinde ekleyin.\n* AdGuard ayarlarında, proxy'i belirtin:\n```plaintext\nProxy Türü: SOCKS5\nHost: 127.0.0.1\nPort: 1080 (varsayılan)\n```\n\n### Oluşturma\n1. Depoyu alt modüllerle klonlayın:\n```bash\ngit clone --recurse-submodules\n```\n2. Depo kökünden derleme betiğini çalıştırın:\n```bash\n./gradlew assemblyRelease\n```\n3. APK `app/build/outputs/apk/release/` dizininde olacaktır\n\n> Not: hev_socks5_tunnel Windows altında derlenmeyecektir, WSL kullanmanız gerekecektir\n\n### İmza Özeti\nSHA-256:\n`77:45:10:75:AC:EA:40:64:06:47:5D:74:D4:59:88:3A:49:A6:40:51:FA:F3:2E:42:F7:18:F3:F9:77:7A:8D:FB`\n\n### Bağımlılıklar\n- [ByeDPI](https://github.com/hufrea/byedpi)\n- [hev-socks5-tunnel](https://github.com/heiher/hev-socks5-tunnel)\n"
  },
  {
    "path": "README.md",
    "content": "<div align=\"center\">\n  <p>\n    <img src=\"https://github.com/romanvht/ByeDPIAndroid/raw/master/.github/images/app.svg\" alt=\"Логотип ByeDPI\" width=\"200\" />\n  </p>\n  <h1>ByeByeDPI Android</h1>\n  <p>\n    Русский |\n    <a href=\"README-en.md\">English</a> |\n    <a href=\"README-tr.md\">Türkçe</a>\n  </p>\n  <p>\n    <a href=\"https://github.com/romanvht/ByeByeDPI/releases/latest\"><img src=\"https://img.shields.io/github/v/release/romanvht/ByeByeDPI\" alt=\"Latest Release\" /></a>\n    <a href=\"https://github.com/romanvht/ByeByeDPI/releases\"><img src=\"https://img.shields.io/github/downloads/romanvht/ByeByeDPI/total\" alt=\"Downloads\" /></a>\n    <a href=\"https://github.com/romanvht/ByeByeDPI/blob/master/LICENSE\"><img src=\"https://img.shields.io/github/license/romanvht/ByeByeDPI\" alt=\"License\" /></a>\n    <a href=\"https://github.com/romanvht/ByeByeDPI\"><img src=\"https://img.shields.io/github/languages/code-size/romanvht/ByeByeDPI\" alt=\"GitHub code size in bytes\"/></a>\n  </p>\n</div>\n\nПриложение для Android, которое локально запускает ByeDPI и перенаправляет весь трафик через него.\n\nДля стабильной работы может потребоваться изменить настройки. Подробнее о различных настройках можно прочитать в [документации ByeDPI](https://github.com/hufrea/byedpi/blob/v0.13/README.md).\n\nПриложение не является VPN. Оно использует VPN-режим на Android для перенаправления трафика, но не передает ничего на удаленный сервер. Оно не шифрует трафик и не скрывает ваш IP-адрес.\n\nПриложения является форком [ByeDPIAndroid](https://github.com/dovecoteescapee/ByeDPIAndroid)\n\n---\n\n### Возможности\n* Автозапуск сервиса при старте устройства\n* Сохранение списков параметров командной строки\n* Улучшена совместимость с Android TV/BOX\n* Раздельное туннелирование приложений\n* Импорт/экспорт настроек\n\n### Использование\n* Для работы автозапуска активируйте пункт в настройках.\n* Рекомендуется подключится один раз к VPN, чтобы принять запрос.\n* После этого, при загрузке устройства, приложение автоматически запустит сервис в зависимости от настроек (VPN/Proxy)\n* Комплексная инструкция от комьюнити [ByeByeDPI-Manual](https://github.com/BDManual/ByeByeDPI-Manual)\n\n### Как использовать ByeByeDPI вместе с AdGuard?\n* Запустите ByeByeDPI в режиме прокси.\n* Добавьте ByeByeDPI в исключения AdGuard на вкладке \"Управление приложениями\".\n* В настройках AdGuard укажите прокси:\n```plaintext\nТип прокси: SOCKS5\nХост: 127.0.0.1\nПорт: 1080 (по умолчанию)\n```\n\n### Сборка\n1. Клонируйте репозиторий с сабмодулями:\n```bash\ngit clone --recurse-submodules\n```\n2. Запустите скрипт сборки из корня репозитория:\n```bash\n./gradlew assembleRelease\n```\n3. APK будет в `app/build/outputs/apk/release/`\n\n> P.S.: hev_socks5_tunnel не соберется под Windows, вам нужно будет использовать WSL\n\n### Хеш подписи\nSHA-256: \n`77:45:10:75:AC:EA:40:64:06:47:5D:74:D4:59:88:3A:49:A6:40:51:FA:F3:2E:42:F7:18:F3:F9:77:7A:8D:FB`\n\n### Зависимости\n- [ByeDPI](https://github.com/hufrea/byedpi)\n- [hev-socks5-tunnel](https://github.com/heiher/hev-socks5-tunnel)\n"
  },
  {
    "path": "app/.gitignore",
    "content": "/build\n/debug\n/release\n*.aar\n*.jar"
  },
  {
    "path": "app/build.gradle.kts",
    "content": "import org.jetbrains.kotlin.gradle.dsl.JvmTarget\n\nplugins {\n    id(\"com.android.application\")\n    id(\"org.jetbrains.kotlin.android\")\n}\n\nval abis = setOf(\"armeabi-v7a\", \"arm64-v8a\", \"x86\", \"x86_64\")\n\nandroid {\n    namespace = \"io.github.romanvht.byedpi\"\n    compileSdk = 36\n\n    defaultConfig {\n        applicationId = \"io.github.romanvht.byedpi\"\n        minSdk = 21\n        //noinspection OldTargetApi\n        targetSdk = 34\n        versionCode = 1730\n        versionName = \"1.7.3\"\n\n        testInstrumentationRunner = \"androidx.test.runner.AndroidJUnitRunner\"\n\n        ndk {\n            abiFilters.addAll(abis)\n        }\n    }\n\n    buildFeatures {\n        buildConfig = true\n        viewBinding = true\n    }\n\n    buildTypes {\n        release {\n            buildConfigField(\"String\", \"VERSION_NAME\",  \"\\\"${defaultConfig.versionName}\\\"\")\n            proguardFiles(getDefaultProguardFile(\"proguard-android-optimize.txt\"), \"proguard-rules.pro\")\n            isMinifyEnabled = true\n            isShrinkResources = true\n        }\n        debug {\n            buildConfigField(\"String\", \"VERSION_NAME\",  \"\\\"${defaultConfig.versionName}-debug\\\"\")\n        }\n    }\n\n    compileOptions {\n        sourceCompatibility = JavaVersion.VERSION_1_8\n        targetCompatibility = JavaVersion.VERSION_1_8\n    }\n\n    kotlin {\n        compilerOptions {\n            jvmTarget.set(JvmTarget.JVM_1_8)\n        }\n    }\n\n    externalNativeBuild {\n        cmake {\n            path = file(\"src/main/cpp/CMakeLists.txt\")\n            version = \"3.22.1\"\n        }\n    }\n\n    // https://android.izzysoft.de/articles/named/iod-scan-apkchecks?lang=en#blobs\n    dependenciesInfo {\n        // Disables dependency metadata when building APKs.\n        includeInApk = false\n        // Disables dependency metadata when building Android App Bundles.\n        includeInBundle = false\n    }\n\n    splits {\n        abi {\n            isEnable = true\n            reset()\n            include(*abis.toTypedArray())\n            isUniversalApk = true\n        }\n    }\n}\n\ndependencies {\n    implementation(\"androidx.fragment:fragment-ktx:1.8.9\")\n    implementation(\"androidx.core:core-ktx:1.17.0\")\n    implementation(\"androidx.appcompat:appcompat:1.7.1\")\n    implementation(\"androidx.preference:preference-ktx:1.2.1\")\n    implementation(\"androidx.lifecycle:lifecycle-runtime-ktx:2.9.4\")\n    implementation(\"androidx.lifecycle:lifecycle-service:2.9.4\")\n    implementation(\"com.google.android.material:material:1.13.0\")\n    implementation(\"com.google.code.gson:gson:2.13.2\")\n    testImplementation(\"junit:junit:4.13.2\")\n    androidTestImplementation(\"androidx.test.ext:junit:1.3.0\")\n    androidTestImplementation(\"androidx.test.espresso:espresso-core:3.7.0\")\n}\n\ntasks.register<Exec>(\"runNdkBuild\") {\n    group = \"build\"\n\n    val ndkDir = android.ndkDirectory\n    executable = if (System.getProperty(\"os.name\").startsWith(\"Windows\", ignoreCase = true)) {\n        \"$ndkDir\\\\ndk-build.cmd\"\n    } else {\n        \"$ndkDir/ndk-build\"\n    }\n    setArgs(listOf(\n        \"NDK_PROJECT_PATH=build/intermediates/ndkBuild\",\n        \"NDK_LIBS_OUT=src/main/jniLibs\",\n        \"APP_BUILD_SCRIPT=src/main/jni/Android.mk\",\n        \"NDK_APPLICATION_MK=src/main/jni/Application.mk\"\n    ))\n\n    println(\"Command: $commandLine\")\n}\n\ntasks.preBuild {\n    dependsOn(\"runNdkBuild\")\n}\n"
  },
  {
    "path": "app/proguard-rules.pro",
    "content": "# Keep JNI methods\n-keepclasseswithmembernames class * {\n    native <methods>;\n}\n\n-keep class io.github.romanvht.byedpi.core.ByeDpiProxy { *; }\n\n-keep,allowoptimization class io.github.romanvht.byedpi.core.TProxyService { *; }\n-keep,allowoptimization class io.github.romanvht.byedpi.activities.** { *; }\n-keep,allowoptimization class io.github.romanvht.byedpi.services.** { *; }\n-keep,allowoptimization class io.github.romanvht.byedpi.receiver.** { *; }\n\n-keep class io.github.romanvht.byedpi.fragments.** {\n    <init>();\n}\n\n-keep,allowoptimization class io.github.romanvht.byedpi.data.** {\n    <fields>;\n}\n\n-keepattributes Signature\n-keepattributes *Annotation*\n\n-repackageclasses 'ru.romanvht'\n-renamesourcefileattribute ''\n-keepattributes SourceFile,InnerClasses,EnclosingMethod,Signature,RuntimeVisibleAnnotations,*Annotation*,*Parcelable*\n-allowaccessmodification\n-overloadaggressively\n-optimizationpasses 5\n-verbose\n-dontusemixedcaseclassnames\n-adaptclassstrings\n-adaptresourcefilecontents **.xml,**.json\n-adaptresourcefilenames **.xml,**.json"
  },
  {
    "path": "app/src/androidTest/java/io/github/romanvht/byedpi/ExampleInstrumentedTest.kt",
    "content": "package io.github.romanvht.byedpi\n\nimport androidx.test.platform.app.InstrumentationRegistry\nimport androidx.test.ext.junit.runners.AndroidJUnit4\n\nimport org.junit.Test\nimport org.junit.runner.RunWith\n\nimport org.junit.Assert.*\n\n/**\n * Instrumented test, which will execute on an Android device.\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\n@RunWith(AndroidJUnit4::class)\nclass ExampleInstrumentedTest {\n    @Test\n    fun useAppContext() {\n        // Context of the app under test.\n        val appContext = InstrumentationRegistry.getInstrumentation().targetContext\n        assertEquals(\"io.github.romanvht.byedpi\", appContext.packageName)\n    }\n}"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\">\n\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n    <uses-permission android:name=\"android.permission.POST_NOTIFICATIONS\" />\n    <uses-permission android:name=\"android.permission.FOREGROUND_SERVICE\" />\n    <uses-permission android:name=\"android.permission.FOREGROUND_SERVICE_SPECIAL_USE\" />\n    <uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\" />\n    <uses-permission android:name=\"android.permission.QUICKBOOT_POWERON\" />\n    <uses-permission android:name=\"android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS\" />\n    <uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>\n    <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>\n    <uses-permission android:name=\"android.permission.MANAGE_EXTERNAL_STORAGE\"\n        tools:ignore=\"ScopedStorage\" />\n    <uses-permission android:name=\"android.permission.QUERY_ALL_PACKAGES\"\n        tools:ignore=\"QueryAllPackagesPermission\" />\n    <uses-feature android:name=\"android.software.leanback\"\n        android:required=\"false\" />\n    <uses-feature android:name=\"android.hardware.touchscreen\"\n        android:required=\"false\" />\n\n    <application\n        android:allowBackup=\"true\"\n        android:dataExtractionRules=\"@xml/data_extraction_rules\"\n        android:fullBackupContent=\"@xml/backup_rules\"\n        android:logo=\"@mipmap/ic_launcher\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:roundIcon=\"@mipmap/ic_launcher_round\"\n        android:banner=\"@mipmap/ic_banner\"\n        android:label=\"@string/app_name\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/Theme.ByeDPI\"\n        android:requestLegacyExternalStorage=\"true\"\n        tools:targetApi=\"34\">\n\n        <activity\n            android:name=\".activities.MainActivity\"\n            android:exported=\"true\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n                <action android:name=\"android.service.quicksettings.action.QS_TILE_PREFERENCES\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n                <category android:name=\"android.intent.category.LEANBACK_LAUNCHER\" />\n            </intent-filter>\n        </activity>\n\n        <activity\n            android:name=\".activities.ToggleActivity\"\n            android:theme=\"@android:style/Theme.NoDisplay\"\n            android:exported=\"true\"\n            android:excludeFromRecents=\"true\"\n            android:noHistory=\"true\"\n            android:taskAffinity=\"\"\n            android:launchMode=\"singleTask\">\n        </activity>\n\n        <activity\n            android:name=\".activities.SettingsActivity\"\n            android:label=\"@string/title_settings\"\n            android:exported=\"true\"/>\n\n        <activity\n            android:name=\".activities.TestActivity\"\n            android:configChanges=\"orientation|screenSize|keyboardHidden\"\n            android:label=\"@string/title_test\"\n            android:exported=\"false\"/>\n\n        <activity\n            android:name=\".activities.TestSettingsActivity\"\n            android:label=\"@string/title_settings\"\n            android:exported=\"false\"/>\n\n        <service android:name=\".services.ByeDpiVpnService\"\n            android:permission=\"android.permission.BIND_VPN_SERVICE\"\n            android:foregroundServiceType=\"specialUse\"\n            android:exported=\"false\">\n            <intent-filter>\n                <action android:name=\"android.net.VpnService\"/>\n            </intent-filter>\n            <meta-data\n                android:name=\"android.net.VpnService.SUPPORTS_ALWAYS_ON\"\n                android:value=\"false\" />\n            <property\n                android:name=\"android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE\"\n                android:value=\"vpn\" />\n        </service>\n\n        <service android:name=\".services.ByeDpiProxyService\"\n            android:foregroundServiceType=\"specialUse\"\n            android:exported=\"false\">\n            <property\n                android:name=\"android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE\"\n                android:value=\"proxy\" />\n        </service>\n\n        <service\n            android:name=\".services.QuickTileService\"\n            android:icon=\"@drawable/ic_notification\"\n            android:label=\"@string/app_name\"\n            android:exported=\"true\"\n            android:permission=\"android.permission.BIND_QUICK_SETTINGS_TILE\">\n            <meta-data\n                android:name=\"android.service.quicksettings.TOGGLEABLE_TILE\"\n                android:value=\"true\" />\n            <intent-filter>\n                <action\n                    android:name=\"android.service.quicksettings.action.QS_TILE\"/>\n            </intent-filter>\n        </service>\n\n        <receiver\n            android:name=\".receiver.BootReceiver\"\n            android:enabled=\"true\"\n            android:exported=\"false\"\n            android:permission=\"android.permission.RECEIVE_BOOT_COMPLETED\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.BOOT_COMPLETED\" />\n                <action android:name=\"android.intent.action.QUICKBOOT_POWERON\" />\n                <action android:name=\"android.intent.action.REBOOT\" />\n                <category android:name=\"android.intent.category.DEFAULT\" />\n            </intent-filter>\n        </receiver>\n    </application>\n\n</manifest>"
  },
  {
    "path": "app/src/main/assets/proxytest_cloudflare.sites",
    "content": "cloudflare.net\ncloudflare.com\ncloudflarecn.net\ncloudflare-ech.com"
  },
  {
    "path": "app/src/main/assets/proxytest_discord.sites",
    "content": "dis.gd\ndiscord.co\ndiscord.gg\ndiscord.app\ndiscord.com\ndiscord.dev\ndiscord.new\ndiscord.gift\ndiscord.gifts\ndiscord.media\ndiscord.store\ndiscord.design\ndiscordapp.com\ndiscordcdn.com\ndiscordsez.com\ndiscordsays.com\ndiscordmerch.com\ndiscordpartygames.com\ndiscordactivities.com\nstable.dl2.discordapp.net\ndiscord-attachments-uploads-prd.storage.googleapis.com"
  },
  {
    "path": "app/src/main/assets/proxytest_general.sites",
    "content": "rutracker.org\nnyaa.si\nrutor.org\nnnmclub.to\nspeedtest.net\nookla.com"
  },
  {
    "path": "app/src/main/assets/proxytest_googlevideo.sites",
    "content": "rr1---sn-4axm-n8vs.googlevideo.com\nrr1---sn-gvnuxaxjvh-o8ge.googlevideo.com\nrr1---sn-ug5onuxaxjvh-p3ul.googlevideo.com\nrr1---sn-ug5onuxaxjvh-n8v6.googlevideo.com\nrr4---sn-q4flrnsl.googlevideo.com\nrr10---sn-gvnuxaxjvh-304z.googlevideo.com\nrr14---sn-n8v7kn7r.googlevideo.com\nrr16---sn-axq7sn76.googlevideo.com\nrr1---sn-8ph2xajvh-5xge.googlevideo.com\nrr1---sn-gvnuxaxjvh-5gie.googlevideo.com\nrr12---sn-gvnuxaxjvh-bvwz.googlevideo.com\nrr5---sn-n8v7knez.googlevideo.com\nrr1---sn-u5uuxaxjvhg0-ocje.googlevideo.com\nrr2---sn-q4fl6ndl.googlevideo.com\nrr5---sn-gvnuxaxjvh-n8vk.googlevideo.com\nrr4---sn-jvhnu5g-c35d.googlevideo.com\nrr1---sn-q4fl6n6y.googlevideo.com\nrr2---sn-hgn7ynek.googlevideo.com\nrr1---sn-xguxaxjvh-gufl.googlevideo.com"
  },
  {
    "path": "app/src/main/assets/proxytest_social.sites",
    "content": "snapchat.com\nsnap.com\nlinkedin.com\nfacebook.com\nfb.com\nfb.me\nfbcdn.net\nmessenger.com\nmeta.com\ninstagram.com\nstatic.cdninstagram.com\nproton.me\nmedium.com\nx.com\ntwitter.com\nsoundcloud.com\ntelegram.org\nwhatsapp.com"
  },
  {
    "path": "app/src/main/assets/proxytest_strategies.list",
    "content": "-f-200 -Qr -s3:5+sm -a1 -As -d1 -s4+sm -s8+sh -f-300 -d6+sh -a1 -At,r,s -o2 -f-30 -As -r5 -Mh -r6+sh -f-250 -s2:7+s -s3:6+sm -a1 -At,r,s -s3:5+sm -s6+s -s7:9+s -q30+sm -a1\n-d1 -d3+s -s6+s -d9+s -s12+s -d15+s -s20+s -d25+s -s30+s -d35+s -r1+s -S -a1 -As -d1 -d3+s -s6+s -d9+s -s12+s -d15+s -s20+s -d25+s -s30+s -d35+s -S -a1\n-q2 -s2 -s3+s -r3 -s4 -r4 -s5+s -r5+s -s6 -s7+s -r8 -s9+s -Qr -Mh,d,r -a1 -At,r -s2+s -r2 -d2 -s3 -r3 -r4 -s4 -d5+s -r5 -d6 -s7+s -d7 -a1\n-o1 -d1 -a1 -At,r,s -s1 -d1 -s5+s -s10+s -s15+s -s20+s -r1+s -S -a1 -As -s1 -d1 -s5+s -s10+s -s15+s -s20+s -S -a1\n-n {sni} -Qr -f-204 -s1:5+sm -a1 -As -d1 -s3+s -s5+s -q7 -a1 -As -o2 -f-43 -a1 -As -r5 -Mh -s1:5+s -s3:7+sm -a1\n-n {sni} -Qr -f-205 -a1 -As -s1:3+sm -a1 -As -s5:8+sm -a1 -As -d3 -q7 -o2 -f-43 -f-85 -f-165 -r5 -Mh -a1\n-d1+s -s50+s -a1 -As -f20 -r2+s -a1 -At -d2 -s1+s -s5+s -s10+s -s15+s -s25+s -s35+s -s50+s -s60+s -a1\n-o1 -a1 -At,r,s -f-1 -a1 -At,r,s -d1:11+sm -S -a1 -At,r,s -n {sni} -Qr -f1 -d1:11+sm -s1:11+sm -S -a1\n-d1 -s1 -q1 -Y -a1 -Ar -s5 -o1+s -d3+s -s6+s -d9+s -s12+s -d15+s -s20+s -d25+s -s30+s -d35+s -a1\n-f1+nme -t6 -a1 -As -n {sni} -Qr -s1:6+sm -a1 -As -s5:12+sm -a1 -As -d3 -q7 -r6 -Mh -a1\n-s1 -o1 -a1 -Y -Ar -s5 -o1+s -a1 -At -f-1 -r1+s -a1 -As -s1 -o1+s -s-1 -a1\n-s1 -d1 -a1 -Y -Ar -d5 -o1+s -a1 -At -f-1 -r1+s -a1 -As -d1 -o1+s -s-1 -a1\n-d1 -s1+s -d3+s -s6+s -d9+s -s12+s -d15+s -s20+s -d25+s -s30+s -d35+s -a1\n-s1 -q1 -a1 -Y -Ar -a1 -s5 -o2 -At -f-1 -r1+s -a1 -As -s1 -o1+s -s-1 -a1\n-s1 -q1 -a1 -Ar -s5 -o1+s -a1 -At -f-1 -d1+s -a1 -As -s1 -o1+s -s-1 -a1\n-s1 -q1 -a1 -Ar -s5 -o2 -a1 -At -f-1 -r1+s -a1 -As -s1 -o1+s -s-1 -a1\n-d1 -s1+s -d1+s -s3+s -d6+s -s12+s -d14+s -s20+s -d24+s -s30+s -a1\n-s1 -q1 -a1 -Y -At -a1 -S -f-1 -r1+s -a1 -As -d1+s -O1 -s29+s -a1\n-o1 -a1 -At,r,s -f-1 -a1 -Ar,s -o1 -a1 -At -r1+s -f-1 -t6 -a1\n-d1 -s1+s -s3+s -s6+s -s9+s -s12+s -s15+s -s20+s -s30+s -a1\n-f1 -t5 -n {sni} -q3+h -Qr -f2 -q1 -r1+s -t15 -q1 -o2 -a1\n-n {sni} -d2:5:2+h -f-3 -r2+sm -o2 -o50+s -r2+s -f-4 -a1\n-r-1+s -o20+sm -s3:7+sm -d5:3+sm -f300+s -Qr -Y -f-1 -a1\n-f-1 -Qr -s1+sm -d3+s -s5+sm -o2 -a1 -As -r1+s -d8+s -a1\n-s25 -r5+s -s25+s -a1 -At,r,s -s50 -r5+s -s50+s -a1\n-o1 -r-5+se -a1 -At,r,s -d1 -n {sni} -Qr -f-1 -a1\n-s1 -d1 -r1+s -a1 -Ar -o1 -a1 -At -f-1 -r1+s -a1\n-s1 -q1 -r1+s -a1 -Ar -o1 -a1 -At -f-1 -r1+s -a1\n-s1 -o1 -r1+s -a1 -Ar -o1 -a1 -At -f-1 -r1+s -a1\n-n {sni} -Qr -f6+nr -d2 -d11 -f9+hm -o3 -t7 -a1\n-s1 -d1 -o1 -a1 -Ar -o3 -a1 -At -f-1 -r1+s -a1\n-d9+s -q20+s -s25+s -t5 -a1 -At,r,s -r1+h -a1\n-q1+s -s29+s -s30+s -s14+s -o5+s -f-1 -S -a1\n-d1 -s1+s -r1+s -e1 -m1 -o1+s -f-1 -t2 -a1\n-d9+s -q20+s -s 25+s -t5 -At,r,s -r1+h -a1\n-s1 -o1 -a1 -Ar -o1 -a1 -At -f-1 -r1+s -a1\n-d1 -o1 -a1 -Ar -o1 -a1 -At -f-1 -r1+s -a1\n-d1 -s4 -d8 -s1+s -d5+s -s10+s -d20+s -a1\n-n {sni} -Qr -d5+sm -f3+sm -o2 -t4 -a1\n-o1 -a1 -Ar -q1 -a1 -At -f-1 -r1+s -a1\n-q1 -a1 -Ar -o1 -a1 -At -f-1 -r1+s -a1\n-s1 -q1 -Y -a1 -At,r,s -f-1 -r1+s -a1\n-s1 -o1 -Y -a1 -At,r,s -f-1 -r1+s -a1\n-s1 -d1 -Y -a1 -At,r,s -f-1 -r1+s -a1\n-n {sni} -Qr -f209 -s1+sm -R1-3 -a1\n-s1 -q1 -a1 -At,r,s -f-1 -r1+s -a1\n-s1 -o1 -a1 -At,r,s -f-1 -r1+s -a1\n-s1 -d1 -a1 -At,r,s -f-1 -r1+s -a1\n-s4+sn -r9+s -Qr -n {sni} -S -a1\n-n {sni} -Qr -m0x02 -f-1 -d7 -a1\n-o1 -d1 -r1+s -S -s1+s -d3+s -a1\n-d1 -r1+s -f-1 -S -t8 -o3+s -a1\n-q1+s -s29+s -o5+s -f-1 -S -a1\n-d1 -s1+s -r1+s -f-1 -t8 -a1\n-o1 -a1 -An -f1+nme -t6 -a1\n-n {sni} -Qr -f-1 -r1+s -a1\n-n {sni} -Qr -d1:3 -f-1 -a1\n-s1 -d3+s -a1 -At -r1+s -a1\n-o1 -a1 -At,r,s -d1 -a1\n-q1 -a1 -At,r,s -d1 -a1\n-n {sni} -Qr -d1 -f-1\n-d1+s -o2 -s5 -r5 -a1\n-r8 -o2 -s7 -q4+s -a1\n-d6+s -q4+hm -o2 -a1\n-s1+s -d3+s -a1\n-s1 -f-1 -S -a1\n-o1+s -d3+s -a1\n-o1 -s4 -s6 -a1\n-q1 -r25+s -a1\n-d1 -s3+s -a1\n-o3 -d7 -a1\n-d7 -s2 -a1"
  },
  {
    "path": "app/src/main/assets/proxytest_youtube.sites",
    "content": "youtu.be\nyoutube.com\ni.ytimg.com\ni9.ytimg.com\nyt3.ggpht.com\nyt4.ggpht.com\ngoogleapis.com\njnn-pa.googleapis.com\ngoogleusercontent.com\nsignaler-pa.youtube.com\nyoutubei.googleapis.com\nmanifest.googlevideo.com\nyt3.googleusercontent.com"
  },
  {
    "path": "app/src/main/cpp/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.22.1)\n\nproject(byedpi_native)\n\nfile(GLOB BYE_DPI_SRC byedpi/*.c)\nlist(REMOVE_ITEM BYE_DPI_SRC ${CMAKE_CURRENT_SOURCE_DIR}/byedpi/win_service.c)\n\nadd_library(byedpi SHARED ${BYE_DPI_SRC} native-lib.c)\ntarget_include_directories(byedpi PRIVATE byedpi)\n\ntarget_compile_options(byedpi PRIVATE -std=c99 -O2 -Wall -Wno-unused -Wextra -Wno-unused-parameter -pedantic)\ntarget_compile_definitions(byedpi PRIVATE ANDROID_APP)\n\ntarget_link_libraries(byedpi PRIVATE android log)\n"
  },
  {
    "path": "app/src/main/cpp/main.h",
    "content": "void clear_params(char *line, char **argv);\nint main(int argc, char **argv);\n"
  },
  {
    "path": "app/src/main/cpp/native-lib.c",
    "content": "#include <string.h>\n\n#include <jni.h>\n#include <getopt.h>\n#include <signal.h>\n#include <setjmp.h>\n#include <stdlib.h>\n\n#include \"byedpi/error.h\"\n#include \"main.h\"\n\nextern int server_fd;\nstatic int g_proxy_running = 0;\n\nstruct params default_params = {\n        .await_int = 10,\n        .ipv6 = 1,\n        .resolve = 1,\n        .udp = 1,\n        .max_open = 512,\n        .bfsize = 16384,\n        .baddr = {\n            .in6 = { .sin6_family = AF_INET6 }\n        },\n        .laddr = {\n            .in = { .sin_family = AF_INET }\n        },\n        .debug = 0\n};\n\nvoid reset_params(void) {\n    clear_params(NULL, NULL);\n    params = default_params;\n}\n\nJNIEXPORT jint JNICALL\nJava_io_github_romanvht_byedpi_core_ByeDpiProxy_jniStartProxy(JNIEnv *env, __attribute__((unused)) jobject thiz, jobjectArray args) {\n    if (g_proxy_running) {\n        LOG(LOG_S, \"proxy already running\");\n        return -1;\n    }\n\n    int argc = (*env)->GetArrayLength(env, args);\n    char **argv = calloc(argc, sizeof(char *));\n\n    if (!argv) {\n        LOG(LOG_S, \"failed to allocate memory for argv\");\n        return -1;\n    }\n\n    for (int i = 0; i < argc; i++) {\n        jstring arg = (jstring) (*env)->GetObjectArrayElement(env, args, i);\n\n        if (!arg) {\n            argv[i] = NULL;\n            continue;\n        }\n\n        const char *arg_str = (*env)->GetStringUTFChars(env, arg, 0);\n        argv[i] = arg_str ? strdup(arg_str) : NULL;\n\n        if (arg_str) (*env)->ReleaseStringUTFChars(env, arg, arg_str);\n\n        (*env)->DeleteLocalRef(env, arg);\n    }\n    \n    LOG(LOG_S, \"starting proxy with %d args\", argc);\n    reset_params();\n    g_proxy_running = 1;\n    optind = 1;\n\n    int result = main(argc, argv);\n\n    LOG(LOG_S, \"proxy return code %d\", result);\n    g_proxy_running = 0;\n\n    for (int i = 0; i < argc; i++) free(argv[i]);\n    free(argv);\n\n    return result;\n}\n\nJNIEXPORT jint JNICALL\nJava_io_github_romanvht_byedpi_core_ByeDpiProxy_jniStopProxy(__attribute__((unused)) JNIEnv *env, __attribute__((unused)) jobject thiz) {\n    LOG(LOG_S, \"send shutdown to proxy\");\n\n    if (!g_proxy_running) {\n        LOG(LOG_S, \"proxy is not running\");\n        return -1;\n    }\n\n    shutdown(server_fd, SHUT_RDWR);\n    g_proxy_running = 0;\n\n    return 0;\n}\n\nJNIEXPORT jint JNICALL\nJava_io_github_romanvht_byedpi_core_ByeDpiProxy_jniForceClose(__attribute__((unused)) JNIEnv *env, __attribute__((unused)) jobject thiz) {\n    LOG(LOG_S, \"closing server socket (fd: %d)\", server_fd);\n\n    if (close(server_fd) == -1) {\n        LOG(LOG_S, \"failed to close server socket (fd: %d)\", server_fd);\n        return -1;\n    }\n\n    LOG(LOG_S, \"proxy socket force close\");\n    g_proxy_running = 0;\n\n    return 0;\n}\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/activities/BaseActivity.kt",
    "content": "package io.github.romanvht.byedpi.activities\n\nimport android.os.Build\nimport android.os.Bundle\nimport androidx.appcompat.app.AppCompatActivity\nimport com.google.android.material.color.DynamicColors\nimport io.github.romanvht.byedpi.utility.SettingsUtils\nimport io.github.romanvht.byedpi.utility.getPreferences\nimport io.github.romanvht.byedpi.utility.getStringNotNull\n\nabstract class BaseActivity : AppCompatActivity() {\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        val prefs = getPreferences()\n\n        val lang = prefs.getStringNotNull(\"language\", \"system\")\n        SettingsUtils.setLang(lang)\n\n        val theme = prefs.getStringNotNull(\"app_theme\", \"system\")\n        SettingsUtils.setTheme(theme)\n\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {\n            DynamicColors.applyToActivityIfAvailable(this)\n        }\n\n        super.onCreate(savedInstanceState)\n    }\n\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/activities/MainActivity.kt",
    "content": "package io.github.romanvht.byedpi.activities\n\nimport android.Manifest\nimport android.annotation.SuppressLint\nimport android.content.BroadcastReceiver\nimport android.content.Context\nimport android.content.Intent\nimport android.content.IntentFilter\nimport android.content.pm.PackageManager\nimport android.net.VpnService\nimport android.os.Build\nimport android.os.Bundle\nimport android.util.Log\nimport android.view.Menu\nimport android.view.MenuItem\nimport android.view.View\nimport android.widget.Toast\nimport androidx.activity.result.contract.ActivityResultContracts\nimport androidx.core.content.ContextCompat\nimport androidx.lifecycle.lifecycleScope\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.data.*\nimport io.github.romanvht.byedpi.databinding.ActivityMainBinding\nimport io.github.romanvht.byedpi.services.ServiceManager\nimport io.github.romanvht.byedpi.services.appStatus\nimport io.github.romanvht.byedpi.utility.*\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.launch\nimport java.io.IOException\nimport kotlin.system.exitProcess\nimport androidx.core.content.edit\n\nclass MainActivity : BaseActivity() {\n    private lateinit var binding: ActivityMainBinding\n\n    companion object {\n        private val TAG: String = MainActivity::class.java.simpleName\n        private const val BATTERY_OPTIMIZATION_REQUESTED = \"battery_optimization_requested\"\n\n        private fun collectLogs(): String? =\n            try {\n                Runtime.getRuntime()\n                    .exec(\"logcat *:D -d\")\n                    .inputStream.bufferedReader()\n                    .use { it.readText() }\n            } catch (e: Exception) {\n                Log.e(TAG, \"Failed to collect logs\", e)\n                null\n            }\n    }\n\n    private val vpnRegister =\n        registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {\n            if (it.resultCode == RESULT_OK) {\n                ServiceManager.start(this, Mode.VPN)\n            } else {\n                Toast.makeText(this, R.string.vpn_permission_denied, Toast.LENGTH_SHORT).show()\n                updateStatus()\n            }\n        }\n\n    private val logsRegister =\n        registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { log ->\n            lifecycleScope.launch(Dispatchers.IO) {\n                val logs = collectLogs()\n\n                if (logs == null) {\n                    Toast.makeText(\n                        this@MainActivity,\n                        R.string.logs_failed,\n                        Toast.LENGTH_SHORT\n                    ).show()\n                } else {\n                    val uri = log.data?.data ?: run {\n                        Log.e(TAG, \"No data in result\")\n                        return@launch\n                    }\n                    contentResolver.openOutputStream(uri)?.use {\n                        try {\n                            it.write(logs.toByteArray())\n                        } catch (e: IOException) {\n                            Log.e(TAG, \"Failed to save logs\", e)\n                        }\n                    } ?: run {\n                        Log.e(TAG, \"Failed to open output stream\")\n                    }\n                }\n            }\n        }\n\n    private val receiver = object : BroadcastReceiver() {\n        override fun onReceive(context: Context?, intent: Intent?) {\n            Log.d(TAG, \"Received intent: ${intent?.action}\")\n\n            if (intent == null) {\n                Log.w(TAG, \"Received null intent\")\n                return\n            }\n\n            val senderOrd = intent.getIntExtra(SENDER, -1)\n            val sender = Sender.entries.getOrNull(senderOrd)\n            if (sender == null) {\n                Log.w(TAG, \"Received intent with unknown sender: $senderOrd\")\n                return\n            }\n\n            when (val action = intent.action) {\n                STARTED_BROADCAST,\n                STOPPED_BROADCAST -> updateStatus()\n\n                FAILED_BROADCAST -> {\n                    Toast.makeText(\n                        context,\n                        getString(R.string.failed_to_start, sender.name),\n                        Toast.LENGTH_SHORT,\n                    ).show()\n                    updateStatus()\n                }\n\n                else -> Log.w(TAG, \"Unknown action: $action\")\n            }\n        }\n    }\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n\n        binding = ActivityMainBinding.inflate(layoutInflater)\n        setContentView(binding.root)\n\n        val intentFilter = IntentFilter().apply {\n            addAction(STARTED_BROADCAST)\n            addAction(STOPPED_BROADCAST)\n            addAction(FAILED_BROADCAST)\n        }\n\n        @SuppressLint(\"UnspecifiedRegisterReceiverFlag\")\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {\n            registerReceiver(receiver, intentFilter, RECEIVER_EXPORTED)\n        } else {\n            registerReceiver(receiver, intentFilter)\n        }\n\n        binding.statusButtonCard.setOnClickListener {\n            binding.statusButtonCard.isClickable = false\n\n            val (status, _) = appStatus\n            when (status) {\n                AppStatus.Halted -> start()\n                AppStatus.Running -> stop()\n            }\n\n            binding.statusButtonCard.postDelayed({\n                binding.statusButtonCard.isClickable = true\n            }, 1000)\n        }\n\n        binding.statusButtonCard.setOnFocusChangeListener { _, hasFocus ->\n            if (hasFocus) {\n                binding.statusButtonCard.strokeWidth = 10\n                binding.statusButtonCard.strokeColor = android.graphics.Color.argb(100, 0, 0, 0)\n            } else {\n                binding.statusButtonCard.strokeWidth = 0\n            }\n        }\n\n        binding.settingsButton.setOnClickListener {\n            val (status, _) = appStatus\n\n            if (status == AppStatus.Halted) {\n                val intent = Intent(this, SettingsActivity::class.java)\n                startActivity(intent)\n            } else {\n                Toast.makeText(this, R.string.settings_unavailable, Toast.LENGTH_SHORT).show()\n            }\n        }\n\n        binding.editorButton.setOnClickListener {\n            val useCmdSettings = getPreferences().getBoolean(\"byedpi_enable_cmd_settings\", false)\n\n            if (!useCmdSettings && appStatus.first == AppStatus.Running) {\n                Toast.makeText(this, R.string.settings_unavailable, Toast.LENGTH_SHORT).show()\n                return@setOnClickListener\n            }\n\n            val intent = Intent(this, SettingsActivity::class.java)\n            intent.putExtra(\"open_fragment\", if (useCmdSettings) \"cmd\" else \"ui\")\n            startActivity(intent)\n        }\n\n        binding.testProxyButton.setOnClickListener {\n            startActivity(Intent(this, TestActivity::class.java))\n        }\n\n        binding.domainListsButton.setOnClickListener {\n            val intent = Intent(this, TestSettingsActivity::class.java)\n            intent.putExtra(\"open_fragment\", \"domain_lists\")\n            startActivity(intent)\n        }\n\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU &&\n            ContextCompat.checkSelfPermission(this, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {\n            requestPermissions(arrayOf(Manifest.permission.POST_NOTIFICATIONS), 1)\n        } else {\n            requestBatteryOptimization()\n        }\n\n        if (getPreferences().getBoolean(\"auto_connect\", false) && appStatus.first != AppStatus.Running) {\n            this.start()\n        }\n\n        ShortcutUtils.update(this)\n    }\n\n    override fun onResume() {\n        super.onResume()\n        updateStatus()\n        updateButtonsVisibility()\n    }\n\n    override fun onDestroy() {\n        super.onDestroy()\n        unregisterReceiver(receiver)\n    }\n\n    override fun onRequestPermissionsResult(\n        requestCode: Int,\n        permissions: Array<out String>,\n        grantResults: IntArray\n    ) {\n        super.onRequestPermissionsResult(requestCode, permissions, grantResults)\n\n        if (requestCode == 1) {\n            requestBatteryOptimization()\n        }\n    }\n\n    override fun onCreateOptionsMenu(menu: Menu?): Boolean {\n        menuInflater.inflate(R.menu.menu_main, menu)\n        return true\n    }\n\n    override fun onOptionsItemSelected(item: MenuItem): Boolean {\n        val (status, _) = appStatus\n\n        return when (item.itemId) {\n            R.id.action_save_logs -> {\n                val intent =\n                    Intent(Intent.ACTION_CREATE_DOCUMENT).apply {\n                        addCategory(Intent.CATEGORY_OPENABLE)\n                        type = \"text/plain\"\n                        putExtra(Intent.EXTRA_TITLE, \"byedpi.log\")\n                    }\n\n                logsRegister.launch(intent)\n                true\n            }\n\n            R.id.action_close_app -> {\n                if (status == AppStatus.Running) stop()\n                finishAffinity()\n                android.os.Process.killProcess(android.os.Process.myPid())\n                exitProcess(0)\n            }\n\n            else -> super.onOptionsItemSelected(item)\n        }\n    }\n\n    private fun start() {\n        when (getPreferences().mode()) {\n            Mode.VPN -> {\n                val intentPrepare = VpnService.prepare(this)\n                if (intentPrepare != null) {\n                    vpnRegister.launch(intentPrepare)\n                } else {\n                    ServiceManager.start(this, Mode.VPN)\n                }\n            }\n\n            Mode.Proxy -> ServiceManager.start(this, Mode.Proxy)\n        }\n    }\n\n    private fun stop() {\n        ServiceManager.stop(this)\n    }\n\n    private fun updateStatus() {\n        val (status, mode) = appStatus\n\n        Log.i(TAG, \"Updating status: $status, $mode\")\n\n        val preferences = getPreferences()\n        val (ip, port) = preferences.getProxyIpAndPort()\n\n        binding.proxyAddress.text = getString(R.string.proxy_address, ip, port)\n\n        when (status) {\n            AppStatus.Halted -> {\n                val typedValue = android.util.TypedValue()\n                theme.resolveAttribute(android.R.attr.colorPrimary, typedValue,true)\n                binding.statusButtonCard.setCardBackgroundColor(typedValue.data)\n                binding.statusButtonIcon.clearColorFilter()\n\n                when (preferences.mode()) {\n                    Mode.VPN -> {\n                        binding.statusText.setText(R.string.vpn_disconnected)\n                    }\n\n                    Mode.Proxy -> {\n                        binding.statusText.setText(R.string.proxy_down)\n                    }\n                }\n            }\n\n            AppStatus.Running -> {\n                binding.statusButtonCard.setCardBackgroundColor(ContextCompat.getColor(this, R.color.green_active))\n                binding.statusButtonIcon.setColorFilter(ContextCompat.getColor(this, android.R.color.white))\n\n                when (mode) {\n                    Mode.VPN -> {\n                        binding.statusText.setText(R.string.vpn_connected)\n                    }\n\n                    Mode.Proxy -> {\n                        binding.statusText.setText(R.string.proxy_up)\n                    }\n                }\n            }\n        }\n    }\n\n    private fun updateButtonsVisibility() {\n        val useCmdSettings = getPreferences().getBoolean(\"byedpi_enable_cmd_settings\", false)\n        val visibility = if (useCmdSettings) View.VISIBLE else View.GONE\n        binding.cmdButtonsRow.visibility = visibility\n    }\n\n    private fun requestBatteryOptimization() {\n        val preferences = getPreferences()\n        val alreadyRequested = preferences.getBoolean(BATTERY_OPTIMIZATION_REQUESTED, false)\n\n        if (!alreadyRequested && !BatteryUtils.isOptimizationDisabled(this)) {\n            BatteryUtils.requestBatteryOptimization(this)\n            preferences.edit { putBoolean(BATTERY_OPTIMIZATION_REQUESTED, true) }\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/activities/SettingsActivity.kt",
    "content": "package io.github.romanvht.byedpi.activities\n\nimport android.os.Bundle\nimport android.view.Menu\nimport android.view.MenuItem\nimport androidx.activity.result.contract.ActivityResultContracts\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.fragments.ByeDpiCMDSettingsFragment\nimport io.github.romanvht.byedpi.fragments.ByeDpiUISettingsFragment\nimport io.github.romanvht.byedpi.fragments.MainSettingsFragment\nimport io.github.romanvht.byedpi.utility.SettingsUtils\nimport io.github.romanvht.byedpi.utility.getPreferences\nimport androidx.core.content.edit\n\nclass SettingsActivity : BaseActivity() {\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_settings)\n\n        val openFragment = intent.getStringExtra(\"open_fragment\")\n\n        when (openFragment) {\n            \"cmd\" -> {\n                supportFragmentManager\n                    .beginTransaction()\n                    .replace(R.id.settings, ByeDpiCMDSettingsFragment())\n                    .commit()\n            }\n            \"ui\" -> {\n                supportFragmentManager\n                    .beginTransaction()\n                    .replace(R.id.settings, ByeDpiUISettingsFragment())\n                    .commit()\n            }\n            else -> {\n                supportFragmentManager\n                    .beginTransaction()\n                    .replace(R.id.settings, MainSettingsFragment())\n                    .commit()\n            }\n        }\n\n        supportActionBar?.setDisplayHomeAsUpEnabled(true)\n    }\n\n    override fun onCreateOptionsMenu(menu: Menu?): Boolean {\n        menuInflater.inflate(R.menu.menu_settings, menu)\n        return true\n    }\n\n    override fun onOptionsItemSelected(item: MenuItem): Boolean = when (item.itemId) {\n        android.R.id.home -> {\n            onBackPressedDispatcher.onBackPressed()\n            true\n        }\n\n        R.id.action_reset_settings -> {\n            val prefs = getPreferences()\n            prefs.edit { clear() }\n            recreate()\n            true\n        }\n\n        R.id.action_export_settings -> {\n            val fileName = \"bbd_${System.currentTimeMillis().toReadableDateTime()}.json\"\n            exportSettingsLauncher.launch(fileName)\n            true\n        }\n\n        R.id.action_import_settings -> {\n            importSettingsLauncher.launch(arrayOf(\"application/json\"))\n            true\n        }\n\n        else -> super.onOptionsItemSelected(item)\n    }\n\n    private val exportSettingsLauncher = registerForActivityResult(\n        ActivityResultContracts.CreateDocument(\"application/json\")\n    ) { uri ->\n        uri?.let {\n            SettingsUtils.exportSettings(this, it)\n        }\n    }\n\n    private val importSettingsLauncher = registerForActivityResult(\n        ActivityResultContracts.OpenDocument()\n    ) { uri ->\n        uri?.let {\n            SettingsUtils.importSettings(this, it) {\n                recreate()\n            }\n        }\n    }\n\n    private fun Long.toReadableDateTime(): String {\n        val format = java.text.SimpleDateFormat(\"yyyyMMdd_HHmm\", java.util.Locale.getDefault())\n        return format.format(this)\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/activities/TestActivity.kt",
    "content": "package io.github.romanvht.byedpi.activities\n\nimport android.content.Intent\nimport android.net.VpnService\nimport android.os.Bundle\nimport android.view.Menu\nimport android.view.MenuItem\nimport android.view.View\nimport android.view.WindowManager\nimport android.widget.Button\nimport android.widget.TextView\nimport android.widget.Toast\nimport androidx.activity.OnBackPressedCallback\nimport androidx.lifecycle.lifecycleScope\nimport androidx.recyclerview.widget.LinearLayoutManager\nimport androidx.recyclerview.widget.RecyclerView\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.adapters.StrategyResultAdapter\nimport io.github.romanvht.byedpi.data.Mode\nimport io.github.romanvht.byedpi.data.AppStatus\nimport io.github.romanvht.byedpi.data.SiteResult\nimport io.github.romanvht.byedpi.data.StrategyResult\nimport io.github.romanvht.byedpi.services.appStatus\nimport io.github.romanvht.byedpi.services.ServiceManager\nimport io.github.romanvht.byedpi.utility.HistoryUtils\nimport io.github.romanvht.byedpi.utility.getPreferences\nimport io.github.romanvht.byedpi.utility.SiteCheckUtils\nimport io.github.romanvht.byedpi.utility.getIntStringNotNull\nimport io.github.romanvht.byedpi.utility.getLongStringNotNull\nimport androidx.core.content.edit\nimport io.github.romanvht.byedpi.utility.getStringNotNull\nimport com.google.gson.Gson\nimport com.google.gson.reflect.TypeToken\nimport io.github.romanvht.byedpi.utility.DomainListUtils\nimport io.github.romanvht.byedpi.utility.mode\nimport kotlinx.coroutines.*\nimport java.io.File\n\nclass TestActivity : BaseActivity() {\n\n    private lateinit var strategiesRecyclerView: RecyclerView\n    private lateinit var progressTextView: TextView\n    private lateinit var disclaimerTextView: TextView\n    private lateinit var startStopButton: Button\n    private lateinit var strategyAdapter: StrategyResultAdapter\n\n    private lateinit var siteChecker: SiteCheckUtils\n    private lateinit var cmdHistoryUtils: HistoryUtils\n    private lateinit var sites: List<String>\n    private lateinit var cmds: List<String>\n\n    private var savedCmd: String = \"\"\n    private var testJob: Job? = null\n    private val strategies = mutableListOf<StrategyResult>()\n    private val gson = Gson()\n\n    private var isTesting: Boolean\n        get() = prefs.getBoolean(\"is_test_running\", false)\n        set(value) {\n            prefs.edit(commit = true) { putBoolean(\"is_test_running\", value) }\n        }\n\n    private val prefs by lazy { getPreferences() }\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_proxy_test)\n\n        val ip = prefs.getStringNotNull(\"byedpi_proxy_ip\", \"127.0.0.1\")\n        val port = prefs.getIntStringNotNull(\"byedpi_proxy_port\", 1080)\n\n        siteChecker = SiteCheckUtils(ip, port)\n        cmdHistoryUtils = HistoryUtils(this)\n\n        strategiesRecyclerView = findViewById(R.id.strategiesRecyclerView)\n        startStopButton = findViewById(R.id.startStopButton)\n        progressTextView = findViewById(R.id.progressTextView)\n        disclaimerTextView = findViewById(R.id.disclaimerTextView)\n\n        strategyAdapter = StrategyResultAdapter(this,\n            onApply = { command ->\n                addToHistory(command)\n            }\n        )\n\n        strategiesRecyclerView.layoutManager = LinearLayoutManager(this)\n        strategiesRecyclerView.adapter = strategyAdapter\n\n        lifecycleScope.launch {\n            val previousResults = loadResults()\n\n            if (previousResults.isNotEmpty()) {\n                progressTextView.text = getString(R.string.test_complete)\n                disclaimerTextView.visibility = View.GONE\n\n                strategies.clear()\n                strategies.addAll(previousResults)\n\n                strategyAdapter.updateStrategies(strategies)\n            }\n\n            if (isTesting) {\n                progressTextView.text = getString(R.string.test_proxy_error)\n                disclaimerTextView.text = getString(R.string.test_crash)\n                disclaimerTextView.visibility = View.VISIBLE\n                isTesting = false\n            }\n        }\n\n        startStopButton.setOnClickListener {\n            startStopButton.isClickable = false\n\n            if (isTesting) {\n                stopTesting()\n            } else {\n                startTesting()\n            }\n\n            startStopButton.postDelayed({ startStopButton.isClickable = true }, 1000)\n        }\n\n        onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) {\n            override fun handleOnBackPressed() {\n                if (isTesting) {\n                    stopTesting()\n                } else {\n                    if (appStatus.first == AppStatus.Running) {\n                        val intent = Intent(this@TestActivity, MainActivity::class.java)\n                        intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP\n                        startActivity(intent)\n                    }\n                }\n\n                finish()\n            }\n        })\n\n        supportActionBar?.setDisplayHomeAsUpEnabled(true)\n    }\n\n    override fun onCreateOptionsMenu(menu: Menu?): Boolean {\n        menuInflater.inflate(R.menu.menu_test, menu)\n        return true\n    }\n\n    override fun onOptionsItemSelected(item: MenuItem): Boolean {\n        return when (item.itemId) {\n            R.id.action_settings -> {\n                if (!isTesting) {\n                    val intent = Intent(this, TestSettingsActivity::class.java)\n                    startActivity(intent)\n                } else {\n                    Toast.makeText(this, R.string.settings_unavailable, Toast.LENGTH_SHORT).show()\n                }\n                true\n            }\n            android.R.id.home -> {\n                onBackPressedDispatcher.onBackPressed()\n                true\n            }\n            else -> super.onOptionsItemSelected(item)\n        }\n    }\n\n    private suspend fun waitForProxyStatus(statusNeeded: AppStatus): Boolean {\n        val startTime = System.currentTimeMillis()\n        while (System.currentTimeMillis() - startTime < 3000) {\n            if (appStatus.first == statusNeeded) {\n                delay(500)\n                return true\n            }\n            delay(100)\n        }\n        return false\n    }\n\n    private suspend fun isProxyRunning(): Boolean = withContext(Dispatchers.IO) {\n        appStatus.first == AppStatus.Running\n    }\n\n    private fun updateCmdArgs(cmd: String) {\n        prefs.edit(commit = true) { putString(\"byedpi_cmd_args\", cmd) }\n    }\n\n    private fun startTesting() {\n        sites = loadSites()\n        cmds = loadCmds()\n\n        if (sites.isEmpty()) {\n            Toast.makeText(this, R.string.test_settings_domain_empty, Toast.LENGTH_LONG).show()\n            return\n        }\n\n        testJob = lifecycleScope.launch(Dispatchers.IO) {\n            isTesting = true\n            savedCmd = prefs.getString(\"byedpi_cmd_args\", \"\").orEmpty()\n\n            strategies.clear()\n            strategies.addAll(cmds.map { StrategyResult(command = it) })\n\n            withContext(Dispatchers.Main) {\n                disclaimerTextView.visibility = View.GONE\n\n                window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)\n                startStopButton.text = getString(R.string.test_stop)\n                progressTextView.text = \"\"\n\n                strategyAdapter.setTestingState(true)\n                strategyAdapter.updateStrategies(strategies, sortByPercentage = false)\n            }\n\n            if (isProxyRunning()) {\n                ServiceManager.stop(this@TestActivity)\n                waitForProxyStatus(AppStatus.Halted)\n            }\n\n            val delaySec = prefs.getIntStringNotNull(\"byedpi_proxytest_delay\", 1)\n            val requestsCount = prefs.getIntStringNotNull(\"byedpi_proxytest_requests\", 1)\n            val requestTimeout = prefs.getLongStringNotNull(\"byedpi_proxytest_timeout\", 5)\n            val requestLimit = prefs.getIntStringNotNull(\"byedpi_proxytest_limit\", 20)\n\n            for (strategyIndex in strategies.indices) {\n                if (!isActive) break\n\n                val strategy = strategies[strategyIndex]\n                val cmdIndex = strategyIndex + 1\n\n                withContext(Dispatchers.Main) {\n                    progressTextView.text = getString(R.string.test_process, cmdIndex, cmds.size)\n                }\n\n                updateCmdArgs(strategy.command)\n\n                if (isProxyRunning()) stopTesting()\n                else ServiceManager.start(this@TestActivity, Mode.Proxy)\n\n                if (!waitForProxyStatus(AppStatus.Running)) {\n                    stopTesting()\n                }\n\n                delay(delaySec * 500L)\n\n                val totalRequests = sites.size * requestsCount\n                strategy.totalRequests = totalRequests\n\n                withContext(Dispatchers.Main) {\n                    strategyAdapter.notifyItemChanged(strategyIndex)\n                }\n\n                siteChecker.checkSitesAsync(\n                    sites = sites,\n                    requestsCount = requestsCount,\n                    requestTimeout = requestTimeout,\n                    concurrentRequests = requestLimit,\n                    fullLog = true,\n                    onSiteChecked = { site, successCount, countRequests ->\n                        lifecycleScope.launch(Dispatchers.Main) {\n                            strategy.currentProgress += countRequests\n                            strategy.successCount += successCount\n                            strategy.siteResults.add(SiteResult(site, successCount, countRequests))\n\n                            strategyAdapter.notifyItemChanged(strategyIndex, \"progress\")\n                        }\n                    }\n                )\n\n                strategy.isCompleted = true\n\n                withContext(Dispatchers.Main) {\n                    strategyAdapter.updateStrategies(strategies, sortByPercentage = true)\n                    saveResults(strategies)\n                }\n\n                if (isProxyRunning()) ServiceManager.stop(this@TestActivity)\n                else stopTesting()\n\n                if (!waitForProxyStatus(AppStatus.Halted)) {\n                    stopTesting()\n                }\n\n                delay(delaySec * 500L)\n            }\n\n            stopTesting()\n        }\n    }\n\n    private fun stopTesting() {\n        if (!isTesting) {\n            return\n        }\n\n        lifecycleScope.launch(Dispatchers.IO) {\n            isTesting = false\n            updateCmdArgs(savedCmd)\n\n            testJob?.cancel()\n            testJob = null\n\n            if (isProxyRunning()) {\n                ServiceManager.stop(this@TestActivity)\n            }\n\n            withContext(Dispatchers.Main) {\n                window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)\n                startStopButton.text = getString(R.string.test_start)\n                progressTextView.text = getString(R.string.test_complete)\n\n                strategyAdapter.setTestingState(false)\n                strategyAdapter.updateStrategies(strategies, sortByPercentage = true)\n\n                saveResults(strategies)\n            }\n        }\n    }\n\n    private fun addToHistory(command: String) {\n        lifecycleScope.launch(Dispatchers.IO) {\n            updateCmdArgs(command)\n            cmdHistoryUtils.addCommand(command)\n\n            val mode = prefs.mode()\n            if (mode == Mode.VPN && VpnService.prepare(this@TestActivity) != null) return@launch\n\n            val toastText = if (appStatus.first == AppStatus.Running) {\n                ServiceManager.restart(this@TestActivity, mode)\n                R.string.service_restart\n            } else {\n                R.string.cmd_history_applied\n            }\n\n            withContext(Dispatchers.Main) {\n                Toast.makeText(this@TestActivity, toastText, Toast.LENGTH_SHORT).show()\n            }\n        }\n    }\n\n    private fun saveResults(results: List<StrategyResult>) {\n        val file = File(filesDir, \"proxy_test_results.json\")\n        val json = gson.toJson(results)\n        file.writeText(json)\n    }\n\n    private fun loadResults(): List<StrategyResult> {\n        val file = File(filesDir, \"proxy_test_results.json\")\n        return if (file.exists()) {\n            try {\n                val json = file.readText()\n                val type = object : TypeToken<List<StrategyResult>>() {}.type\n                gson.fromJson<List<StrategyResult>>(json, type) ?: emptyList()\n            } catch (e: Exception) {\n                emptyList()\n            }\n        } else {\n            emptyList()\n        }\n    }\n\n    private fun loadSites(): List<String> {\n        DomainListUtils.initializeDefaultLists(this)\n        return DomainListUtils.getActiveDomains(this)\n    }\n\n    private fun loadCmds(): List<String> {\n        val userCommands = prefs.getBoolean(\"byedpi_proxytest_usercommands\", false)\n        val sniValue = prefs.getStringNotNull(\"byedpi_proxytest_sni\", \"google.com\")\n\n        return if (userCommands) {\n            val content = prefs.getStringNotNull(\"byedpi_proxytest_commands\", \"\")\n            content.replace(\"{sni}\", sniValue).lines().map { it.trim() }.filter { it.isNotEmpty() }\n        } else {\n            val content = assets.open(\"proxytest_strategies.list\").bufferedReader().readText()\n            content.replace(\"{sni}\", sniValue).lines().map { it.trim() }.filter { it.isNotEmpty() }\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/activities/TestSettingsActivity.kt",
    "content": "package io.github.romanvht.byedpi.activities\n\nimport android.os.Bundle\nimport android.view.MenuItem\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.fragments.DomainListsFragment\nimport io.github.romanvht.byedpi.fragments.ProxyTestSettingsFragment\n\nclass TestSettingsActivity : BaseActivity() {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_test_settings)\n\n        val openFragment = intent.getStringExtra(\"open_fragment\")\n\n        when (openFragment) {\n            \"domain_lists\" -> {\n                supportFragmentManager\n                    .beginTransaction()\n                    .replace(R.id.test_settings, DomainListsFragment())\n                    .commit()\n            }\n            else -> {\n                supportFragmentManager\n                    .beginTransaction()\n                    .replace(R.id.test_settings, ProxyTestSettingsFragment())\n                    .commit()\n            }\n        }\n\n        supportActionBar?.setDisplayHomeAsUpEnabled(true)\n    }\n\n    override fun onOptionsItemSelected(item: MenuItem): Boolean = when (item.itemId) {\n        android.R.id.home -> {\n            onBackPressedDispatcher.onBackPressed()\n            true\n        }\n        else -> super.onOptionsItemSelected(item)\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/activities/ToggleActivity.kt",
    "content": "package io.github.romanvht.byedpi.activities\n\nimport android.app.Activity\nimport android.content.SharedPreferences\nimport android.net.VpnService\nimport android.os.Bundle\nimport android.os.Handler\nimport android.os.Looper\nimport android.util.Log\nimport androidx.core.content.edit\nimport io.github.romanvht.byedpi.data.AppStatus\nimport io.github.romanvht.byedpi.data.Mode\nimport io.github.romanvht.byedpi.services.ServiceManager\nimport io.github.romanvht.byedpi.services.appStatus\nimport io.github.romanvht.byedpi.utility.getPreferences\nimport io.github.romanvht.byedpi.utility.mode\n\nclass ToggleActivity : Activity() {\n\n    companion object {\n        private const val TAG = \"ToggleServiceActivity\"\n    }\n\n    private lateinit var prefs: SharedPreferences\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n\n        prefs = getPreferences()\n        val strategy = intent.getStringExtra(\"strategy\")\n        val updated = updateStrategy(strategy)\n\n        val onlyUpdate = intent.getBooleanExtra(\"only_update\", false)\n        val onlyStart = intent.getBooleanExtra(\"only_start\", false)\n        val onlyStop = intent.getBooleanExtra(\"only_stop\", false)\n\n        when {\n            onlyUpdate -> {\n                Log.i(TAG, \"Only update strategy\")\n            }\n            onlyStart -> {\n                val (status) = appStatus\n                if (status == AppStatus.Halted) {\n                    startService()\n                } else {\n                    Log.i(TAG, \"Service already running\")\n                }\n            }\n            onlyStop -> {\n                val (status) = appStatus\n                if (status == AppStatus.Running) {\n                    stopService()\n                } else {\n                    Log.i(TAG, \"Service already stopped\")\n                }\n            }\n            else -> {\n                toggleService(updated)\n            }\n        }\n\n        finish()\n    }\n\n    private fun startService() {\n        val mode = prefs.mode()\n\n        if (mode == Mode.VPN && VpnService.prepare(this) != null) {\n            return\n        }\n\n        ServiceManager.start(this, mode)\n        Log.i(TAG, \"Toggle service start\")\n    }\n\n    private fun restartService() {\n        val mode = prefs.mode()\n\n        if (mode == Mode.VPN && VpnService.prepare(this) != null) {\n            return\n        }\n\n        ServiceManager.restart(this, mode)\n        Log.i(TAG, \"Toggle service start\")\n    }\n\n    private fun stopService() {\n        ServiceManager.stop(this)\n        Log.i(TAG, \"Toggle service stop\")\n    }\n\n    private fun toggleService(restart: Boolean) {\n        val (status) = appStatus\n        when (status) {\n            AppStatus.Halted -> {\n                startService()\n            }\n            AppStatus.Running -> {\n                if (restart) {\n                    restartService()\n                } else {\n                    stopService()\n                }\n            }\n        }\n    }\n\n    private fun updateStrategy(strategy: String?): Boolean {\n        val current = prefs.getString(\"byedpi_cmd_args\", null)\n        if (strategy != null && strategy != current) {\n            prefs.edit(commit = true) { putString(\"byedpi_cmd_args\", strategy) }\n            Log.i(TAG, \"Strategy updated to: $strategy\")\n            return true\n        }\n        return false\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/adapters/AppSelectionAdapter.kt",
    "content": "package io.github.romanvht.byedpi.adapters\n\nimport android.annotation.SuppressLint\nimport android.content.Context\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.CheckBox\nimport android.widget.Filter\nimport android.widget.Filterable\nimport android.widget.ImageView\nimport android.widget.TextView\nimport androidx.core.content.edit\nimport androidx.preference.PreferenceManager\nimport androidx.recyclerview.widget.RecyclerView\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.data.AppInfo\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.Job\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.withContext\n\nclass AppSelectionAdapter(\n    context: Context,\n    allApps: List<AppInfo>\n) : RecyclerView.Adapter<AppSelectionAdapter.ViewHolder>(), Filterable {\n\n    private val context = context.applicationContext\n    private val pm = context.packageManager\n    private val originalApps: List<AppInfo> = allApps\n    private val filteredApps: MutableList<AppInfo> = allApps.toMutableList()\n    private val adapterScope = CoroutineScope(Dispatchers.Main + Job())\n\n    class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {\n        val appIcon: ImageView = view.findViewById(R.id.appIcon)\n        val appName: TextView = view.findViewById(R.id.appName)\n        val appPackageName: TextView = view.findViewById(R.id.appPackageName)\n        val appCheckBox: CheckBox = view.findViewById(R.id.appCheckBox)\n        var iconLoadJob: Job? = null\n    }\n\n    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {\n        val view = LayoutInflater.from(parent.context).inflate(R.layout.app_selection_item, parent, false)\n        val holder = ViewHolder(view)\n\n        holder.itemView.setOnClickListener {\n            val position = holder.bindingAdapterPosition\n            if (position != RecyclerView.NO_POSITION) {\n                val app = filteredApps[position]\n                app.isSelected = !app.isSelected\n                notifyItemChanged(position)\n                updateSelectedApps()\n            }\n        }\n\n        return holder\n    }\n\n    override fun onBindViewHolder(holder: ViewHolder, position: Int) {\n        val app = filteredApps[position]\n\n        if (app.appName == app.packageName) {\n            holder.appName.text = app.packageName\n            holder.appPackageName.visibility = View.GONE\n        } else {\n            holder.appName.text = app.appName\n            holder.appPackageName.text = app.packageName\n            holder.appPackageName.visibility = View.VISIBLE\n        }\n\n        holder.appCheckBox.isChecked = app.isSelected\n\n        holder.iconLoadJob?.cancel()\n\n        if (app.icon != null) {\n            holder.appIcon.setImageDrawable(app.icon)\n        } else {\n            holder.appIcon.setImageDrawable(pm.defaultActivityIcon)\n\n            holder.iconLoadJob = adapterScope.launch {\n                val icon = withContext(Dispatchers.IO) {\n                    try {\n                        pm.getApplicationIcon(app.packageName)\n                    } catch (_: Exception) {\n                        null\n                    }\n                }\n\n                if (icon != null) {\n                    app.icon = icon\n                    holder.appIcon.setImageDrawable(icon)\n                }\n            }\n        }\n    }\n\n    override fun getItemCount(): Int {\n        return filteredApps.size\n    }\n\n    override fun onViewRecycled(holder: ViewHolder) {\n        super.onViewRecycled(holder)\n        holder.iconLoadJob?.cancel()\n    }\n\n    override fun getFilter(): Filter {\n        return object : Filter() {\n            override fun performFiltering(constraint: CharSequence?): FilterResults {\n                val query = constraint?.toString()?.lowercase().orEmpty()\n                var filteredList = originalApps\n\n                if (query.isNotEmpty()) {\n                    filteredList = originalApps.filter {\n                        it.appName.lowercase().contains(query) ||\n                                it.packageName.lowercase().contains(query)\n                    }\n                }\n\n                return FilterResults().apply {\n                    values = filteredList\n                }\n            }\n\n            @SuppressLint(\"NotifyDataSetChanged\")\n            override fun publishResults(constraint: CharSequence, results: FilterResults) {\n                val newList = (results.values as List<*>).filterIsInstance<AppInfo>()\n                filteredApps.clear()\n                filteredApps.addAll(newList)\n                notifyDataSetChanged()\n            }\n        }\n    }\n\n    private fun getAllSelectedPackages(): Set<String> {\n        return originalApps.filter { it.isSelected }.map { it.packageName }.toSet()\n    }\n\n    private fun updateSelectedApps() {\n        val prefs = PreferenceManager.getDefaultSharedPreferences(context)\n        val selectedApps = getAllSelectedPackages()\n        prefs.edit { putStringSet(\"selected_apps\", selectedApps) }\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/adapters/DomainListAdapter.kt",
    "content": "package io.github.romanvht.byedpi.adapters\n\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.CheckBox\nimport android.widget.LinearLayout\nimport android.widget.TextView\nimport androidx.appcompat.app.AlertDialog\nimport androidx.recyclerview.widget.DiffUtil\nimport androidx.recyclerview.widget.ListAdapter\nimport androidx.recyclerview.widget.RecyclerView\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.data.DomainList\n\nclass DomainListAdapter(\n    private val onStateChanged: (DomainList) -> Unit,\n    private val onEdit: (DomainList) -> Unit,\n    private val onDelete: (DomainList) -> Unit,\n    private val onCopy: (DomainList) -> Unit\n) : ListAdapter<DomainList, DomainListAdapter.DomainListViewHolder>(DiffCallback()) {\n\n    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): DomainListViewHolder {\n        val view = LayoutInflater.from(parent.context).inflate(R.layout.item_domain_list, parent, false)\n        val holder = DomainListViewHolder(view)\n\n        holder.checkbox.setOnClickListener {\n            val position = holder.bindingAdapterPosition\n            if (position != RecyclerView.NO_POSITION) {\n                onStateChanged(getItem(position))\n            }\n        }\n\n        holder.contentLayout.setOnClickListener {\n            val position = holder.bindingAdapterPosition\n            if (position != RecyclerView.NO_POSITION) {\n                holder.showActionDialog(getItem(position), onEdit, onCopy, onDelete)\n            }\n        }\n\n        return holder\n    }\n\n    override fun onBindViewHolder(holder: DomainListViewHolder, position: Int) {\n        holder.bind(getItem(position))\n    }\n\n    class DomainListViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {\n        private val nameText: TextView = itemView.findViewById(R.id.list_name)\n        private val countText: TextView = itemView.findViewById(R.id.list_count)\n        val checkbox: CheckBox = itemView.findViewById(R.id.list_checkbox)\n        val contentLayout: LinearLayout = itemView.findViewById(R.id.list_content)\n\n        fun bind(domainList: DomainList) {\n            nameText.text = domainList.name\n\n            val domains = domainList.domains.take(5).joinToString(\"\\n\")\n            val summary = if (domainList.domains.size > 5) \"$domains\\n...\" else domains\n            countText.text = summary\n\n            checkbox.isChecked = domainList.isActive\n        }\n\n        fun showActionDialog(\n            domainList: DomainList,\n            onEdit: (DomainList) -> Unit,\n            onCopy: (DomainList) -> Unit,\n            onDelete: (DomainList) -> Unit\n        ) {\n            val context = itemView.context\n            val options = arrayOf(\n                context.getString(R.string.domain_list_edit),\n                context.getString(R.string.cmd_history_copy),\n                context.getString(R.string.domain_list_delete)\n            )\n\n            AlertDialog.Builder(context, R.style.CustomAlertDialog)\n                .setTitle(domainList.name)\n                .setItems(options) { _, which ->\n                    when (which) {\n                        0 -> onEdit(domainList)\n                        1 -> onCopy(domainList)\n                        2 -> onDelete(domainList)\n                    }\n                }\n                .setNegativeButton(android.R.string.cancel, null)\n                .show()\n        }\n    }\n\n    private class DiffCallback : DiffUtil.ItemCallback<DomainList>() {\n        override fun areItemsTheSame(oldItem: DomainList, newItem: DomainList): Boolean {\n            return oldItem.id == newItem.id\n        }\n\n        override fun areContentsTheSame(oldItem: DomainList, newItem: DomainList): Boolean {\n            return oldItem == newItem\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/adapters/SiteResultAdapter.kt",
    "content": "package io.github.romanvht.byedpi.adapters\n\nimport android.annotation.SuppressLint\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.TextView\nimport androidx.recyclerview.widget.RecyclerView\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.data.SiteResult\n\nclass SiteResultAdapter : RecyclerView.Adapter<SiteResultAdapter.SiteViewHolder>() {\n\n    private val sites = mutableListOf<SiteResult>()\n\n    class SiteViewHolder(view: View) : RecyclerView.ViewHolder(view) {\n        val siteTextView: TextView = view.findViewById(R.id.siteTextView)\n        val resultTextView: TextView = view.findViewById(R.id.siteResultTextView)\n    }\n\n    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SiteViewHolder {\n        val view = LayoutInflater.from(parent.context).inflate(R.layout.item_site_result, parent, false)\n        return SiteViewHolder(view)\n    }\n\n    @SuppressLint(\"SetTextI18n\")\n    override fun onBindViewHolder(holder: SiteViewHolder, position: Int) {\n        val site = sites[position]\n        holder.siteTextView.text = site.site\n        holder.resultTextView.text = \"${site.successCount}/${site.totalCount}\"\n    }\n\n    override fun getItemCount(): Int {\n        return sites.size\n    }\n\n    @SuppressLint(\"NotifyDataSetChanged\")\n    fun updateSites(newSites: List<SiteResult>) {\n        sites.clear()\n        sites.addAll(newSites)\n        notifyDataSetChanged()\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/adapters/StrategyResultAdapter.kt",
    "content": "package io.github.romanvht.byedpi.adapters\n\nimport android.annotation.SuppressLint\nimport android.content.Context\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.ImageView\nimport android.widget.LinearLayout\nimport android.widget.ProgressBar\nimport android.widget.TextView\nimport androidx.appcompat.app.AlertDialog\nimport androidx.recyclerview.widget.LinearLayoutManager\nimport androidx.recyclerview.widget.RecyclerView\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.data.StrategyResult\nimport androidx.core.view.isGone\nimport androidx.core.view.isVisible\nimport io.github.romanvht.byedpi.utility.ClipboardUtils\n\nclass StrategyResultAdapter(\n    private val context: Context,\n    private val onApply: (String) -> Unit\n) : RecyclerView.Adapter<StrategyResultAdapter.StrategyViewHolder>() {\n\n    private var isTesting = false\n    private val strategies = mutableListOf<StrategyResult>()\n\n    class StrategyViewHolder(view: View) : RecyclerView.ViewHolder(view) {\n        val commandTextView: TextView = view.findViewById(R.id.commandTextView)\n        val progressLayout: LinearLayout = view.findViewById(R.id.progressLayout)\n        val progressBar: ProgressBar = view.findViewById(R.id.progressBar)\n        val progressTextView: TextView = view.findViewById(R.id.progressTextView)\n        val expandButton: LinearLayout = view.findViewById(R.id.expandButton)\n        val expandTextView: TextView = view.findViewById(R.id.expandTextView)\n        val expandIcon: ImageView = view.findViewById(R.id.expandIcon)\n        val sitesRecyclerView: RecyclerView = view.findViewById(R.id.sitesRecyclerView)\n    }\n\n    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): StrategyViewHolder {\n        val view = LayoutInflater.from(parent.context).inflate(R.layout.item_strategy_result, parent, false)\n        val holder = StrategyViewHolder(view)\n\n        holder.commandTextView.setOnClickListener {\n            val position = holder.bindingAdapterPosition\n            if (position != RecyclerView.NO_POSITION) {\n                showCommandMenu(strategies[position].command)\n            }\n        }\n\n        holder.expandButton.setOnClickListener {\n            val position = holder.bindingAdapterPosition\n            if (position != RecyclerView.NO_POSITION) {\n                strategies[position].isExpanded = !strategies[position].isExpanded\n                notifyItemChanged(position)\n            }\n        }\n\n        return holder\n    }\n\n    @SuppressLint(\"SetTextI18n\")\n    override fun onBindViewHolder(holder: StrategyViewHolder, position: Int) {\n        val strategy = strategies[position]\n\n        holder.commandTextView.text = strategy.command\n\n        if (strategy.totalRequests > 0) {\n            holder.progressLayout.visibility = View.VISIBLE\n            holder.progressTextView.visibility = View.VISIBLE\n\n            val isProgress = isTesting && !strategy.isCompleted\n\n            if (isProgress) {\n                holder.progressBar.isIndeterminate = true\n                holder.progressTextView.text = \"${strategy.successCount}/${strategy.totalRequests}\"\n            } else {\n                holder.progressBar.isIndeterminate = false\n                holder.progressBar.max = strategy.totalRequests\n                holder.progressBar.progress = strategy.successCount\n                holder.progressTextView.text = \"${strategy.successCount}/${strategy.totalRequests}\"\n            }\n        } else {\n            holder.progressLayout.visibility = View.GONE\n        }\n\n        if (strategy.siteResults.isNotEmpty()) {\n            holder.expandButton.visibility = View.VISIBLE\n\n            if (strategy.isExpanded) {\n                holder.expandTextView.text = context.getString(R.string.test_hide_details)\n                holder.expandIcon.rotation = 180f\n                holder.sitesRecyclerView.visibility = View.VISIBLE\n\n                val siteAdapter = SiteResultAdapter()\n                holder.sitesRecyclerView.layoutManager = LinearLayoutManager(context)\n                holder.sitesRecyclerView.adapter = siteAdapter\n                siteAdapter.updateSites(strategy.siteResults)\n            } else {\n                holder.expandTextView.text = context.getString(R.string.test_show_details)\n                holder.expandIcon.rotation = 0f\n                holder.sitesRecyclerView.visibility = View.GONE\n            }\n        } else {\n            holder.expandButton.visibility = View.GONE\n            holder.sitesRecyclerView.visibility = View.GONE\n        }\n    }\n\n    @SuppressLint(\"SetTextI18n\")\n    override fun onBindViewHolder(holder: StrategyViewHolder, position: Int, payloads: MutableList<Any>) {\n        if (payloads.isEmpty()) {\n            super.onBindViewHolder(holder, position, payloads)\n        } else {\n            val strategy = strategies[position]\n\n            if (strategy.totalRequests > 0) {\n                val isProgress = isTesting && !strategy.isCompleted\n\n                if (isProgress) {\n                    holder.progressBar.isIndeterminate = true\n                    holder.progressTextView.text = \"${strategy.successCount}/${strategy.totalRequests}\"\n                } else {\n                    holder.progressBar.isIndeterminate = false\n                    holder.progressBar.max = strategy.totalRequests\n                    holder.progressBar.progress = strategy.successCount\n                    holder.progressTextView.text = \"${strategy.successCount}/${strategy.totalRequests}\"\n                }\n            }\n\n            if (strategy.siteResults.isNotEmpty() && holder.expandButton.isGone) {\n                holder.expandButton.visibility = View.VISIBLE\n            }\n\n            if (strategy.isExpanded && holder.sitesRecyclerView.isVisible) {\n                val adapter = holder.sitesRecyclerView.adapter\n                if (adapter is SiteResultAdapter) {\n                    adapter.updateSites(strategy.siteResults)\n                }\n            }\n        }\n    }\n\n    override fun getItemCount(): Int {\n        return strategies.size\n    }\n\n    @SuppressLint(\"NotifyDataSetChanged\")\n    fun setTestingState(testing: Boolean) {\n        isTesting = testing\n        notifyDataSetChanged()\n    }\n\n    @SuppressLint(\"NotifyDataSetChanged\")\n    fun updateStrategies(newStrategies: List<StrategyResult>, sortByPercentage: Boolean = true) {\n        strategies.clear()\n\n        val sorted = if (sortByPercentage) {\n            newStrategies.sortedWith(compareByDescending<StrategyResult> { it.isCompleted }\n                .thenByDescending { it.successPercentage }\n                .thenByDescending { it.successCount })\n        } else {\n            newStrategies\n        }\n\n        strategies.addAll(sorted)\n        notifyDataSetChanged()\n    }\n\n    private fun showCommandMenu(command: String) {\n        val menuItems = arrayOf(\n            context.getString(R.string.cmd_history_apply),\n            context.getString(R.string.cmd_history_copy)\n        )\n\n        AlertDialog.Builder(context)\n            .setTitle(context.getString(R.string.cmd_history_menu))\n            .setItems(menuItems) { _, which ->\n                when (which) {\n                    0 -> onApply(command)\n                    1 -> ClipboardUtils.copy(context, command, \"command\")\n                }\n            }\n            .show()\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/core/ByeDpiProxy.kt",
    "content": "package io.github.romanvht.byedpi.core\n\nclass ByeDpiProxy {\n    companion object {\n        init {\n            System.loadLibrary(\"byedpi\")\n        }\n    }\n\n    fun startProxy(preferences: ByeDpiProxyPreferences): Int {\n        val args = prepareArgs(preferences)\n        return jniStartProxy(args)\n    }\n\n    fun stopProxy(): Int {\n        return jniStopProxy()\n    }\n\n    private fun prepareArgs(preferences: ByeDpiProxyPreferences): Array<String> =\n        when (preferences) {\n            is ByeDpiProxyCmdPreferences -> preferences.args\n            is ByeDpiProxyUIPreferences -> preferences.uiargs\n        }\n\n    private external fun jniStartProxy(args: Array<String>): Int\n    private external fun jniStopProxy(): Int\n    external fun jniForceClose(): Int\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/core/ByeDpiProxyPreferences.kt",
    "content": "package io.github.romanvht.byedpi.core\n\nimport android.content.Context\nimport android.content.SharedPreferences\nimport android.util.Log\nimport io.github.romanvht.byedpi.data.UISettings\nimport io.github.romanvht.byedpi.utility.DomainListUtils\nimport io.github.romanvht.byedpi.utility.checkIpAndPortInCmd\nimport io.github.romanvht.byedpi.utility.getStringNotNull\nimport io.github.romanvht.byedpi.utility.shellSplit\n\nsealed interface ByeDpiProxyPreferences {\n    companion object {\n        fun fromSharedPreferences(preferences: SharedPreferences, context: Context): ByeDpiProxyPreferences =\n            when (preferences.getBoolean(\"byedpi_enable_cmd_settings\", false)) {\n                true -> ByeDpiProxyCmdPreferences(preferences, context)\n                false -> ByeDpiProxyUIPreferences(preferences)\n            }\n    }\n}\n\nclass ByeDpiProxyCmdPreferences(val args: Array<String>) : ByeDpiProxyPreferences {\n    constructor(preferences: SharedPreferences, context: Context) : this(\n        parseCmdToArguments(preferences, context)\n    )\n\n    companion object {\n        private fun parseCmdToArguments(preferences: SharedPreferences, context: Context): Array<String> {\n            val cmd = preferences.getStringNotNull(\"byedpi_cmd_args\", \"-Ku -a1 -An -o1 -At,r,s -d1\")\n            val preparedCmd = getLists(cmd, context)\n\n            val firstArgIndex = preparedCmd.indexOf(\"-\")\n            val args = (if (firstArgIndex > 0) preparedCmd.substring(firstArgIndex) else preparedCmd).trim()\n\n            Log.d(\"ProxyPref\", \"CMD: $args\")\n\n            val (cmdIp, cmdPort) = preferences.checkIpAndPortInCmd()\n            val ip = preferences.getStringNotNull(\"byedpi_proxy_ip\", \"127.0.0.1\")\n            val port = preferences.getStringNotNull(\"byedpi_proxy_port\", \"1080\")\n            val enableHttp = preferences.getBoolean(\"byedpi_http_connect\", false)\n            val hasHttp = args.contains(\"-G\") || args.contains(\"--http-connect\")\n\n            val prefix = buildString {\n                if (cmdIp == null) append(\"--ip $ip \")\n                if (cmdPort == null) append(\"--port $port \")\n                if (enableHttp && !hasHttp) append(\"--http-connect \")\n            }\n\n            Log.d(\"ProxyPref\", \"Added from settings: $prefix\")\n\n            return if (prefix.isNotEmpty()) {\n                arrayOf(\"ciadpi\") + shellSplit(\"$prefix$args\")\n            } else {\n                arrayOf(\"ciadpi\") + shellSplit(args)\n            }\n        }\n\n        private fun getLists(cmd: String, context: Context): String {\n            return Regex(\"\"\"\\{list:([^}]+)\\}\"\"\").replace(cmd) { matchResult ->\n                val listName = matchResult.groupValues[1].trim()\n                val lists = DomainListUtils.getLists(context)\n                val domainList = lists.find { it.name.equals(listName, ignoreCase = true) }\n\n                if (domainList != null && domainList.domains.isNotEmpty()) {\n                    domainList.domains.joinToString(\" \")\n                } else {\n                    Log.w(\"ProxyPref\", \"List '$listName' not found or empty\")\n                    \"\"\n                }\n            }\n        }\n    }\n}\n\nclass ByeDpiProxyUIPreferences(val settings: UISettings = UISettings()) : ByeDpiProxyPreferences {\n\n    constructor(preferences: SharedPreferences) : this(\n        UISettings.fromSharedPreferences(preferences)\n    )\n\n    val uiargs: Array<String>\n        get() {\n            val args = mutableListOf(\"ciadpi\")\n\n            if (settings.ip.isNotEmpty()) args.add(\"-i${settings.ip}\")\n            if (settings.port != 0) args.add(\"-p${settings.port}\")\n            if (settings.maxConnections != 0) args.add(\"-c${settings.maxConnections}\")\n            if (settings.bufferSize != 0) args.add(\"-b${settings.bufferSize}\")\n            if (settings.httpConnect) args.add(\"-G\")\n\n            val protocols = buildList {\n                if (settings.desyncHttps) add(\"t\")\n                if (settings.desyncHttp) add(\"h\")\n            }\n\n            if (!settings.hosts.isNullOrBlank()) {\n                val hostStr = \":${settings.hosts.replace(\"\\n\", \" \")}\"\n                when (settings.hostsMode) {\n                    UISettings.HostsMode.Blacklist -> {\n                        args.add(\"-H$hostStr\")\n                        args.add(\"-An\")\n                        if (protocols.isNotEmpty()) args.add(\"-K${protocols.joinToString(\",\")}\")\n                    }\n                    UISettings.HostsMode.Whitelist -> {\n                        if (protocols.isNotEmpty()) args.add(\"-K${protocols.joinToString(\",\")}\")\n                        args.add(\"-H$hostStr\")\n                    }\n                    else -> {}\n                }\n            } else {\n                if (protocols.isNotEmpty()) args.add(\"-K${protocols.joinToString(\",\")}\")\n            }\n\n            if (settings.defaultTtl != 0) args.add(\"-g${settings.defaultTtl}\")\n            if (settings.noDomain) args.add(\"-N\")\n\n            if (settings.splitPosition != 0) {\n                val posArg = settings.splitPosition.toString() + if (settings.splitAtHost) \"+h\" else \"\"\n                val option = when (settings.desyncMethod) {\n                    UISettings.DesyncMethod.Split -> \"-s\"\n                    UISettings.DesyncMethod.Disorder -> \"-d\"\n                    UISettings.DesyncMethod.OOB -> \"-o\"\n                    UISettings.DesyncMethod.DISOOB -> \"-q\"\n                    UISettings.DesyncMethod.Fake -> \"-f\"\n                    UISettings.DesyncMethod.None -> \"\"\n                }\n                if (option.isNotEmpty()) args.add(\"$option$posArg\")\n            }\n\n            if (settings.desyncMethod == UISettings.DesyncMethod.Fake) {\n                if (settings.fakeTtl != 0) args.add(\"-t${settings.fakeTtl}\")\n                if (settings.fakeSni.isNotEmpty()) args.add(\"-n${settings.fakeSni}\")\n                if (settings.fakeOffset != 0) args.add(\"-O${settings.fakeOffset}\")\n            }\n\n            if (settings.desyncMethod == UISettings.DesyncMethod.OOB || settings.desyncMethod == UISettings.DesyncMethod.DISOOB) {\n                args.add(\"-e${settings.oobChar[0].code.toByte()}\")\n            }\n\n            val modHttpFlags = buildList {\n                if (settings.hostMixedCase) add(\"h\")\n                if (settings.domainMixedCase) add(\"d\")\n                if (settings.hostRemoveSpaces) add(\"r\")\n            }\n\n            if (modHttpFlags.isNotEmpty()) args.add(\"-M${modHttpFlags.joinToString(\",\")}\")\n\n            if (settings.tlsRecordSplit && settings.tlsRecordSplitPosition != 0) {\n                val tlsRecArg = settings.tlsRecordSplitPosition.toString() + if (settings.tlsRecordSplitAtSni) \"+s\" else \"\"\n                args.add(\"-r$tlsRecArg\")\n            }\n\n            if (settings.tcpFastOpen) args.add(\"-F\")\n            if (settings.dropSack) args.add(\"-Y\")\n\n            args.add(\"-An\")\n\n            if (settings.desyncUdp) {\n                args.add(\"-Ku\")\n                if (settings.udpFakeCount != 0) args.add(\"-a${settings.udpFakeCount}\")\n                args.add(\"-An\")\n            }\n\n            Log.d(\"ProxyPref\", \"UI to cmd: ${args.joinToString(\" \")}\")\n            return args.toTypedArray()\n        }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/core/TProxyService.kt",
    "content": "package io.github.romanvht.byedpi.core\n\nobject TProxyService {\n    init {\n        System.loadLibrary(\"hev-socks5-tunnel\")\n    }\n\n    @JvmStatic\n    external fun TProxyStartService(configPath: String, fd: Int)\n\n    @JvmStatic\n    external fun TProxyStopService()\n\n    @JvmStatic\n    @Suppress(\"unused\")\n    external fun TProxyGetStats(): LongArray\n}\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/data/Actions.kt",
    "content": "package io.github.romanvht.byedpi.data\n\nconst val START_ACTION = \"start\"\nconst val STOP_ACTION = \"stop\"\nconst val RESUME_ACTION = \"resume\"\nconst val PAUSE_ACTION = \"pause\"\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/data/AppInfo.kt",
    "content": "package io.github.romanvht.byedpi.data\n\nimport android.graphics.drawable.Drawable\n\ndata class AppInfo(\n    val appName: String,\n    val packageName: String,\n    var isSelected: Boolean,\n    var icon: Drawable? = null\n)"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/data/AppSettings.kt",
    "content": "package io.github.romanvht.byedpi.data\n\ndata class AppSettings(\n    val app: String,\n    val version: String,\n    val history: List<Command>?,\n    val apps: List<String>?,\n    val domainLists: List<DomainList>?,\n    val settings: Map<String, Any?>\n)"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/data/AppStatus.kt",
    "content": "package io.github.romanvht.byedpi.data\n\nenum class AppStatus {\n    Halted,\n    Running,\n}\n\nenum class Mode {\n    Proxy,\n    VPN;\n\n    companion object {\n        fun fromSender(sender: Sender): Mode = when (sender) {\n            Sender.Proxy -> Proxy\n            Sender.VPN -> VPN\n        }\n\n        fun fromString(name: String): Mode = when (name) {\n            \"proxy\" -> Proxy\n            \"vpn\" -> VPN\n            else -> throw IllegalArgumentException(\"Invalid mode: $name\")\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/data/Broadcasts.kt",
    "content": "package io.github.romanvht.byedpi.data\n\nimport io.github.romanvht.byedpi.BuildConfig\n\nconst val STARTED_BROADCAST = \"${BuildConfig.APPLICATION_ID}.STARTED\"\nconst val STOPPED_BROADCAST = \"${BuildConfig.APPLICATION_ID}.STOPPED\"\nconst val FAILED_BROADCAST = \"${BuildConfig.APPLICATION_ID}.FAILED\"\n\nconst val SENDER = \"sender\"\n\nenum class Sender(val senderName: String) {\n    Proxy(\"Proxy\"),\n    VPN(\"VPN\")\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/data/Command.kt",
    "content": "package io.github.romanvht.byedpi.data\n\ndata class Command(\n    var text: String,\n    var pinned: Boolean = false,\n    var name: String? = null\n)"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/data/DomainList.kt",
    "content": "package io.github.romanvht.byedpi.data\n\ndata class DomainList(\n    val id: String,\n    val name: String,\n    val domains: List<String>,\n    val isActive: Boolean = true,\n    val isBuiltIn: Boolean = false\n)"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/data/ServiceStatus.kt",
    "content": "package io.github.romanvht.byedpi.data\n\nenum class ServiceStatus {\n    Disconnected,\n    Connected,\n    Failed,\n}\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/data/TestResult.kt",
    "content": "package io.github.romanvht.byedpi.data\n\ndata class StrategyResult(\n    val command: String,\n    var successCount: Int = 0,\n    var totalRequests: Int = 0,\n    var currentProgress: Int = 0,\n    var isCompleted: Boolean = false,\n    val siteResults: MutableList<SiteResult> = mutableListOf(),\n    var isExpanded: Boolean = false\n) {\n    val successPercentage: Int\n        get() = if (totalRequests > 0) (successCount * 100) / totalRequests else 0\n}\n\ndata class SiteResult(\n    val site: String,\n    val successCount: Int,\n    val totalCount: Int\n)\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/data/UISettings.kt",
    "content": "package io.github.romanvht.byedpi.data\n\nimport android.content.SharedPreferences\n\ndata class UISettings(\n    val ip: String = \"127.0.0.1\",\n    val port: Int = 1080,\n    val httpConnect: Boolean = false,\n    val maxConnections: Int = 512,\n    val bufferSize: Int = 16384,\n    val defaultTtl: Int = 0,\n    val noDomain: Boolean = false,\n    val desyncHttp: Boolean = true,\n    val desyncHttps: Boolean = true,\n    val desyncUdp: Boolean = true,\n    val desyncMethod: DesyncMethod = DesyncMethod.OOB,\n    val splitPosition: Int = 1,\n    val splitAtHost: Boolean = false,\n    val fakeTtl: Int = 8,\n    val fakeSni: String = \"www.iana.org\",\n    val oobChar: String = \"a\",\n    val hostMixedCase: Boolean = false,\n    val domainMixedCase: Boolean = false,\n    val hostRemoveSpaces: Boolean = false,\n    val tlsRecordSplit: Boolean = false,\n    val tlsRecordSplitPosition: Int = 0,\n    val tlsRecordSplitAtSni: Boolean = false,\n    val hostsMode: HostsMode = HostsMode.Disable,\n    val hosts: String? = null,\n    val tcpFastOpen: Boolean = false,\n    val udpFakeCount: Int = 1,\n    val dropSack: Boolean = false,\n    val fakeOffset: Int = 0,\n) {\n    enum class DesyncMethod {\n        None, Split, Disorder, Fake, OOB, DISOOB;\n\n        companion object {\n            fun fromName(name: String): DesyncMethod = when (name) {\n                \"none\" -> None\n                \"split\" -> Split\n                \"disorder\" -> Disorder\n                \"fake\" -> Fake\n                \"oob\" -> OOB\n                \"disoob\" -> DISOOB\n                else -> throw IllegalArgumentException(\"Unknown desync method: $name\")\n            }\n        }\n    }\n\n    enum class HostsMode {\n        Disable, Blacklist, Whitelist;\n\n        companion object {\n            fun fromName(name: String): HostsMode = when (name) {\n                \"disable\" -> Disable\n                \"blacklist\" -> Blacklist\n                \"whitelist\" -> Whitelist\n                else -> throw IllegalArgumentException(\"Unknown hosts mode: $name\")\n            }\n        }\n    }\n\n    companion object {\n        fun fromSharedPreferences(preferences: SharedPreferences): UISettings {\n            val hostsMode = preferences.getString(\"byedpi_hosts_mode\", null) ?.let { HostsMode.fromName(it) } ?: HostsMode.Disable\n\n            val hosts = when (hostsMode) {\n                HostsMode.Blacklist -> preferences.getString(\"byedpi_hosts_blacklist\", null)\n                HostsMode.Whitelist -> preferences.getString(\"byedpi_hosts_whitelist\", null)\n                else -> null\n            }\n\n            return UISettings(\n                ip = preferences.getString(\"byedpi_proxy_ip\", null) ?: \"127.0.0.1\",\n                port = preferences.getString(\"byedpi_proxy_port\", null)?.toIntOrNull() ?: 1080,\n                httpConnect = preferences.getBoolean(\"byedpi_http_connect\", false),\n                maxConnections = preferences.getString(\"byedpi_max_connections\", null)?.toIntOrNull() ?: 512,\n                bufferSize = preferences.getString(\"byedpi_buffer_size\", null)?.toIntOrNull() ?: 16384,\n                defaultTtl = preferences.getString(\"byedpi_default_ttl\", null)?.toIntOrNull() ?: 0,\n                noDomain = preferences.getBoolean(\"byedpi_no_domain\", false),\n                desyncHttp = preferences.getBoolean(\"byedpi_desync_http\", true),\n                desyncHttps = preferences.getBoolean(\"byedpi_desync_https\", true),\n                desyncUdp = preferences.getBoolean(\"byedpi_desync_udp\", true),\n                desyncMethod = preferences.getString(\"byedpi_desync_method\", null) ?.let { DesyncMethod.fromName(it) } ?: DesyncMethod.OOB,\n                splitPosition = preferences.getString(\"byedpi_split_position\", null)?.toIntOrNull() ?: 1,\n                splitAtHost = preferences.getBoolean(\"byedpi_split_at_host\", false),\n                fakeTtl = preferences.getString(\"byedpi_fake_ttl\", null)?.toIntOrNull() ?: 8,\n                fakeSni = preferences.getString(\"byedpi_fake_sni\", null) ?: \"www.iana.org\",\n                oobChar = preferences.getString(\"byedpi_oob_data\", null) ?: \"a\",\n                hostMixedCase = preferences.getBoolean(\"byedpi_host_mixed_case\", false),\n                domainMixedCase = preferences.getBoolean(\"byedpi_domain_mixed_case\", false),\n                hostRemoveSpaces = preferences.getBoolean(\"byedpi_host_remove_spaces\", false),\n                tlsRecordSplit = preferences.getBoolean(\"byedpi_tlsrec_enabled\", false),\n                tlsRecordSplitPosition = preferences.getString(\"byedpi_tlsrec_position\", null)?.toIntOrNull() ?: 0,\n                tlsRecordSplitAtSni = preferences.getBoolean(\"byedpi_tlsrec_at_sni\", false),\n                tcpFastOpen = preferences.getBoolean(\"byedpi_tcp_fast_open\", false),\n                udpFakeCount = preferences.getString(\"byedpi_udp_fake_count\", null)?.toIntOrNull() ?: 1,\n                dropSack = preferences.getBoolean(\"byedpi_drop_sack\", false),\n                fakeOffset = preferences.getString(\"byedpi_fake_offset\", null)?.toIntOrNull() ?: 0,\n                hostsMode = hostsMode,\n                hosts = hosts,\n            )\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/fragments/AppSelectionFragment.kt",
    "content": "package io.github.romanvht.byedpi.fragments\n\nimport android.content.SharedPreferences\nimport android.content.pm.ApplicationInfo\nimport android.content.pm.PackageManager\nimport android.os.Bundle\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.ProgressBar\nimport android.widget.SearchView\nimport androidx.fragment.app.Fragment\nimport androidx.lifecycle.lifecycleScope\nimport androidx.preference.PreferenceManager\nimport androidx.recyclerview.widget.LinearLayoutManager\nimport androidx.recyclerview.widget.RecyclerView\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.adapters.AppSelectionAdapter\nimport io.github.romanvht.byedpi.data.AppInfo\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.async\nimport kotlinx.coroutines.awaitAll\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.withContext\n\nclass AppSelectionFragment : Fragment() {\n    private lateinit var recyclerView: RecyclerView\n    private lateinit var searchView: SearchView\n    private lateinit var progressBar: ProgressBar\n    private lateinit var adapter: AppSelectionAdapter\n    private lateinit var prefs: SharedPreferences\n\n    override fun onCreateView(\n        inflater: LayoutInflater,\n        container: ViewGroup?,\n        savedInstanceState: Bundle?\n    ): View {\n        val view = inflater.inflate(R.layout.app_selection_layout, container, false)\n        prefs = PreferenceManager.getDefaultSharedPreferences(requireContext())\n\n        recyclerView = view.findViewById(R.id.recyclerView)\n        searchView = view.findViewById(R.id.searchView)\n        progressBar = view.findViewById(R.id.progressBar)\n\n        setupRecyclerView()\n        setupSearchView()\n        loadApps()\n\n        return view\n    }\n\n    override fun onDestroyView() {\n        super.onDestroyView()\n        recyclerView.adapter = null\n        searchView.setOnQueryTextListener(null)\n    }\n\n    private fun setupRecyclerView() {\n        recyclerView.layoutManager = LinearLayoutManager(context)\n    }\n\n    private fun setupSearchView() {\n        searchView.setOnQueryTextListener(object : SearchView.OnQueryTextListener {\n            override fun onQueryTextSubmit(query: String?): Boolean = false\n\n            override fun onQueryTextChange(newText: String?): Boolean {\n                adapter.filter.filter(newText)\n                return true\n            }\n        })\n    }\n\n    private fun loadApps() {\n        progressBar.visibility = View.VISIBLE\n        searchView.visibility = View.GONE\n\n        lifecycleScope.launch {\n            val apps = withContext(Dispatchers.IO) {\n                getInstalledAppsAsync()\n            }\n\n            adapter = AppSelectionAdapter(requireContext(), apps)\n            recyclerView.adapter = adapter\n            progressBar.visibility = View.GONE\n            searchView.visibility = View.VISIBLE\n        }\n    }\n\n    private suspend fun getInstalledAppsAsync(): List<AppInfo> {\n        val pm = requireContext().packageManager\n        val installedApps = pm.getInstalledApplications(0)\n        val selectedApps = prefs.getStringSet(\"selected_apps\", setOf()) ?: setOf()\n\n        return installedApps\n            .filter { it.packageName != requireContext().packageName }\n            .map { appInfo ->\n                lifecycleScope.async(Dispatchers.IO) {\n                    createAppInfo(appInfo, pm, selectedApps)\n                }\n            }\n            .awaitAll()\n            .sortedWith(compareBy({ !it.isSelected }, { it.appName.lowercase() }))\n    }\n\n    private fun createAppInfo(\n        appInfo: ApplicationInfo,\n        pm: PackageManager,\n        selectedApps: Set<String>\n    ): AppInfo {\n        val appName = try {\n            pm.getApplicationLabel(appInfo).toString()\n        } catch (_: Exception) {\n            appInfo.packageName\n        }\n\n        return AppInfo(\n            appName,\n            appInfo.packageName,\n            selectedApps.contains(appInfo.packageName),\n            icon = null\n        )\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/fragments/ByeDpiCMDSettingsFragment.kt",
    "content": "package io.github.romanvht.byedpi.fragments\n\nimport android.net.VpnService\nimport android.os.Bundle\nimport android.view.View\nimport android.widget.EditText\nimport android.widget.ImageView\nimport android.widget.LinearLayout\nimport android.widget.TextView\nimport android.widget.Toast\nimport androidx.preference.*\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.utility.findPreferenceNotNull\nimport androidx.appcompat.app.AlertDialog\nimport io.github.romanvht.byedpi.data.AppStatus\nimport io.github.romanvht.byedpi.data.Command\nimport io.github.romanvht.byedpi.data.Mode\nimport io.github.romanvht.byedpi.services.ServiceManager\nimport io.github.romanvht.byedpi.services.appStatus\nimport io.github.romanvht.byedpi.utility.ClipboardUtils\nimport io.github.romanvht.byedpi.utility.HistoryUtils\nimport io.github.romanvht.byedpi.utility.getPreferences\nimport io.github.romanvht.byedpi.utility.mode\n\nclass ByeDpiCMDSettingsFragment : PreferenceFragmentCompat() {\n\n    private lateinit var cmdHistoryUtils: HistoryUtils\n    private lateinit var editTextPreference: EditTextPreference\n    private lateinit var historyHeader: Preference\n    private val historyPreferences = mutableListOf<Preference>()\n\n    override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {\n        setPreferencesFromResource(R.xml.byedpi_cmd_settings, rootKey)\n\n        cmdHistoryUtils = HistoryUtils(requireContext())\n\n        editTextPreference = findPreferenceNotNull(\"byedpi_cmd_args\")\n        historyHeader = findPreferenceNotNull(\"cmd_history_header\")\n\n        editTextPreference.setOnPreferenceChangeListener { _, newValue ->\n            val newCommand = newValue.toString()\n\n            if (newCommand.isNotBlank()) {\n                cmdHistoryUtils.addCommand(newCommand)\n                restartService()\n            }\n\n            updateHistoryItems()\n            true\n        }\n\n        historyHeader.setOnPreferenceClickListener {\n            showHistoryClearDialog()\n            true\n        }\n\n        updateHistoryItems()\n    }\n\n    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\n        super.onViewCreated(view, savedInstanceState)\n\n        view.post {\n            view.findViewById<View>(R.id.btn_clear)?.setOnClickListener {\n                editTextPreference.text = \"\"\n                updateHistoryItems()\n            }\n\n            view.findViewById<View>(R.id.btn_paste)?.setOnClickListener {\n                val text = ClipboardUtils.paste(requireContext())\n                if (!text.isNullOrBlank()) {\n                    editTextPreference.text = text\n                    cmdHistoryUtils.addCommand(text)\n                    updateHistoryItems()\n                }\n            }\n        }\n    }\n\n    private fun updateHistoryItems() {\n        if (listView !== null) {\n            listView.itemAnimator = null\n        }\n\n        historyPreferences.forEach { preference ->\n            preferenceScreen.removePreference(preference)\n        }\n\n        historyPreferences.clear()\n        val history = cmdHistoryUtils.getHistory()\n        historyHeader.isVisible = history.isNotEmpty()\n\n        if (history.isNotEmpty()) {\n            history.sortedWith(compareByDescending<Command> { it.pinned }.thenBy { history.indexOf(it) })\n                .forEachIndexed { _, command ->\n                    val preference = createPreference(command)\n                    historyPreferences.add(preference)\n                    preferenceScreen.addPreference(preference)\n                }\n        }\n    }\n\n    private fun createPreference(command: Command) =\n        object : Preference(requireContext()) {\n            override fun onBindViewHolder(holder: PreferenceViewHolder) {\n                super.onBindViewHolder(holder)\n\n                val nameView = holder.itemView.findViewById<TextView>(R.id.command_name)\n                val summaryView = holder.itemView.findViewById<TextView>(android.R.id.summary)\n                val pinIcon = holder.itemView.findViewById<ImageView>(R.id.pin_icon)\n                val commandName = command.name\n\n                if (!commandName.isNullOrBlank()) {\n                    nameView.visibility = View.VISIBLE\n                    nameView.text = command.name\n                } else {\n                    nameView.visibility = View.GONE\n                }\n\n                val summaryText = buildSummary(command)\n                if (summaryText.isNotBlank()) {\n                    summaryView.visibility = View.VISIBLE\n                    summaryView.text = summaryText\n                } else {\n                    summaryView.visibility = View.GONE\n                }\n\n                pinIcon.visibility = if (command.pinned) View.VISIBLE else View.GONE\n            }\n        }.apply {\n            title = command.text\n            layoutResource = R.layout.history_item\n            setOnPreferenceClickListener {\n                showActionDialog(command)\n                true\n            }\n        }\n\n    private fun buildSummary(command: Command): String {\n        val parts = mutableListOf<String>()\n\n        if (command.text == editTextPreference.text) {\n            parts.add(getString(R.string.cmd_history_applied))\n        }\n\n        return parts.joinToString(\" • \")\n    }\n\n    private fun showHistoryClearDialog() {\n        val options = arrayOf(\n            getString(R.string.cmd_history_delete_unpinned),\n            getString(R.string.cmd_history_delete_all),\n        )\n\n        AlertDialog.Builder(requireContext())\n            .setTitle(getString(R.string.cmd_history_menu))\n            .setItems(options) { _, which ->\n                when (which) {\n                    0 -> deleteUnpinnedHistory()\n                    1 -> deleteAllHistory()\n                }\n            }\n            .setNegativeButton(getString(android.R.string.cancel), null)\n            .show()\n    }\n\n    private fun deleteAllHistory() {\n        cmdHistoryUtils.clearAllHistory()\n        updateHistoryItems()\n    }\n\n    private fun deleteUnpinnedHistory() {\n        cmdHistoryUtils.clearUnpinnedHistory()\n        updateHistoryItems()\n    }\n\n    private fun showActionDialog(command: Command) {\n        val options = arrayOf(\n            getString(R.string.cmd_history_apply),\n            if (command.pinned) getString(R.string.cmd_history_unpin) else getString(R.string.cmd_history_pin),\n            getString(R.string.cmd_history_rename),\n            getString(R.string.cmd_history_edit),\n            getString(R.string.cmd_history_copy),\n            getString(R.string.cmd_history_delete)\n        )\n\n        AlertDialog.Builder(requireContext())\n            .setTitle(getString(R.string.cmd_history_menu))\n            .setItems(options) { _, which ->\n                when (which) {\n                    0 -> applyCommand(command.text)\n                    1 -> if (command.pinned) unpinCommand(command.text) else pinCommand(command.text)\n                    2 -> showRenameDialog(command)\n                    3 -> showEditDialog(command)\n                    4 -> ClipboardUtils.copy(requireContext(), command.text, \"command\")\n                    5 -> deleteCommand(command.text)\n                }\n            }\n            .show()\n    }\n\n    private fun showRenameDialog(command: Command) {\n        val input = EditText(requireContext()).apply {\n            setText(command.name)\n        }\n\n        val container = LinearLayout(context).apply {\n            orientation = LinearLayout.VERTICAL\n            setPadding(50, 20, 50, 20)\n            addView(input)\n        }\n\n        AlertDialog.Builder(requireContext())\n            .setTitle(getString(R.string.cmd_history_rename))\n            .setView(container)\n            .setPositiveButton(getString(android.R.string.ok)) { _, _ ->\n                val newName = input.text.toString()\n                if (newName != command.name) {\n                    cmdHistoryUtils.renameCommand(command.text, newName)\n                    updateHistoryItems()\n                }\n            }\n            .setNegativeButton(getString(android.R.string.cancel), null)\n            .show()\n    }\n\n    private fun showEditDialog(command: Command) {\n        val input = EditText(requireContext()).apply {\n            setText(command.text)\n        }\n\n        val container = LinearLayout(context).apply {\n            orientation = LinearLayout.VERTICAL\n            setPadding(50, 20, 50, 20)\n            addView(input)\n        }\n\n        AlertDialog.Builder(requireContext())\n            .setTitle(getString(R.string.cmd_history_edit))\n            .setView(container)\n            .setPositiveButton(getString(android.R.string.ok)) { _, _ ->\n                val newText = input.text.toString()\n                if (newText.isNotBlank() && newText != command.text) {\n                    cmdHistoryUtils.editCommand(command.text, newText)\n                    if (editTextPreference.text == command.text) applyCommand(newText)\n                    updateHistoryItems()\n                }\n            }\n            .setNegativeButton(getString(android.R.string.cancel), null)\n            .show()\n    }\n\n    private fun applyCommand(command: String) {\n        editTextPreference.text = command\n        updateHistoryItems()\n        restartService()\n    }\n\n    private fun pinCommand(command: String) {\n        cmdHistoryUtils.pinCommand(command)\n        updateHistoryItems()\n    }\n\n    private fun unpinCommand(command: String) {\n        cmdHistoryUtils.unpinCommand(command)\n        updateHistoryItems()\n    }\n\n    private fun deleteCommand(command: String) {\n        cmdHistoryUtils.deleteCommand(command)\n        updateHistoryItems()\n    }\n\n    private fun restartService() {\n        if (appStatus.first == AppStatus.Running) {\n            val ctx = context ?: return\n            val mode = ctx.getPreferences().mode()\n            if (mode == Mode.VPN && VpnService.prepare(ctx) != null) return\n\n            ServiceManager.restart(ctx, mode)\n            Toast.makeText(ctx, R.string.service_restart, Toast.LENGTH_SHORT).show()\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/fragments/ByeDpiUISettingsFragment.kt",
    "content": "package io.github.romanvht.byedpi.fragments\n\nimport android.content.SharedPreferences\nimport android.os.Bundle\nimport androidx.preference.*\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.data.UISettings\nimport io.github.romanvht.byedpi.data.UISettings.DesyncMethod.*\nimport io.github.romanvht.byedpi.data.UISettings.HostsMode.*\nimport io.github.romanvht.byedpi.utility.*\n\nclass ByeDpiUISettingsFragment : PreferenceFragmentCompat() {\n\n    private val preferenceListener =\n        SharedPreferences.OnSharedPreferenceChangeListener { _, _ ->\n            updatePreferences()\n        }\n\n    override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {\n        setPreferencesFromResource(R.xml.byedpi_ui_settings, rootKey)\n\n        setEditTestPreferenceListenerInt(\n            \"byedpi_max_connections\",\n            1,\n            Short.MAX_VALUE.toInt()\n        )\n        setEditTestPreferenceListenerInt(\n            \"byedpi_buffer_size\",\n            1,\n            Int.MAX_VALUE / 4\n        )\n        setEditTestPreferenceListenerInt(\"byedpi_default_ttl\", 0, 255)\n        setEditTestPreferenceListenerInt(\n            \"byedpi_split_position\",\n            Int.MIN_VALUE,\n            Int.MAX_VALUE\n        )\n        setEditTestPreferenceListenerInt(\"byedpi_fake_ttl\", 1, 255)\n        setEditTestPreferenceListenerInt(\n            \"byedpi_tlsrec_position\",\n            2 * Short.MIN_VALUE,\n            2 * Short.MAX_VALUE,\n        )\n\n        findPreferenceNotNull<EditTextPreference>(\"byedpi_oob_data\")\n            .setOnBindEditTextListener {\n                it.filters = arrayOf(android.text.InputFilter.LengthFilter(1))\n            }\n\n        updatePreferences()\n    }\n\n    override fun onResume() {\n        super.onResume()\n        sharedPreferences?.registerOnSharedPreferenceChangeListener(preferenceListener)\n    }\n\n    override fun onPause() {\n        super.onPause()\n        sharedPreferences?.unregisterOnSharedPreferenceChangeListener(preferenceListener)\n    }\n\n    private fun updatePreferences() {\n        val desyncMethod = findPreferenceNotNull<ListPreference>(\"byedpi_desync_method\").value.let { UISettings.DesyncMethod.fromName(it) }\n        val hostsMode = findPreferenceNotNull<ListPreference>(\"byedpi_hosts_mode\").value.let { UISettings.HostsMode.fromName(it) }\n\n        val hostsBlacklist = findPreferenceNotNull<EditTextPreference>(\"byedpi_hosts_blacklist\")\n        val hostsWhitelist = findPreferenceNotNull<EditTextPreference>(\"byedpi_hosts_whitelist\")\n        val desyncHttp = findPreferenceNotNull<CheckBoxPreference>(\"byedpi_desync_http\")\n        val desyncHttps = findPreferenceNotNull<CheckBoxPreference>(\"byedpi_desync_https\")\n        val desyncUdp = findPreferenceNotNull<CheckBoxPreference>(\"byedpi_desync_udp\")\n        val splitPosition = findPreferenceNotNull<EditTextPreference>(\"byedpi_split_position\")\n        val splitAtHost = findPreferenceNotNull<CheckBoxPreference>(\"byedpi_split_at_host\")\n        val ttlFake = findPreferenceNotNull<EditTextPreference>(\"byedpi_fake_ttl\")\n        val fakeSni = findPreferenceNotNull<EditTextPreference>(\"byedpi_fake_sni\")\n        val fakeOffset = findPreferenceNotNull<EditTextPreference>(\"byedpi_fake_offset\")\n        val oobChar = findPreferenceNotNull<EditTextPreference>(\"byedpi_oob_data\")\n        val udpFakeCount = findPreferenceNotNull<EditTextPreference>(\"byedpi_udp_fake_count\")\n        val hostMixedCase = findPreferenceNotNull<CheckBoxPreference>(\"byedpi_host_mixed_case\")\n        val domainMixedCase = findPreferenceNotNull<CheckBoxPreference>(\"byedpi_domain_mixed_case\")\n        val hostRemoveSpaces = findPreferenceNotNull<CheckBoxPreference>(\"byedpi_host_remove_spaces\")\n        val splitTlsRec = findPreferenceNotNull<CheckBoxPreference>(\"byedpi_tlsrec_enabled\")\n        val splitTlsRecPosition = findPreferenceNotNull<EditTextPreference>(\"byedpi_tlsrec_position\")\n        val splitTlsRecAtSni = findPreferenceNotNull<CheckBoxPreference>(\"byedpi_tlsrec_at_sni\")\n\n        hostsBlacklist.isVisible = hostsMode == Blacklist\n        hostsWhitelist.isVisible = hostsMode == Whitelist\n\n        val desyncEnabled = desyncMethod != None\n        splitPosition.isVisible = desyncEnabled\n        splitAtHost.isVisible = desyncEnabled\n\n        val isFake = desyncMethod == Fake\n        ttlFake.isVisible = isFake\n        fakeSni.isVisible = isFake\n        fakeOffset.isVisible = isFake\n\n        val isOob = desyncMethod == OOB || desyncMethod == DISOOB\n        oobChar.isVisible = isOob\n\n        val desyncAllProtocols = !desyncHttp.isChecked && !desyncHttps.isChecked && !desyncUdp.isChecked\n\n        val desyncHttpEnabled = desyncAllProtocols || desyncHttp.isChecked\n        hostMixedCase.isEnabled = desyncHttpEnabled\n        domainMixedCase.isEnabled = desyncHttpEnabled\n        hostRemoveSpaces.isEnabled = desyncHttpEnabled\n\n        val desyncUdpEnabled = desyncAllProtocols || desyncUdp.isChecked\n        udpFakeCount.isEnabled = desyncUdpEnabled\n\n        val desyncHttpsEnabled = desyncAllProtocols || desyncHttps.isChecked\n        splitTlsRec.isEnabled = desyncHttpsEnabled\n        val tlsRecEnabled = desyncHttpsEnabled && splitTlsRec.isChecked\n        splitTlsRecPosition.isEnabled = tlsRecEnabled\n        splitTlsRecAtSni.isEnabled = tlsRecEnabled\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/fragments/DomainListsFragment.kt",
    "content": "package io.github.romanvht.byedpi.fragments\n\nimport android.os.Bundle\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.EditText\nimport android.widget.LinearLayout\nimport android.widget.Toast\nimport androidx.appcompat.app.AlertDialog\nimport androidx.fragment.app.Fragment\nimport androidx.recyclerview.widget.LinearLayoutManager\nimport androidx.recyclerview.widget.RecyclerView\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.adapters.DomainListAdapter\nimport io.github.romanvht.byedpi.data.DomainList\nimport io.github.romanvht.byedpi.utility.ClipboardUtils\nimport io.github.romanvht.byedpi.utility.DomainListUtils\n\nclass DomainListsFragment : Fragment() {\n\n    private lateinit var recyclerView: RecyclerView\n    private lateinit var adapter: DomainListAdapter\n\n    override fun onCreateView(\n        inflater: LayoutInflater,\n        container: ViewGroup?,\n        savedInstanceState: Bundle?\n    ): View? {\n        return inflater.inflate(R.layout.domain_lists, container, false)\n    }\n\n    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\n        super.onViewCreated(view, savedInstanceState)\n\n        DomainListUtils.initializeDefaultLists(requireContext())\n        recyclerView = view.findViewById(R.id.domain_lists_recycler)\n\n        view.findViewById<View>(R.id.add_new_list_button).setOnClickListener {\n            showAddDialog()\n        }\n\n        adapter = DomainListAdapter(\n            onStateChanged = { domainList ->\n                DomainListUtils.toggleListActive(requireContext(), domainList.id)\n                refreshLists()\n            },\n            onEdit = { domainList ->\n                showEditDialog(domainList)\n            },\n            onDelete = { domainList ->\n                DomainListUtils.deleteList(requireContext(), domainList.id)\n                refreshLists()\n            },\n            onCopy = { domainList ->\n                copyDomainsToClipboard(domainList)\n            }\n        )\n\n        recyclerView.layoutManager = LinearLayoutManager(requireContext())\n        recyclerView.adapter = adapter\n\n        refreshLists()\n    }\n\n    private fun refreshLists() {\n        val lists = DomainListUtils.getLists(requireContext())\n        adapter.submitList(lists.sortedBy { it.name.lowercase() })\n    }\n\n    private fun copyDomainsToClipboard(domainList: DomainList) {\n        val domainsText = domainList.domains.joinToString(\"\\n\")\n        ClipboardUtils.copy(requireContext(), domainsText, domainList.name, showToast = false)\n        Toast.makeText(requireContext(), R.string.toast_copied, Toast.LENGTH_SHORT).show()\n    }\n\n    private fun showAddDialog() {\n        val context = requireContext()\n        val layout = LinearLayout(context).apply {\n            orientation = LinearLayout.VERTICAL\n            setPadding(50, 40, 50, 10)\n        }\n\n        val nameInput = EditText(context).apply {\n            hint = getString(R.string.domain_list_name_hint)\n        }\n\n        val domainsInput = EditText(context).apply {\n            hint = getString(R.string.domain_list_domains_hint)\n            minLines = 5\n            gravity = android.view.Gravity.BOTTOM\n        }\n\n        layout.addView(nameInput)\n        layout.addView(domainsInput)\n\n        AlertDialog.Builder(context, R.style.CustomAlertDialog)\n            .setTitle(R.string.domain_list_add_new)\n            .setView(layout)\n            .setPositiveButton(android.R.string.ok) { _, _ ->\n                val name = nameInput.text.toString().trim()\n                val domainsText = domainsInput.text.toString()\n                val domains = domainsText.lines()\n                    .map { it.trim() }\n                    .filter { it.isNotEmpty() }\n\n                if (name.isEmpty()) {\n                    Toast.makeText(context, R.string.domain_list_name_empty, Toast.LENGTH_SHORT).show()\n                    return@setPositiveButton\n                }\n\n                if (domains.isEmpty()) {\n                    Toast.makeText(context, R.string.domain_list_domains_empty, Toast.LENGTH_SHORT).show()\n                    return@setPositiveButton\n                }\n\n                if (DomainListUtils.addList(context, name, domains)) {\n                    Toast.makeText(context, R.string.domain_list_added, Toast.LENGTH_SHORT).show()\n                    refreshLists()\n                } else {\n                    Toast.makeText(context, R.string.domain_list_already_exists, Toast.LENGTH_SHORT).show()\n                }\n            }\n            .setNegativeButton(android.R.string.cancel, null)\n            .show()\n    }\n\n    private fun showEditDialog(domainList: DomainList) {\n        val context = requireContext()\n        val layout = LinearLayout(context).apply {\n            orientation = LinearLayout.VERTICAL\n            setPadding(50, 40, 50, 10)\n        }\n\n        val nameInput = EditText(context).apply {\n            hint = getString(R.string.domain_list_name_hint)\n            setText(domainList.name)\n        }\n\n        val domainsInput = EditText(context).apply {\n            hint = getString(R.string.domain_list_domains_hint)\n            minLines = 5\n            gravity = android.view.Gravity.BOTTOM\n            setText(domainList.domains.joinToString(\"\\n\"))\n        }\n\n        layout.addView(nameInput)\n        layout.addView(domainsInput)\n\n        AlertDialog.Builder(context, R.style.CustomAlertDialog)\n            .setTitle(R.string.domain_list_edit)\n            .setView(layout)\n            .setPositiveButton(android.R.string.ok) { _, _ ->\n                val name = nameInput.text.toString().trim()\n                val domainsText = domainsInput.text.toString()\n                val domains = domainsText.lines()\n                    .map { it.trim() }\n                    .filter { it.isNotEmpty() }\n\n                if (name.isEmpty()) {\n                    Toast.makeText(context, R.string.domain_list_name_empty, Toast.LENGTH_SHORT).show()\n                    return@setPositiveButton\n                }\n\n                if (domains.isEmpty()) {\n                    Toast.makeText(context, R.string.domain_list_domains_empty, Toast.LENGTH_SHORT).show()\n                    return@setPositiveButton\n                }\n\n                if (DomainListUtils.updateList(context, domainList.id, name, domains)) {\n                    Toast.makeText(context, R.string.domain_list_updated, Toast.LENGTH_SHORT).show()\n                    refreshLists()\n                } else {\n                    Toast.makeText(context, R.string.domain_list_update_failed, Toast.LENGTH_SHORT).show()\n                }\n            }\n            .setNegativeButton(android.R.string.cancel, null)\n            .show()\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/fragments/MainSettingsFragment.kt",
    "content": "package io.github.romanvht.byedpi.fragments\n\nimport android.content.Intent\nimport android.content.SharedPreferences\nimport android.os.Bundle\nimport android.util.Log\nimport androidx.preference.*\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.BuildConfig\nimport io.github.romanvht.byedpi.activities.TestActivity\nimport io.github.romanvht.byedpi.data.Mode\nimport io.github.romanvht.byedpi.utility.*\n\nclass MainSettingsFragment : PreferenceFragmentCompat() {\n    companion object {\n        private val TAG: String = MainSettingsFragment::class.java.simpleName\n    }\n\n    private val preferenceListener =\n        SharedPreferences.OnSharedPreferenceChangeListener { _, _ ->\n            updatePreferences()\n        }\n\n    override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {\n        setPreferencesFromResource(R.xml.main_settings, rootKey)\n\n        setEditTextPreferenceListener(\"byedpi_proxy_ip\") { checkIp(it) }\n        setEditTestPreferenceListenerPort(\"byedpi_proxy_port\")\n        setEditTextPreferenceListener(\"dns_ip\") { it.isBlank() || checkNotLocalIp(it) }\n\n        findPreferenceNotNull<ListPreference>(\"language\")\n            .setOnPreferenceChangeListener { _, newValue ->\n                SettingsUtils.setLang(newValue as String)\n                true\n            }\n\n        findPreferenceNotNull<ListPreference>(\"app_theme\")\n            .setOnPreferenceChangeListener { _, newValue ->\n                SettingsUtils.setTheme(newValue as String)\n                true\n            }\n\n        findPreferenceNotNull<Preference>(\"proxy_test\")\n            .setOnPreferenceClickListener {\n                val intent = Intent(context, TestActivity::class.java)\n                startActivity(intent)\n                true\n            }\n\n        findPreferenceNotNull<Preference>(\"battery_optimization\")\n            .setOnPreferenceClickListener {\n                BatteryUtils.requestBatteryOptimization(requireContext())\n                true\n            }\n\n        findPreferenceNotNull<Preference>(\"storage_access\")\n            .setOnPreferenceClickListener {\n                StorageUtils.requestStoragePermission(this)\n                true\n            }\n\n        findPreferenceNotNull<Preference>(\"version\").summary = BuildConfig.VERSION_NAME\n        findPreferenceNotNull<Preference>(\"byedpi_version\").summary = \"0.17.3\"\n\n        updatePreferences()\n    }\n\n    override fun onResume() {\n        super.onResume()\n        sharedPreferences?.registerOnSharedPreferenceChangeListener(preferenceListener)\n        updatePreferences()\n    }\n\n    override fun onPause() {\n        super.onPause()\n        sharedPreferences?.unregisterOnSharedPreferenceChangeListener(preferenceListener)\n    }\n\n    private fun updatePreferences() {\n        val cmdEnable = findPreferenceNotNull<SwitchPreference>(\"byedpi_enable_cmd_settings\").isChecked\n        val mode = findPreferenceNotNull<ListPreference>(\"byedpi_mode\").value.let { Mode.fromString(it) }\n        val dns = findPreferenceNotNull<EditTextPreference>(\"dns_ip\")\n        val ipv6 = findPreferenceNotNull<SwitchPreference>(\"ipv6_enable\")\n        val proxy = findPreferenceNotNull<PreferenceCategory>(\"byedpi_proxy_category\")\n\n        val applistType = findPreferenceNotNull<ListPreference>(\"applist_type\")\n        val selectedApps = findPreferenceNotNull<Preference>(\"selected_apps\")\n        val batteryOptimization = findPreferenceNotNull<Preference>(\"battery_optimization\")\n        val storageAccess = findPreferenceNotNull<Preference>(\"storage_access\")\n\n        val uiSettings = findPreferenceNotNull<Preference>(\"byedpi_ui_settings\")\n        val cmdSettings = findPreferenceNotNull<Preference>(\"byedpi_cmd_settings\")\n        val proxyTest = findPreferenceNotNull<Preference>(\"proxy_test\")\n\n        if (cmdEnable) {\n            val (cmdIp, cmdPort) = sharedPreferences?.checkIpAndPortInCmd() ?: Pair(null, null)\n            proxy.isVisible = cmdIp == null && cmdPort == null\n        } else {\n            proxy.isVisible = true\n        }\n\n        uiSettings.isEnabled = !cmdEnable\n        cmdSettings.isEnabled = cmdEnable\n        proxyTest.isEnabled = cmdEnable\n\n        when (mode) {\n            Mode.VPN -> {\n                dns.isVisible = true\n                ipv6.isVisible = true\n\n                when (applistType.value) {\n                    \"disable\" -> {\n                        applistType.isVisible = true\n                        selectedApps.isVisible = false\n                    }\n                    \"blacklist\", \"whitelist\" -> {\n                        applistType.isVisible = true\n                        selectedApps.isVisible = true\n                    }\n                    else -> {\n                        applistType.isVisible = true\n                        selectedApps.isVisible = false\n                        Log.w(TAG, \"Unexpected applistType value: ${applistType.value}\")\n                    }\n                }\n            }\n\n            Mode.Proxy -> {\n                dns.isVisible = false\n                ipv6.isVisible = false\n                applistType.isVisible = false\n                selectedApps.isVisible = false\n            }\n        }\n\n        if (BatteryUtils.isOptimizationDisabled(requireContext())) {\n            batteryOptimization.summary = getString(R.string.battery_optimization_disabled_summary)\n        } else {\n            batteryOptimization.summary = getString(R.string.battery_optimization_summary)\n        }\n\n        if (StorageUtils.hasStoragePermission(requireContext())) {\n            storageAccess.summary = getString(R.string.storage_access_allowed_summary)\n        } else {\n            storageAccess.summary = getString(R.string.storage_access_summary)\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/fragments/ProxyTestSettingsFragment.kt",
    "content": "package io.github.romanvht.byedpi.fragments\n\nimport android.content.SharedPreferences\nimport android.os.Bundle\nimport androidx.preference.*\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.utility.*\n\nclass ProxyTestSettingsFragment : PreferenceFragmentCompat() {\n\n    private val preferenceListener =\n        SharedPreferences.OnSharedPreferenceChangeListener { _, _ ->\n            updatePreferences()\n        }\n\n    override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {\n        setPreferencesFromResource(R.xml.proxy_test_settings, rootKey)\n\n        setupNumberSummary(\"byedpi_proxytest_delay\", R.string.proxytest_delay_desc)\n        setupNumberSummary(\"byedpi_proxytest_requests\", R.string.proxytest_requests_desc)\n        setupNumberSummary(\"byedpi_proxytest_limit\", R.string.proxytest_limit_desc)\n        setupNumberSummary(\"byedpi_proxytest_timeout\", R.string.proxytest_timeout_desc)\n\n        setEditTestPreferenceListenerInt(\"byedpi_proxytest_delay\", 0, 10)\n        setEditTestPreferenceListenerInt(\"byedpi_proxytest_requests\", 1, 20)\n        setEditTestPreferenceListenerInt(\"byedpi_proxytest_timeout\", 1, 15)\n        setEditTestPreferenceListenerInt(\"byedpi_proxytest_limit\", 1, 50)\n\n        setEditTestPreferenceListenerDomain(\"byedpi_proxytest_sni\")\n\n        updatePreferences()\n    }\n\n    override fun onResume() {\n        super.onResume()\n        sharedPreferences?.registerOnSharedPreferenceChangeListener(preferenceListener)\n    }\n\n    override fun onPause() {\n        super.onPause()\n        sharedPreferences?.unregisterOnSharedPreferenceChangeListener(preferenceListener)\n    }\n\n    private fun updatePreferences() {\n        val switchUserCommands = findPreferenceNotNull<SwitchPreference>(\"byedpi_proxytest_usercommands\")\n        val textUserCommands = findPreferenceNotNull<EditTextPreference>(\"byedpi_proxytest_commands\")\n        val manageDomainLists = findPreferenceNotNull<Preference>(\"manage_domain_lists\")\n        val activeLists = DomainListUtils.getLists(requireContext()).filter { it.isActive }\n\n        manageDomainLists.summary = if (activeLists.isEmpty()) {\n            getString(R.string.domain_lists_summary)\n        } else {\n            activeLists.joinToString(\", \") { it.name }\n        }\n\n        textUserCommands.isEnabled = switchUserCommands.isChecked\n    }\n\n    private fun setupNumberSummary(key: String, descriptionResId: Int) {\n        val pref = findPreference<EditTextPreference>(key) ?: return\n\n        pref.summaryProvider = Preference.SummaryProvider<EditTextPreference> { p ->\n            val value = p.text ?: \"—\"\n            val description = getString(descriptionResId)\n            \"$value - $description\"\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/receiver/BootReceiver.kt",
    "content": "package io.github.romanvht.byedpi.receiver\n\nimport android.content.BroadcastReceiver\nimport android.content.Context\nimport android.content.Intent\nimport android.net.VpnService\nimport android.os.SystemClock\nimport io.github.romanvht.byedpi.data.Mode\nimport io.github.romanvht.byedpi.services.ServiceManager\nimport io.github.romanvht.byedpi.utility.getPreferences\nimport io.github.romanvht.byedpi.utility.mode\n\nclass BootReceiver : BroadcastReceiver() {\n    override fun onReceive(context: Context, intent: Intent) {\n        if (intent.action == Intent.ACTION_BOOT_COMPLETED ||\n            intent.action == Intent.ACTION_REBOOT ||\n            intent.action == \"android.intent.action.QUICKBOOT_POWERON\") {\n\n            // for A15, todo: use wasForceStopped\n            if (SystemClock.elapsedRealtime() > 5 * 60 * 1000) {\n                return\n            }\n\n            val preferences = context.getPreferences()\n            val autorunEnabled = preferences.getBoolean(\"autostart\", false)\n\n            if(autorunEnabled) {\n                when (preferences.mode()) {\n                    Mode.VPN -> {\n                        if (VpnService.prepare(context) == null) {\n                            ServiceManager.start(context, Mode.VPN)\n                        }\n                    }\n\n                    Mode.Proxy -> ServiceManager.start(context, Mode.Proxy)\n                }\n            }\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/services/ByeDpiProxyService.kt",
    "content": "package io.github.romanvht.byedpi.services\n\nimport android.app.Notification\nimport android.app.NotificationManager\nimport android.content.Intent\nimport android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE\nimport android.os.Build\nimport android.util.Log\nimport androidx.lifecycle.LifecycleService\nimport androidx.lifecycle.lifecycleScope\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.core.ByeDpiProxy\nimport io.github.romanvht.byedpi.core.ByeDpiProxyPreferences\nimport io.github.romanvht.byedpi.data.*\nimport io.github.romanvht.byedpi.utility.*\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.Job\nimport kotlinx.coroutines.delay\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.sync.Mutex\nimport kotlinx.coroutines.sync.withLock\nimport kotlinx.coroutines.withContext\nimport kotlinx.coroutines.withTimeoutOrNull\n\nclass ByeDpiProxyService : LifecycleService() {\n    private var proxy = ByeDpiProxy()\n    private var proxyJob: Job? = null\n    private val mutex = Mutex()\n\n    companion object {\n        private val TAG: String = ByeDpiProxyService::class.java.simpleName\n        private const val FOREGROUND_SERVICE_ID: Int = 2\n        private const val PAUSE_NOTIFICATION_ID: Int = 3\n        private const val NOTIFICATION_CHANNEL_ID: String = \"ByeDPI Proxy\"\n\n        private var status: ServiceStatus = ServiceStatus.Disconnected\n    }\n\n    override fun onCreate() {\n        super.onCreate()\n        registerNotificationChannel(\n            this,\n            NOTIFICATION_CHANNEL_ID,\n            R.string.proxy_channel_name,\n        )\n    }\n\n    override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {\n        super.onStartCommand(intent, flags, startId)\n\n        startForeground()\n\n        return when (val action = intent?.action) {\n            START_ACTION -> {\n                lifecycleScope.launch {\n                    start()\n                }\n                START_STICKY\n            }\n\n            STOP_ACTION -> {\n                lifecycleScope.launch {\n                    stop()\n                }\n                START_NOT_STICKY\n            }\n\n            RESUME_ACTION -> {\n                lifecycleScope.launch {\n                    start()\n                }\n                START_STICKY\n            }\n\n            PAUSE_ACTION -> {\n                lifecycleScope.launch {\n                    stop()\n                    createNotificationPause()\n                }\n                START_NOT_STICKY\n            }\n\n            else -> {\n                Log.w(TAG, \"Unknown action: $action\")\n                START_NOT_STICKY\n            }\n        }\n    }\n\n    private suspend fun start() {\n        Log.i(TAG, \"Starting\")\n\n        val notificationManager = getSystemService(NOTIFICATION_SERVICE) as NotificationManager\n        notificationManager.cancel(PAUSE_NOTIFICATION_ID)\n\n        if (status == ServiceStatus.Connected) {\n            Log.w(TAG, \"Proxy already connected\")\n            return\n        }\n\n        try {\n            mutex.withLock {\n                if (status == ServiceStatus.Connected) {\n                    Log.w(TAG, \"Proxy already connected\")\n                    return@withLock\n                }\n                startProxy()\n                updateStatus(ServiceStatus.Connected)\n            }\n        } catch (e: Exception) {\n            Log.e(TAG, \"Failed to start proxy\", e)\n            updateStatus(ServiceStatus.Failed)\n            stop()\n        }\n    }\n\n    private fun startForeground() {\n        val notification: Notification = createNotification()\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {\n            startForeground(\n                FOREGROUND_SERVICE_ID,\n                notification,\n                FOREGROUND_SERVICE_TYPE_SPECIAL_USE,\n            )\n        } else {\n            startForeground(FOREGROUND_SERVICE_ID, notification)\n        }\n    }\n\n    private suspend fun stop() {\n        Log.i(TAG, \"Stopping\")\n\n        mutex.withLock {\n            withContext(Dispatchers.IO) {\n                stopProxy()\n            }\n            updateStatus(ServiceStatus.Disconnected)\n        }\n\n        stopSelf()\n    }\n\n    private fun startProxy() {\n        Log.i(TAG, \"Starting proxy\")\n\n        if (proxyJob != null) {\n            Log.w(TAG, \"Proxy fields not null\")\n            throw IllegalStateException(\"Proxy fields not null\")\n        }\n\n        proxy = ByeDpiProxy()\n        val preferences = getByeDpiPreferences()\n\n        proxyJob = lifecycleScope.launch(Dispatchers.IO) {\n            val code = proxy.startProxy(preferences)\n            delay(500)\n\n            if (code != 0) {\n                Log.e(TAG, \"Proxy stopped with code $code\")\n                updateStatus(ServiceStatus.Failed)\n            } else {\n                updateStatus(ServiceStatus.Disconnected)\n            }\n\n            stopSelf()\n        }\n\n        Log.i(TAG, \"Proxy started\")\n    }\n\n    private suspend fun stopProxy() {\n        Log.i(TAG, \"Stopping proxy\")\n\n        if (status == ServiceStatus.Disconnected) {\n            Log.w(TAG, \"Proxy already disconnected\")\n            return\n        }\n\n        try {\n            proxy.stopProxy()\n            proxyJob?.cancel()\n\n            val completed = withTimeoutOrNull(2000) {\n                proxyJob?.join()\n                true\n            }\n\n            if (completed == null) {\n                Log.w(TAG, \"proxy not finish in time, cancelling...\")\n                proxy.jniForceClose()\n            }\n\n            proxyJob = null\n        } catch (e: Exception) {\n            Log.e(TAG, \"Failed to close proxyJob\", e)\n        }\n\n        Log.i(TAG, \"Proxy stopped\")\n    }\n\n    private fun getByeDpiPreferences(): ByeDpiProxyPreferences =\n        ByeDpiProxyPreferences.fromSharedPreferences(getPreferences(), this)\n\n    private fun updateStatus(newStatus: ServiceStatus) {\n        Log.d(TAG, \"Proxy status changed from $status to $newStatus\")\n\n        status = newStatus\n\n        setStatus(\n            when (newStatus) {\n                ServiceStatus.Connected -> AppStatus.Running\n                ServiceStatus.Disconnected,\n                ServiceStatus.Failed -> {\n                    proxyJob = null\n                    AppStatus.Halted\n                }\n            },\n            Mode.Proxy\n        )\n\n        val intent = Intent(\n            when (newStatus) {\n                ServiceStatus.Connected -> STARTED_BROADCAST\n                ServiceStatus.Disconnected -> STOPPED_BROADCAST\n                ServiceStatus.Failed -> FAILED_BROADCAST\n            }\n        )\n        intent.putExtra(SENDER, Sender.Proxy.ordinal)\n        sendBroadcast(intent)\n\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n            QuickTileService.updateTile()\n        }\n    }\n\n    private fun createNotification(): Notification =\n        createConnectionNotification(\n            this,\n            NOTIFICATION_CHANNEL_ID,\n            R.string.notification_title,\n            R.string.proxy_notification_content,\n            ByeDpiProxyService::class.java,\n        )\n\n    private fun createNotificationPause() {\n        val notification = createPauseNotification(\n            this,\n            NOTIFICATION_CHANNEL_ID,\n            R.string.notification_title,\n            R.string.service_paused_text,\n            ByeDpiProxyService::class.java,\n        )\n\n        val notificationManager = getSystemService(NOTIFICATION_SERVICE) as NotificationManager\n        notificationManager.notify(PAUSE_NOTIFICATION_ID, notification)\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/services/ByeDpiStatus.kt",
    "content": "package io.github.romanvht.byedpi.services\n\nimport io.github.romanvht.byedpi.data.AppStatus\nimport io.github.romanvht.byedpi.data.Mode\n\nvar appStatus = AppStatus.Halted to Mode.VPN\n    private set\n\nfun setStatus(status: AppStatus, mode: Mode) {\n    appStatus = status to mode\n}\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/services/ByeDpiVpnService.kt",
    "content": "package io.github.romanvht.byedpi.services\n\nimport android.app.Notification\nimport android.app.NotificationManager\nimport android.app.PendingIntent\nimport android.content.Intent\nimport android.content.pm.ServiceInfo\nimport android.os.Build\nimport android.os.ParcelFileDescriptor\nimport android.util.Log\nimport androidx.lifecycle.lifecycleScope\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.activities.MainActivity\nimport io.github.romanvht.byedpi.core.ByeDpiProxy\nimport io.github.romanvht.byedpi.core.ByeDpiProxyPreferences\nimport io.github.romanvht.byedpi.core.TProxyService\nimport io.github.romanvht.byedpi.data.*\nimport io.github.romanvht.byedpi.utility.*\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.Job\nimport kotlinx.coroutines.delay\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.sync.Mutex\nimport kotlinx.coroutines.sync.withLock\nimport kotlinx.coroutines.withContext\nimport kotlinx.coroutines.withTimeoutOrNull\nimport java.io.File\n\nclass ByeDpiVpnService : LifecycleVpnService() {\n    private val byeDpiProxy = ByeDpiProxy()\n    private var proxyJob: Job? = null\n    private var tunFd: ParcelFileDescriptor? = null\n    private val mutex = Mutex()\n\n    companion object {\n        private val TAG: String = ByeDpiVpnService::class.java.simpleName\n        private const val FOREGROUND_SERVICE_ID: Int = 1\n        private const val PAUSE_NOTIFICATION_ID: Int = 3\n        private const val NOTIFICATION_CHANNEL_ID: String = \"ByeDPIVpn\"\n\n        private var status: ServiceStatus = ServiceStatus.Disconnected\n    }\n\n    override fun onCreate() {\n        super.onCreate()\n        registerNotificationChannel(\n            this,\n            NOTIFICATION_CHANNEL_ID,\n            R.string.vpn_channel_name,\n        )\n    }\n\n    override fun onDestroy() {\n        super.onDestroy()\n        tunFd?.close()\n    }\n\n    override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {\n        super.onStartCommand(intent, flags, startId)\n\n        startForeground()\n\n        return when (val action = intent?.action) {\n            START_ACTION -> {\n                lifecycleScope.launch {\n                    start()\n                }\n                START_STICKY\n            }\n\n            STOP_ACTION -> {\n                lifecycleScope.launch {\n                    stop()\n                }\n                START_NOT_STICKY\n            }\n\n            RESUME_ACTION -> {\n                lifecycleScope.launch {\n                    if (prepare(this@ByeDpiVpnService) == null) {\n                        start()\n                    }\n                }\n                START_STICKY\n            }\n\n            PAUSE_ACTION -> {\n                lifecycleScope.launch {\n                    stop()\n                    createNotificationPause()\n                }\n                START_NOT_STICKY\n            }\n\n            else -> {\n                Log.w(TAG, \"Unknown action: $action\")\n                START_NOT_STICKY\n            }\n        }\n    }\n\n    override fun onRevoke() {\n        Log.i(TAG, \"VPN revoked\")\n        lifecycleScope.launch { stop() }\n    }\n\n    private suspend fun start() {\n        Log.i(TAG, \"Starting\")\n\n        val notificationManager = getSystemService(NOTIFICATION_SERVICE) as NotificationManager\n        notificationManager.cancel(PAUSE_NOTIFICATION_ID)\n\n        if (status == ServiceStatus.Connected) {\n            Log.w(TAG, \"VPN already connected\")\n            return\n        }\n\n        try {\n            mutex.withLock {\n                if (status == ServiceStatus.Connected) {\n                    Log.w(TAG, \"VPN already connected\")\n                    return@withLock\n                }\n                startProxy()\n                startTun2Socks()\n                updateStatus(ServiceStatus.Connected)\n            }\n        } catch (e: Exception) {\n            Log.e(TAG, \"Failed to start VPN\", e)\n            updateStatus(ServiceStatus.Failed)\n            stop()\n        }\n    }\n\n    private fun startForeground() {\n        val notification: Notification = createNotification()\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {\n            startForeground(\n                FOREGROUND_SERVICE_ID,\n                notification,\n                ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE,\n            )\n        } else {\n            startForeground(FOREGROUND_SERVICE_ID, notification)\n        }\n    }\n\n    private suspend fun stop() {\n        Log.i(TAG, \"Stopping\")\n\n        mutex.withLock {\n            try {\n                withContext(Dispatchers.IO) {\n                    stopProxy()\n                    stopTun2Socks()\n                }\n            } catch (e: Exception) {\n                Log.e(TAG, \"Failed to stop VPN\", e)\n            }\n            updateStatus(ServiceStatus.Disconnected)\n        }\n\n        stopSelf()\n    }\n\n    private fun startProxy() {\n        Log.i(TAG, \"Starting proxy\")\n\n        if (proxyJob != null) {\n            Log.w(TAG, \"Proxy fields not null\")\n            throw IllegalStateException(\"Proxy fields not null\")\n        }\n\n        val preferences = getByeDpiPreferences()\n\n        proxyJob = lifecycleScope.launch(Dispatchers.IO) {\n            val code = byeDpiProxy.startProxy(preferences)\n            delay(500)\n\n            if (code != 0) {\n                Log.e(TAG, \"Proxy stopped with code $code\")\n                updateStatus(ServiceStatus.Failed)\n            } else {\n                updateStatus(ServiceStatus.Disconnected)\n            }\n\n            stopTun2Socks()\n            stopSelf()\n        }\n\n        Log.i(TAG, \"Proxy started\")\n    }\n\n    private suspend fun stopProxy() {\n        Log.i(TAG, \"Stopping proxy\")\n\n        if (status == ServiceStatus.Disconnected) {\n            Log.w(TAG, \"Proxy already disconnected\")\n            return\n        }\n\n        try {\n            byeDpiProxy.stopProxy()\n            proxyJob?.cancel()\n\n            val completed = withTimeoutOrNull(2000) {\n                proxyJob?.join()\n                true\n            }\n\n            if (completed == null) {\n                Log.w(TAG, \"proxy not finish in time, cancelling...\")\n                byeDpiProxy.jniForceClose()\n            }\n\n            proxyJob = null\n        } catch (e: Exception) {\n            Log.e(TAG, \"Failed to close proxyJob\", e)\n        }\n\n        Log.i(TAG, \"Proxy stopped\")\n    }\n\n    private fun startTun2Socks() {\n        Log.i(TAG, \"Starting tun2socks\")\n\n        if (tunFd != null) {\n            throw IllegalStateException(\"VPN field not null\")\n        }\n\n        val sharedPreferences = getPreferences()\n        val (ip, port) = sharedPreferences.getProxyIpAndPort()\n\n        val dns = sharedPreferences.getStringNotNull(\"dns_ip\", \"8.8.8.8\")\n        val ipv6 = sharedPreferences.getBoolean(\"ipv6_enable\", false)\n\n        val tun2socksConfig = buildString {\n            appendLine(\"tunnel:\")\n            appendLine(\"  mtu: 8500\")\n\n            appendLine(\"misc:\")\n            appendLine(\"  task-stack-size: 81920\")\n\n            appendLine(\"socks5:\")\n            appendLine(\"  address: $ip\")\n            appendLine(\"  port: $port\")\n            appendLine(\"  udp: udp\")\n        }\n\n        val configPath = try {\n            File.createTempFile(\"config\", \"tmp\", cacheDir).apply {\n                writeText(tun2socksConfig)\n            }\n        } catch (e: Exception) {\n            Log.e(TAG, \"Failed to create config file\", e)\n            throw e\n        }\n\n        val fd = createBuilder(dns, ipv6).establish()\n            ?: throw IllegalStateException(\"VPN connection failed\")\n\n        this.tunFd = fd\n\n        TProxyService.TProxyStartService(configPath.absolutePath, fd.fd)\n\n        Log.i(TAG, \"Tun2Socks started. ip: $ip port: $port\")\n    }\n\n    private fun stopTun2Socks() {\n        Log.i(TAG, \"Stopping tun2socks\")\n\n        try {\n            TProxyService.TProxyStopService()\n        } catch (e: Exception) {\n            Log.e(TAG, \"Failed to stop TProxyService\", e)\n        }\n\n        try {\n            File(cacheDir, \"config.tmp\").delete()\n        } catch (e: SecurityException) {\n            Log.e(TAG, \"Failed to delete config file\", e)\n        }\n\n        try {\n            tunFd?.close()\n        } catch (e: Exception) {\n            Log.e(TAG, \"Failed to close tunFd\", e)\n        } finally {\n            tunFd = null\n        }\n\n        Log.i(TAG, \"Tun2socks stopped\")\n    }\n\n    private fun getByeDpiPreferences(): ByeDpiProxyPreferences =\n        ByeDpiProxyPreferences.fromSharedPreferences(getPreferences(), this)\n\n    private fun updateStatus(newStatus: ServiceStatus) {\n        Log.d(TAG, \"VPN status changed from $status to $newStatus\")\n\n        status = newStatus\n\n        setStatus(\n            when (newStatus) {\n                ServiceStatus.Connected -> AppStatus.Running\n\n                ServiceStatus.Disconnected,\n                ServiceStatus.Failed -> {\n                    proxyJob = null\n                    AppStatus.Halted\n                }\n            },\n            Mode.VPN\n        )\n\n        val intent = Intent(\n            when (newStatus) {\n                ServiceStatus.Connected -> STARTED_BROADCAST\n                ServiceStatus.Disconnected -> STOPPED_BROADCAST\n                ServiceStatus.Failed -> FAILED_BROADCAST\n            }\n        )\n        intent.putExtra(SENDER, Sender.VPN.ordinal)\n        sendBroadcast(intent)\n\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n            QuickTileService.updateTile()\n        }\n    }\n\n    private fun createNotification(): Notification =\n        createConnectionNotification(\n            this,\n            NOTIFICATION_CHANNEL_ID,\n            R.string.notification_title,\n            R.string.vpn_notification_content,\n            ByeDpiVpnService::class.java,\n        )\n\n    private fun createNotificationPause() {\n        val notification = createPauseNotification(\n            this,\n            NOTIFICATION_CHANNEL_ID,\n            R.string.notification_title,\n            R.string.service_paused_text,\n            ByeDpiVpnService::class.java,\n        )\n\n        val notificationManager = getSystemService(NOTIFICATION_SERVICE) as NotificationManager\n        notificationManager.notify(PAUSE_NOTIFICATION_ID, notification)\n    }\n\n    private fun createBuilder(dns: String, ipv6: Boolean): Builder {\n        Log.d(TAG, \"DNS: $dns\")\n        val builder = Builder()\n        builder.setSession(\"ByeDPI\")\n        builder.setConfigureIntent(\n            PendingIntent.getActivity(\n                this,\n                0,\n                Intent(this, MainActivity::class.java),\n                PendingIntent.FLAG_IMMUTABLE,\n            )\n        )\n\n        builder.addAddress(\"10.10.10.10\", 32)\n            .addRoute(\"0.0.0.0\", 0)\n\n        if (ipv6) {\n            builder.addAddress(\"fd00::1\", 128)\n                .addRoute(\"::\", 0)\n        }\n\n        if (dns.isNotBlank()) {\n            builder.addDnsServer(dns)\n        }\n\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {\n            builder.setMetered(false)\n        }\n\n        val preferences = getPreferences()\n        val listType = preferences.getStringNotNull(\"applist_type\", \"disable\")\n        val listedApps = preferences.getSelectedApps()\n\n        when (listType) {\n            \"blacklist\" -> {\n                for (packageName in listedApps) {\n                    try {\n                        builder.addDisallowedApplication(packageName)\n                    } catch (e: Exception) {\n                        Log.e(TAG, \"Не удалось добавить приложение $packageName в черный список\", e)\n                    }\n                }\n\n                builder.addDisallowedApplication(applicationContext.packageName)\n            }\n\n            \"whitelist\" -> {\n                for (packageName in listedApps) {\n                    try {\n                        builder.addAllowedApplication(packageName)\n                    } catch (e: Exception) {\n                        Log.e(TAG, \"Не удалось добавить приложение $packageName в белый список\", e)\n                    }\n                }\n            }\n\n            \"disable\" -> {\n                builder.addDisallowedApplication(applicationContext.packageName)\n            }\n        }\n\n        return builder\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/services/LifecycleVpnService.kt",
    "content": "package io.github.romanvht.byedpi.services\n\nimport android.content.Intent\nimport android.net.VpnService\nimport android.os.IBinder\nimport androidx.annotation.CallSuper\nimport androidx.lifecycle.Lifecycle\nimport androidx.lifecycle.LifecycleOwner\nimport androidx.lifecycle.ServiceLifecycleDispatcher\n\n/**\n * Based on [androidx.lifecycle.LifecycleService]\n */\nopen class LifecycleVpnService : VpnService(), LifecycleOwner {\n    @Suppress(\"LeakingThis\")\n    private val dispatcher = ServiceLifecycleDispatcher(this)\n\n    @CallSuper\n    override fun onCreate() {\n        dispatcher.onServicePreSuperOnCreate()\n        super.onCreate()\n    }\n\n    @CallSuper\n    override fun onBind(intent: Intent): IBinder? {\n        dispatcher.onServicePreSuperOnBind()\n        return super.onBind(intent)\n    }\n\n    @Deprecated(\"Deprecated in Java\")\n    @CallSuper\n    override fun onStart(intent: Intent?, startId: Int) {\n        dispatcher.onServicePreSuperOnStart()\n        @Suppress(\"DEPRECATION\")\n        super.onStart(intent, startId)\n    }\n\n    // this method is added only to annotate it with @CallSuper.\n    // In usual Service, super.onStartCommand is no-op, but in LifecycleService\n    // it results in dispatcher.onServicePreSuperOnStart() call, because\n    // super.onStartCommand calls onStart().\n    @CallSuper\n    override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {\n        return super.onStartCommand(intent, flags, startId)\n    }\n\n    @CallSuper\n    override fun onDestroy() {\n        dispatcher.onServicePreSuperOnDestroy()\n        super.onDestroy()\n    }\n\n    override val lifecycle: Lifecycle\n        get() = dispatcher.lifecycle\n}\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/services/QuickTileService.kt",
    "content": "package io.github.romanvht.byedpi.services\n\nimport android.net.VpnService\nimport android.os.Build\nimport android.service.quicksettings.Tile\nimport android.service.quicksettings.TileService\nimport android.util.Log\nimport androidx.annotation.RequiresApi\nimport io.github.romanvht.byedpi.data.*\nimport io.github.romanvht.byedpi.utility.getPreferences\nimport io.github.romanvht.byedpi.utility.mode\n\n@RequiresApi(Build.VERSION_CODES.N)\nclass QuickTileService : TileService() {\n\n    companion object {\n        private const val TAG = \"QuickTileService\"\n        private var instance: QuickTileService? = null\n\n        fun updateTile() {\n            instance?.updateStatus()\n        }\n    }\n\n    private var appTile: Tile? = null\n\n    override fun onStartListening() {\n        super.onStartListening()\n\n        instance = this\n        appTile = qsTile\n\n        updateStatus()\n    }\n\n    override fun onStopListening() {\n        super.onStopListening()\n\n        instance = null\n        appTile = null\n    }\n\n    override fun onClick() {\n        super.onClick()\n        handleClick()\n    }\n\n    private fun handleClick() {\n        val (status) = appStatus\n        val mode = getPreferences().mode()\n\n        when (status) {\n            AppStatus.Halted -> startService(mode)\n            AppStatus.Running -> stopService()\n        }\n\n        Log.i(TAG, \"Tile clicked\")\n    }\n\n    private fun startService(mode: Mode) {\n        if (mode == Mode.VPN && VpnService.prepare(this) != null) {\n            return\n        }\n\n        ServiceManager.start(this, mode)\n        setState(Tile.STATE_ACTIVE)\n    }\n\n    private fun stopService() {\n        ServiceManager.stop(this)\n        setState(Tile.STATE_INACTIVE)\n    }\n\n    private fun updateStatus() {\n        val (status) = appStatus\n\n        val newState = when (status) {\n            AppStatus.Running -> Tile.STATE_ACTIVE\n            AppStatus.Halted -> Tile.STATE_INACTIVE\n        }\n\n        setState(newState)\n    }\n\n    private fun setState(state: Int) {\n        appTile?.apply {\n            this.state = state\n            updateTile()\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/services/ServiceManager.kt",
    "content": "package io.github.romanvht.byedpi.services\n\nimport android.content.Context\nimport android.content.Intent\nimport android.util.Log\nimport androidx.core.content.ContextCompat\nimport io.github.romanvht.byedpi.data.AppStatus\nimport io.github.romanvht.byedpi.data.Mode\nimport io.github.romanvht.byedpi.data.START_ACTION\nimport io.github.romanvht.byedpi.data.STOP_ACTION\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.SupervisorJob\nimport kotlinx.coroutines.delay\nimport kotlinx.coroutines.launch\n\nobject ServiceManager {\n    private val TAG: String = ServiceManager::class.java.simpleName\n    private val scope = CoroutineScope(Dispatchers.IO + SupervisorJob())\n\n    fun start(context: Context, mode: Mode) {\n        when (mode) {\n            Mode.VPN -> {\n                Log.i(TAG, \"Starting VPN\")\n                val intent = Intent(context, ByeDpiVpnService::class.java)\n                intent.action = START_ACTION\n                ContextCompat.startForegroundService(context, intent)\n            }\n\n            Mode.Proxy -> {\n                Log.i(TAG, \"Starting proxy\")\n                val intent = Intent(context, ByeDpiProxyService::class.java)\n                intent.action = START_ACTION\n                ContextCompat.startForegroundService(context, intent)\n            }\n        }\n    }\n\n    fun stop(context: Context) {\n        val (_, mode) = appStatus\n        when (mode) {\n            Mode.VPN -> {\n                Log.i(TAG, \"Stopping VPN\")\n                val intent = Intent(context, ByeDpiVpnService::class.java)\n                intent.action = STOP_ACTION\n                ContextCompat.startForegroundService(context, intent)\n            }\n\n            Mode.Proxy -> {\n                Log.i(TAG, \"Stopping proxy\")\n                val intent = Intent(context, ByeDpiProxyService::class.java)\n                intent.action = STOP_ACTION\n                ContextCompat.startForegroundService(context, intent)\n            }\n        }\n    }\n\n    fun restart(context: Context, mode: Mode) {\n        if (appStatus.first == AppStatus.Running) {\n            stop(context)\n            scope.launch {\n                val startTime = System.currentTimeMillis()\n                while (System.currentTimeMillis() - startTime < 3000L) {\n                    if (appStatus.first == AppStatus.Halted) break\n                    delay(100)\n                }\n                start(context, mode)\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/utility/ArgumentsUtils.kt",
    "content": "package io.github.romanvht.byedpi.utility\n\n// Based on https://gist.github.com/raymyers/8077031\nfun shellSplit(string: CharSequence): List<String> {\n    val tokens: MutableList<String> = ArrayList()\n    var quoteChar = ' '\n    var escaping = false\n    var quoting = false\n    var lastCloseQuoteIndex = Int.MIN_VALUE\n    var current = StringBuilder()\n\n    for (i in string.indices) {\n        val c = string[i]\n\n        if (escaping) {\n            current.append(c)\n            escaping = false\n        } else if (c == '\\\\' && quoting) {\n            if (i + 1 < string.length && string[i + 1] == quoteChar) {\n                escaping = true\n            } else {\n                current.append(c)\n            }\n        } else if (quoting && c == quoteChar) {\n            quoting = false\n            lastCloseQuoteIndex = i\n        } else if (!quoting && (c == '\\'' || c == '\"')) {\n            quoting = true\n            quoteChar = c\n        } else if (!quoting && Character.isWhitespace(c)) {\n            if (current.isNotEmpty() || lastCloseQuoteIndex == i - 1) {\n                tokens.add(current.toString())\n                current = StringBuilder()\n            }\n        } else {\n            current.append(c)\n        }\n    }\n\n    if (current.isNotEmpty() || lastCloseQuoteIndex == string.length - 1) {\n        tokens.add(current.toString())\n    }\n\n    return tokens\n}\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/utility/BatteryUtils.kt",
    "content": "package io.github.romanvht.byedpi.utility\n\nimport android.annotation.SuppressLint\nimport android.provider.Settings\nimport android.content.Context\nimport android.content.Intent\nimport android.os.Build\nimport android.os.PowerManager\nimport android.util.Log\nimport androidx.core.net.toUri\n\nobject BatteryUtils {\n    private const val TAG = \"BatteryUtils\"\n\n    fun isOptimizationDisabled(context: Context): Boolean {\n        return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n            val powerManager = context.getSystemService(Context.POWER_SERVICE) as PowerManager\n            powerManager.isIgnoringBatteryOptimizations(context.packageName)\n        } else {\n            true\n        }\n    }\n\n    @SuppressLint(\"BatteryLife\")\n    fun requestBatteryOptimization(context: Context) {\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n            try {\n                val intent = Intent(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS).apply {\n                    data = \"package:${context.packageName}\".toUri()\n                    flags = Intent.FLAG_ACTIVITY_NEW_TASK\n                }\n                context.startActivity(intent)\n            } catch (e: Exception) {\n                Log.e(TAG, \"Failed to request ignore battery optimizations\", e)\n                try {\n                    val intent = Intent(Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS)\n                    context.startActivity(intent)\n                } catch (e2: Exception) {\n                    Log.e(TAG, \"Failed to open battery optimization settings\", e2)\n                }\n            }\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/utility/ClipboardUtils.kt",
    "content": "package io.github.romanvht.byedpi.utility\n\nimport android.content.ClipData\nimport android.content.ClipboardManager\nimport android.content.Context\nimport android.widget.Toast\nimport io.github.romanvht.byedpi.R\n\nobject ClipboardUtils {\n    fun copy(context: Context, text: String, label: String = \"text\", showToast: Boolean = true) {\n        val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as? ClipboardManager\n        val clip = ClipData.newPlainText(label, text)\n        clipboard?.setPrimaryClip(clip)\n\n        if (showToast) {\n            Toast.makeText(context, R.string.toast_copied, Toast.LENGTH_SHORT).show()\n        }\n    }\n\n    fun paste(context: Context): String? {\n        val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as? ClipboardManager\n        val clipData = clipboard?.primaryClip\n\n        return if (clipData != null && clipData.itemCount > 0) {\n            clipData.getItemAt(0).text?.toString()\n        } else {\n            null\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/utility/DomainListUtils.kt",
    "content": "package io.github.romanvht.byedpi.utility\n\nimport android.content.Context\nimport com.google.gson.Gson\nimport com.google.gson.reflect.TypeToken\nimport io.github.romanvht.byedpi.data.DomainList\nimport java.io.File\nimport androidx.core.content.edit\n\nobject DomainListUtils {\n    private const val DOMAIN_LISTS_FILE = \"domain_lists.json\"\n    private const val KEY_INITIAL_LOADED = \"domain_initial_loaded\"\n\n    private val gson = Gson()\n\n    fun initializeDefaultLists(context: Context) {\n        val prefs = context.getPreferences()\n        val isInitialized = prefs.getBoolean(KEY_INITIAL_LOADED, false)\n\n        if (isInitialized) return\n\n        val defaultLists = mutableListOf<DomainList>()\n\n        val assetFiles = context.assets.list(\"\")?.filter {\n            it.startsWith(\"proxytest_\") && it.endsWith(\".sites\")\n        } ?: emptyList()\n\n        for (assetFile in assetFiles) {\n            val listName = assetFile\n                .removePrefix(\"proxytest_\")\n                .removeSuffix(\".sites\")\n\n            val domains = context.assets.open(assetFile)\n                .bufferedReader()\n                .useLines { it.toList() }\n                .map { it.trim() }\n                .filter { it.isNotEmpty() }\n\n            defaultLists.add(\n                DomainList(\n                    id = listName,\n                    name = listName.replaceFirstChar {\n                        if (it.isLowerCase()) it.titlecase() else it.toString()\n                    },\n                    domains = domains,\n                    isActive = listName in setOf(\"youtube\", \"googlevideo\"),\n                    isBuiltIn = true\n                )\n            )\n        }\n\n        saveLists(context, defaultLists)\n\n        prefs.edit { putBoolean(KEY_INITIAL_LOADED, true) }\n    }\n\n    fun getLists(context: Context): List<DomainList> {\n        val listsFile = File(context.filesDir, DOMAIN_LISTS_FILE)\n\n        if (!listsFile.exists()) {\n            return emptyList()\n        }\n\n        return try {\n            val json = listsFile.readText()\n            val type = object : TypeToken<List<DomainList>>() {}.type\n            gson.fromJson(json, type) ?: emptyList()\n        } catch (e: Exception) {\n            emptyList()\n        }\n    }\n\n    fun saveLists(context: Context, lists: List<DomainList>) {\n        val listsFile = File(context.filesDir, DOMAIN_LISTS_FILE)\n        val json = gson.toJson(lists)\n        listsFile.writeText(json)\n    }\n\n    fun getActiveDomains(context: Context): List<String> {\n        return getLists(context)\n            .filter { it.isActive }\n            .flatMap { it.domains }\n            .distinct()\n    }\n\n    fun addList(context: Context, name: String, domains: List<String>): Boolean {\n        val lists = getLists(context).toMutableList()\n        val id = name.lowercase().replace(\" \", \"_\")\n\n        if (lists.any { it.id == id }) return false\n\n        lists.add(\n            DomainList(\n                id = id,\n                name = name,\n                domains = domains,\n                isActive = true,\n                isBuiltIn = false\n            )\n        )\n\n        saveLists(context, lists)\n        return true\n    }\n\n    fun updateList(context: Context, id: String, name: String, domains: List<String>): Boolean {\n        val lists = getLists(context).toMutableList()\n        val index = lists.indexOfFirst { it.id == id }\n\n        if (index == -1) return false\n\n        val oldList = lists[index]\n        lists[index] = oldList.copy(name = name, domains = domains)\n\n        saveLists(context, lists)\n        return true\n    }\n\n    fun toggleListActive(context: Context, id: String): Boolean {\n        val lists = getLists(context).toMutableList()\n        val index = lists.indexOfFirst { it.id == id }\n\n        if (index == -1) return false\n\n        val list = lists[index]\n        lists[index] = list.copy(isActive = !list.isActive)\n\n        saveLists(context, lists)\n        return true\n    }\n\n    fun deleteList(context: Context, id: String): Boolean {\n        val lists = getLists(context).toMutableList()\n\n        val iterator = lists.iterator()\n        var removed = false\n\n        while (iterator.hasNext()) {\n            val list = iterator.next()\n            if (list.id == id) {\n                iterator.remove()\n                removed = true\n            }\n        }\n\n        if (removed) {\n            saveLists(context, lists)\n        }\n\n        return removed\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/utility/HistoryUtils.kt",
    "content": "package io.github.romanvht.byedpi.utility\n\nimport android.content.Context\nimport android.content.SharedPreferences\nimport io.github.romanvht.byedpi.data.Command\nimport com.google.gson.Gson\nimport androidx.core.content.edit\n\nclass HistoryUtils(context: Context) {\n\n    private val context = context.applicationContext\n    private val sharedPreferences: SharedPreferences = context.getPreferences()\n    private val historyKey = \"byedpi_command_history\"\n    private val maxHistorySize = 40\n\n    fun addCommand(command: String) {\n        if (command.isBlank()) return\n\n        val history = getHistory().toMutableList()\n        val unpinned = history.filter { !it.pinned }\n        val search = history.find { it.text == command }\n\n        if (search == null) {\n            history.add(0, Command(command))\n            if (history.size > maxHistorySize) {\n                if (unpinned.isNotEmpty()) {\n                    history.remove(unpinned.last())\n                }\n            }\n        }\n\n        saveHistory(history)\n    }\n\n    fun pinCommand(command: String) {\n        val history = getHistory().toMutableList()\n        history.find { it.text == command }?.pinned = true\n        saveHistory(history)\n    }\n\n    fun unpinCommand(command: String) {\n        val history = getHistory().toMutableList()\n        history.find { it.text == command }?.pinned = false\n        saveHistory(history)\n    }\n\n    fun deleteCommand(command: String) {\n        val history = getHistory().toMutableList()\n        history.removeAll { it.text == command }\n        saveHistory(history)\n    }\n\n    fun renameCommand(command: String, newName: String) {\n        val history = getHistory().toMutableList()\n        history.find { it.text == command }?.name = newName\n        saveHistory(history)\n    }\n\n    fun editCommand(command: String, newText: String) {\n        val history = getHistory().toMutableList()\n        history.find { it.text == command }?.text = newText\n        saveHistory(history)\n    }\n\n    fun getHistory(): List<Command> {\n        val historyJson = sharedPreferences.getString(historyKey, null)\n        return if (historyJson != null) {\n            Gson().fromJson(historyJson, Array<Command>::class.java).toList()\n        } else {\n            emptyList()\n        }\n    }\n\n    fun saveHistory(history: List<Command>) {\n        val historyJson = Gson().toJson(history)\n        sharedPreferences.edit { putString(historyKey, historyJson) }\n        ShortcutUtils.update(context)\n    }\n\n    fun clearAllHistory() {\n        saveHistory(emptyList())\n    }\n\n    fun clearUnpinnedHistory() {\n        val history = getHistory().filter { it.pinned }\n        saveHistory(history)\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/utility/NotificationUtils.kt",
    "content": "package io.github.romanvht.byedpi.utility\n\nimport android.app.Notification\nimport android.app.NotificationChannel\nimport android.app.NotificationManager\nimport android.app.PendingIntent\nimport android.content.Context\nimport android.content.Intent\nimport android.os.Build\nimport androidx.annotation.StringRes\nimport androidx.core.app.NotificationCompat\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.activities.MainActivity\nimport io.github.romanvht.byedpi.data.PAUSE_ACTION\nimport io.github.romanvht.byedpi.data.RESUME_ACTION\nimport io.github.romanvht.byedpi.data.STOP_ACTION\n\nfun registerNotificationChannel(context: Context, id: String, @StringRes name: Int) {\n    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n        val manager = context.getSystemService(NotificationManager::class.java) ?: return\n\n        val channel = NotificationChannel(\n            id,\n            context.getString(name),\n            NotificationManager.IMPORTANCE_DEFAULT\n        )\n        channel.enableLights(false)\n        channel.enableVibration(false)\n        channel.setShowBadge(false)\n\n        manager.createNotificationChannel(channel)\n    }\n}\n\nfun createConnectionNotification(\n    context: Context,\n    channelId: String,\n    @StringRes title: Int,\n    @StringRes content: Int,\n    service: Class<*>,\n): Notification =\n    NotificationCompat.Builder(context, channelId)\n        .setSmallIcon(R.drawable.ic_notification)\n        .setSilent(true)\n        .setContentTitle(context.getString(title))\n        .setContentText(context.getString(content))\n        .addAction(0, context.getString(R.string.service_pause_btn),\n            PendingIntent.getService(\n                context,\n                0,\n                Intent(context, service).setAction(PAUSE_ACTION),\n                PendingIntent.FLAG_IMMUTABLE,\n            )\n        )\n        .addAction(0, context.getString(R.string.service_stop_btn),\n            PendingIntent.getService(\n                context,\n                0,\n                Intent(context, service).setAction(STOP_ACTION),\n                PendingIntent.FLAG_IMMUTABLE,\n            )\n        )\n        .setContentIntent(\n            PendingIntent.getActivity(\n                context,\n                0,\n                Intent(context, MainActivity::class.java),\n                PendingIntent.FLAG_IMMUTABLE,\n            )\n        )\n        .build()\n\nfun createPauseNotification(\n    context: Context,\n    channelId: String,\n    @StringRes title: Int,\n    @StringRes content: Int,\n    service: Class<*>,\n): Notification =\n    NotificationCompat.Builder(context, channelId)\n        .setSmallIcon(R.drawable.ic_notification)\n        .setSilent(true)\n        .setContentTitle(context.getString(title))\n        .setContentText(context.getString(content))\n        .addAction(0, context.getString(R.string.service_start_btn),\n            PendingIntent.getService(\n                context,\n                0,\n                Intent(context, service).setAction(RESUME_ACTION),\n                PendingIntent.FLAG_IMMUTABLE,\n            )\n        )\n        .setContentIntent(\n            PendingIntent.getActivity(\n                context,\n                0,\n                Intent(context, MainActivity::class.java),\n                PendingIntent.FLAG_IMMUTABLE,\n            )\n        )\n        .build()\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/utility/PreferencesUtils.kt",
    "content": "package io.github.romanvht.byedpi.utility\n\nimport android.content.Context\nimport android.content.SharedPreferences\nimport androidx.preference.Preference\nimport androidx.preference.PreferenceFragmentCompat\nimport androidx.preference.PreferenceManager\nimport io.github.romanvht.byedpi.data.Mode\n\nval PreferenceFragmentCompat.sharedPreferences\n    get() = preferenceScreen.sharedPreferences\n\nfun Context.getPreferences(): SharedPreferences =\n    PreferenceManager.getDefaultSharedPreferences(this)\n\nfun SharedPreferences.getIntStringNotNull(key: String, defValue: Int): Int =\n    getString(key, defValue.toString())?.toIntOrNull() ?: defValue\n\nfun SharedPreferences.getLongStringNotNull(key: String, defValue: Long): Long =\n    getString(key, defValue.toString())?.toLongOrNull() ?: defValue\n\nfun SharedPreferences.getStringNotNull(key: String, defValue: String): String =\n    getString(key, defValue) ?: defValue\n\nfun SharedPreferences.mode(): Mode =\n    Mode.fromString(getStringNotNull(\"byedpi_mode\", \"vpn\"))\n\nfun <T : Preference> PreferenceFragmentCompat.findPreferenceNotNull(key: CharSequence): T =\n    findPreference(key) ?: throw IllegalStateException(\"Preference $key not found\")\n\nfun SharedPreferences.getSelectedApps(): List<String> {\n    return getStringSet(\"selected_apps\", emptySet())?.toList() ?: emptyList()\n}\n\nfun SharedPreferences.checkIpAndPortInCmd(): Pair<String?, String?> {\n    val cmdEnable = getBoolean(\"byedpi_enable_cmd_settings\", false)\n    if (!cmdEnable) return Pair(null, null)\n\n    val cmdArgs = getString(\"byedpi_cmd_args\", \"\")?.let { shellSplit(it) } ?: emptyList()\n\n    fun getArgValue(argsList: List<String>, keys: List<String>): String? {\n        for (i in argsList.indices) {\n            val arg = argsList[i]\n            for (key in keys) {\n                if (key.startsWith(\"--\")) {\n                    if (arg == key && i + 1 < argsList.size) {\n                        return argsList[i + 1]\n                    } else if (arg.startsWith(\"$key=\")) {\n                        return arg.substringAfter('=')\n                    }\n                } else if (key.startsWith(\"-\")) {\n                    if (arg.startsWith(key) && arg.length > key.length) {\n                        return arg.substring(key.length)\n                    } else if (arg == key && i + 1 < argsList.size) {\n                        return argsList[i + 1]\n                    }\n                }\n            }\n        }\n        return null\n    }\n\n    val cmdIp = getArgValue(cmdArgs, listOf(\"--ip\", \"-i\"))\n    val cmdPort = getArgValue(cmdArgs, listOf(\"--port\", \"-p\"))\n\n    return Pair(cmdIp, cmdPort)\n}\n\n\nfun SharedPreferences.getProxyIpAndPort(): Pair<String, String> {\n    val (cmdIp, cmdPort) = checkIpAndPortInCmd()\n\n    val ip = cmdIp ?: getStringNotNull(\"byedpi_proxy_ip\", \"127.0.0.1\")\n    val port = cmdPort ?: getStringNotNull(\"byedpi_proxy_port\", \"1080\")\n\n    return Pair(ip, port)\n}\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/utility/SettingsUtils.kt",
    "content": "package io.github.romanvht.byedpi.utility\n\nimport android.content.Context\nimport android.net.Uri\nimport android.os.Handler\nimport android.os.Looper\nimport android.util.Log\nimport android.widget.Toast\nimport androidx.appcompat.app.AppCompatDelegate\nimport androidx.core.content.edit\nimport androidx.core.os.LocaleListCompat\nimport com.google.gson.Gson\nimport io.github.romanvht.byedpi.BuildConfig\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.data.AppSettings\n\nobject SettingsUtils {\n    private const val TAG = \"SettingsUtils\"\n\n    fun setLang(lang: String) {\n        val appLocale = localeByName(lang) ?: LocaleListCompat.getEmptyLocaleList()\n\n        if (AppCompatDelegate.getApplicationLocales().toLanguageTags() != appLocale.toLanguageTags()) {\n            AppCompatDelegate.setApplicationLocales(appLocale)\n        }\n    }\n\n    private fun localeByName(lang: String): LocaleListCompat? = when (lang) {\n        \"system\" -> LocaleListCompat.getEmptyLocaleList()\n        \"ru\" -> LocaleListCompat.forLanguageTags(\"ru\")\n        \"en\" -> LocaleListCompat.forLanguageTags(\"en\")\n        \"tr\" -> LocaleListCompat.forLanguageTags(\"tr\")\n        \"kk\" -> LocaleListCompat.forLanguageTags(\"kk\")\n        \"vi\" -> LocaleListCompat.forLanguageTags(\"vi\")\n        else -> {\n            Log.w(TAG, \"Invalid value for language: $lang\")\n            null\n        }\n    }\n\n    fun setTheme(name: String) {\n        val appTheme = themeByName(name) ?: AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM\n\n        if (AppCompatDelegate.getDefaultNightMode() != appTheme) {\n            AppCompatDelegate.setDefaultNightMode(appTheme)\n        }\n    }\n\n    private fun themeByName(name: String): Int? = when (name) {\n        \"system\" -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM\n        \"light\" -> AppCompatDelegate.MODE_NIGHT_NO\n        \"dark\" -> AppCompatDelegate.MODE_NIGHT_YES\n        else -> {\n            Log.w(TAG, \"Invalid value for app_theme: $name\")\n            null\n        }\n    }\n\n    fun exportSettings(context: Context, uri: Uri) {\n        try {\n            val prefs = context.getPreferences()\n            val history = HistoryUtils(context).getHistory()\n            val apps = prefs.getSelectedApps()\n\n            val settings = prefs.all.filterKeys { key ->\n                key !in setOf(\"byedpi_command_history\", \"selected_apps\")\n            }\n\n            val domainLists = DomainListUtils.getLists(context)\n\n            val export = AppSettings(\n                app = BuildConfig.APPLICATION_ID,\n                version = BuildConfig.VERSION_NAME,\n                history = history,\n                apps = apps,\n                domainLists = domainLists,\n                settings = settings\n            )\n\n            val json = Gson().toJson(export)\n\n            context.contentResolver.openOutputStream(uri)?.use { outputStream ->\n                outputStream.write(json.toByteArray())\n            }\n        } catch (e: Exception) {\n            Log.e(TAG, \"Failed to export settings\", e)\n            Handler(Looper.getMainLooper()).post {\n                Toast.makeText(context, \"Failed to export settings\", Toast.LENGTH_SHORT).show()\n            }\n        }\n    }\n\n    fun importSettings(context: Context, uri: Uri, onRestart: () -> Unit) {\n        try {\n            context.contentResolver.openInputStream(uri)?.use { inputStream ->\n                val json = inputStream.bufferedReader().readText()\n                val import = try {\n                    Gson().fromJson(json, AppSettings::class.java)\n                } catch (e: Exception) {\n                    null\n                }\n\n                if (import == null || import.app != BuildConfig.APPLICATION_ID) {\n                    Handler(Looper.getMainLooper()).post {\n                        Toast.makeText(context, R.string.logs_failed, Toast.LENGTH_LONG).show()\n                    }\n                    return@use\n                }\n\n                val prefs = context.getPreferences()\n                prefs.edit (commit = true) {\n                    clear()\n                    import.settings.forEach { (key, value) ->\n                        when (value) {\n                            is Int -> putInt(key, value)\n                            is Boolean -> putBoolean(key, value)\n                            is String -> putString(key, value)\n                            is Float -> putFloat(key, value)\n                            is Long -> putLong(key, value)\n                            is Double -> {\n                                when (value) {\n                                    value.toInt().toDouble() -> {\n                                        putInt(key, value.toInt())\n                                    }\n                                    value.toLong().toDouble() -> {\n                                        putLong(key, value.toLong())\n                                    }\n                                    else -> {\n                                        putFloat(key, value.toFloat())\n                                    }\n                                }\n                            }\n                            is Collection<*> -> {\n                                if (value.all { it is String }) {\n                                    @Suppress(\"UNCHECKED_CAST\")\n                                    putStringSet(key, (value as Collection<String>).toSet())\n                                }\n                            }\n                        }\n                    }\n\n                }\n\n                if (import.apps !== null) {\n                    prefs.edit (commit = true) { putStringSet(\"selected_apps\", import.apps.toSet()) }\n                }\n\n                if (import.history !== null) {\n                    HistoryUtils(context).saveHistory(import.history)\n                }\n\n                if (import.domainLists !== null) {\n                    DomainListUtils.saveLists(context, import.domainLists)\n                }\n\n                Handler(Looper.getMainLooper()).post {\n                    val newLang = prefs.getString(\"language\", \"system\") ?: \"system\"\n                    val newTheme = prefs.getString(\"app_theme\", \"system\") ?: \"system\"\n                    setLang(newLang)\n                    setTheme(newTheme)\n                    onRestart()\n                }\n            }\n        } catch (e: Exception) {\n            Log.e(TAG, \"Failed to import settings\", e)\n            Handler(Looper.getMainLooper()).post {\n                Toast.makeText(context, \"Failed to import settings\", Toast.LENGTH_SHORT).show()\n            }\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/utility/ShortcutUtils.kt",
    "content": "package io.github.romanvht.byedpi.utility\n\nimport android.content.Context\nimport android.content.Intent\nimport android.content.pm.ShortcutInfo\nimport android.content.pm.ShortcutManager\nimport android.graphics.drawable.Icon\nimport android.os.Build\nimport io.github.romanvht.byedpi.R\nimport io.github.romanvht.byedpi.activities.ToggleActivity\n\nobject ShortcutUtils {\n\n    fun update(context: Context) {\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {\n            val shortcutManager = context.getSystemService(ShortcutManager::class.java)\n            val shortcuts = mutableListOf<ShortcutInfo>()\n\n            val toggleIntent = Intent(context, ToggleActivity::class.java).apply {\n                action = Intent.ACTION_VIEW\n                flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK\n            }\n\n            val toggleShortcut = ShortcutInfo.Builder(context, \"toggle_service\")\n                .setShortLabel(context.getString(R.string.toggle_connect))\n                .setLongLabel(context.getString(R.string.toggle_connect))\n                .setIcon(Icon.createWithResource(context, R.drawable.ic_toggle))\n                .setIntent(toggleIntent)\n                .build()\n\n            shortcuts.add(toggleShortcut)\n\n            if (context.getPreferences().getBoolean(\"byedpi_enable_cmd_settings\", false)) {\n                val history = HistoryUtils(context)\n                val pinned = history.getHistory().filter { it.pinned }.take(3)\n\n                pinned.forEachIndexed { index, strategy ->\n                    val strategyIntent = Intent(context, ToggleActivity::class.java).apply {\n                        action = Intent.ACTION_VIEW\n                        flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK\n                        putExtra(\"strategy\", strategy.text)\n                    }\n\n                    val fullLabel = strategy.name?.takeIf { it.isNotBlank() } ?: strategy.text\n                    val shortLabel = if (fullLabel.length > 15) fullLabel.take(15) + \"...\" else fullLabel\n                    val longLabel = if (fullLabel.length > 30) fullLabel.take(30) + \"...\" else fullLabel\n\n                    val commandShortcut = ShortcutInfo.Builder(context, \"strategy_$index\")\n                        .setShortLabel(shortLabel)\n                        .setLongLabel(longLabel)\n                        .setIcon(Icon.createWithResource(context, R.drawable.ic_pin))\n                        .setIntent(strategyIntent)\n                        .build()\n\n                    shortcuts.add(commandShortcut)\n                }\n            }\n\n            shortcutManager.dynamicShortcuts = shortcuts\n        }\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/utility/SiteCheckUtils.kt",
    "content": "package io.github.romanvht.byedpi.utility\n\nimport android.util.Log\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.async\nimport kotlinx.coroutines.awaitAll\nimport kotlinx.coroutines.sync.Semaphore\nimport kotlinx.coroutines.sync.withPermit\nimport kotlinx.coroutines.withContext\nimport java.io.IOException\nimport java.net.HttpURLConnection\nimport java.net.InetSocketAddress\nimport java.net.Proxy\nimport java.net.URL\n\nclass SiteCheckUtils(\n    private val proxyIp: String,\n    private val proxyPort: Int\n) {\n\n    suspend fun checkSitesAsync(\n        sites: List<String>,\n        requestsCount: Int,\n        requestTimeout: Long,\n        concurrentRequests: Int = 20,\n        fullLog: Boolean,\n        onSiteChecked: ((String, Int, Int) -> Unit)? = null\n    ): List<Pair<String, Int>> {\n        val semaphore = Semaphore(concurrentRequests)\n        return withContext(Dispatchers.IO) {\n            sites.map { site ->\n                async {\n                    semaphore.withPermit {\n                        val successCount = checkSiteAccess(site, requestsCount, requestTimeout)\n                        if (fullLog) {\n                            onSiteChecked?.invoke(site, successCount, requestsCount)\n                        }\n                        site to successCount\n                    }\n                }\n            }.awaitAll()\n        }\n    }\n\n    private suspend fun checkSiteAccess(\n        site: String,\n        requestsCount: Int,\n        timeout: Long\n    ): Int = withContext(Dispatchers.IO) {\n        var responseCount = 0\n\n        val formattedUrl = if (site.startsWith(\"http://\") || site.startsWith(\"https://\")) site\n        else \"https://$site\"\n\n        val url = try {\n            URL(formattedUrl)\n        } catch (_: Exception) {\n            Log.e(\"SiteChecker\", \"Invalid URL: $formattedUrl\")\n            return@withContext 0\n        }\n\n        val proxy = Proxy(Proxy.Type.SOCKS, InetSocketAddress(proxyIp, proxyPort))\n\n        repeat(requestsCount) { attempt ->\n            Log.i(\"SiteChecker\", \"Attempt ${attempt + 1}/$requestsCount for $site\")\n\n            var connection: HttpURLConnection? = null\n            try {\n                connection = url.openConnection(proxy) as HttpURLConnection\n                connection.connectTimeout = (timeout * 1000).toInt()\n                connection.readTimeout = (timeout * 1000).toInt()\n                connection.instanceFollowRedirects = true\n                connection.setRequestProperty(\"Connection\", \"close\")\n\n                val responseCode = connection.responseCode\n                val declaredLength = if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {\n                    connection.contentLengthLong\n                } else {\n                    connection.contentLength.toLong()\n                }\n\n                var actualLength = 0L\n                try {\n                    val inputStream = if (responseCode in 200..299) connection.inputStream else connection.errorStream\n                    if (inputStream != null) {\n                        val buffer = ByteArray(8192)\n                        var bytesRead: Int\n\n                        val limit = if (declaredLength > 0) declaredLength else 1024L * 1024\n\n                        while (actualLength < limit) {\n                            val remaining = limit - actualLength\n                            val toRead = if (remaining > buffer.size) buffer.size else remaining.toInt()\n                            bytesRead = inputStream.read(buffer, 0, toRead)\n                            if (bytesRead == -1) break\n                            actualLength += bytesRead\n                        }\n                    }\n                } catch (_: IOException) {\n                    // Stream reading failed\n                }\n\n                if (declaredLength <= 0L || actualLength >= declaredLength) {\n                    Log.i(\"SiteChecker\", \"Response for $site: $responseCode, Declared: $declaredLength, Actual: $actualLength\")\n                    responseCount++\n                } else {\n                    Log.w(\"SiteChecker\", \"Block detected for $site, Declared: $declaredLength, Actual: $actualLength\")\n                }\n\n            } catch (e: Exception) {\n                Log.e(\"SiteChecker\", \"Error accessing $site: ${e.message}\")\n            } finally {\n                connection?.disconnect()\n            }\n        }\n\n        responseCount\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/utility/StorageUtils.kt",
    "content": "package io.github.romanvht.byedpi.utility\n\nimport android.Manifest\nimport android.content.Context\nimport android.content.Intent\nimport android.content.pm.PackageManager\nimport android.os.Build\nimport android.os.Environment\nimport android.provider.Settings\nimport android.util.Log\nimport androidx.core.app.ActivityCompat\nimport androidx.core.content.ContextCompat\nimport androidx.core.net.toUri\nimport androidx.fragment.app.Fragment\n\nobject StorageUtils {\n    private const val TAG = \"StorageUtils\"\n    private const val STORAGE_PERMISSION_REQUEST = 1001\n\n    fun hasStoragePermission(context: Context): Boolean {\n        return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {\n            Environment.isExternalStorageManager()\n        } else {\n            val readPermission = ContextCompat.checkSelfPermission(\n                context,\n                Manifest.permission.READ_EXTERNAL_STORAGE\n            ) == PackageManager.PERMISSION_GRANTED\n\n            val writePermission = ContextCompat.checkSelfPermission(\n                context,\n                Manifest.permission.WRITE_EXTERNAL_STORAGE\n            ) == PackageManager.PERMISSION_GRANTED\n\n            readPermission && writePermission\n        }\n    }\n\n    fun requestStoragePermission(fragment: Fragment) {\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {\n            try {\n                val intent = Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION).apply {\n                    data = \"package:${fragment.requireContext().packageName}\".toUri()\n                }\n                fragment.startActivity(intent)\n            } catch (e: Exception) {\n                Log.e(TAG, \"Failed to request storage permission\", e)\n                try {\n                    val intent = Intent(Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION)\n                    fragment.startActivity(intent)\n                } catch (e2: Exception) {\n                    Log.e(TAG, \"Failed to open storage settings\", e2)\n                }\n            }\n        } else {\n            Log.d(TAG, \"Requesting storage permission for Android 10 and below\")\n            ActivityCompat.requestPermissions(\n                fragment.requireActivity(),\n                arrayOf(\n                    Manifest.permission.READ_EXTERNAL_STORAGE,\n                    Manifest.permission.WRITE_EXTERNAL_STORAGE\n                ),\n                STORAGE_PERMISSION_REQUEST\n            )\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/io/github/romanvht/byedpi/utility/ValidateUtils.kt",
    "content": "package io.github.romanvht.byedpi.utility\n\nimport android.net.InetAddresses\nimport android.os.Build\nimport android.util.Log\nimport android.widget.Toast\nimport androidx.preference.EditTextPreference\nimport androidx.preference.PreferenceFragmentCompat\n\nprivate const val TAG = \"ValidateUtils\"\n\nfun checkIp(ip: String): Boolean {\n    return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {\n        InetAddresses.isNumericAddress(ip)\n    } else {\n        // This pattern doesn't not support IPv6\n        // @Suppress(\"DEPRECATION\")\n        // Patterns.IP_ADDRESS.matcher(ip).matches()\n        true\n    }\n}\n\nfun checkNotLocalIp(ip: String): Boolean {\n    return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {\n        InetAddresses.isNumericAddress(ip) && InetAddresses.parseNumericAddress(ip).let {\n            !it.isAnyLocalAddress && !it.isLoopbackAddress\n        }\n    } else {\n        // This pattern doesn't not support IPv6\n        // @Suppress(\"DEPRECATION\")\n        // Patterns.IP_ADDRESS.matcher(ip).matches()\n        true\n    }\n}\n\nfun checkDomain(domain: String): Boolean {\n    if (domain.isEmpty()) return false\n\n    if (domain.length > 253) return false\n    if (domain.startsWith(\".\") || domain.endsWith(\".\")) return false\n    if (!domain.contains(\".\")) return false\n\n    return true\n}\n\nfun PreferenceFragmentCompat.setEditTestPreferenceListenerDomain(key: String) {\n    setEditTextPreferenceListener(key) { value ->\n        value.isNotEmpty() && checkDomain(value)\n    }\n}\n\nfun PreferenceFragmentCompat.setEditTestPreferenceListenerPort(key: String) {\n    setEditTestPreferenceListenerInt(key, 1, 65535)\n}\n\nfun PreferenceFragmentCompat.setEditTestPreferenceListenerInt(\n    key: String,\n    min: Int = Int.MIN_VALUE,\n    max: Int = Int.MAX_VALUE\n) {\n    setEditTextPreferenceListener(key) { value ->\n        value.toIntOrNull()?.let { it in min..max } ?: false\n    }\n}\n\nfun PreferenceFragmentCompat.setEditTextPreferenceListener(\n    key: String,\n    check: (String) -> Boolean\n) {\n    findPreferenceNotNull<EditTextPreference>(key)\n        .setOnPreferenceChangeListener { preference, newValue ->\n            when (newValue) {\n                is String -> {\n                    val valid = check(newValue)\n                    if (!valid) {\n                        Toast.makeText(\n                            requireContext(),\n                            \"Invalid value for ${preference.title}: $newValue\",\n                            Toast.LENGTH_SHORT\n                        ).show()\n                    }\n                    valid\n                }\n\n                else -> {\n                    Log.w(\n                        TAG,\n                        \"Invalid type for ${preference.key}: \" +\n                                \"$newValue has type ${newValue::class.java}\"\n                    )\n                    false\n                }\n            }\n        }\n}\n"
  },
  {
    "path": "app/src/main/jni/Android.mk",
    "content": "# Copyright (C) 2023 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\ninclude $(call all-subdir-makefiles)\n"
  },
  {
    "path": "app/src/main/jni/Application.mk",
    "content": "# Copyright (C) 2023 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nAPP_OPTIM := release\nAPP_PLATFORM := android-21\nAPP_ABI := armeabi-v7a arm64-v8a x86 x86_64\nAPP_CFLAGS := -O3 -DPKGNAME=io/github/romanvht/byedpi/core\nAPP_CPPFLAGS := -O3 -std=c++11\nNDK_TOOLCHAIN_VERSION := clang\n"
  },
  {
    "path": "app/src/main/res/drawable/baseline_settings_24.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path\n        android:fillColor=\"@android:color/white\"\n        android:pathData=\"M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z\"/>\n</vector>"
  },
  {
    "path": "app/src/main/res/drawable/ic_apps.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M4,8h4L8,4L4,4v4zM10,20h4v-4h-4v4zM4,20h4v-4L4,16v4zM4,14h4v-4L4,10v4zM10,14h4v-4h-4v4zM16,4v4h4L20,4h-4zM10,8h4L14,4h-4v4zM16,14h4v-4h-4v4zM16,20h4v-4h-4v4z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_arrow_down.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?attr/colorControlNormal\"\n        android:pathData=\"M7,10l5,5 5,-5z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_autorenew.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M12,6v3l4,-4 -4,-4v3c-4.42,0 -8,3.58 -8,8 0,1.57 0.46,3.03 1.24,4.26L6.7,14.8c-0.45,-0.83 -0.7,-1.79 -0.7,-2.8 0,-3.31 2.69,-6 6,-6zM18.76,7.74L17.3,9.2c0.44,0.84 0.7,1.79 0.7,2.8 0,3.31 -2.69,6 -6,6v-3l-4,4 4,4v-3c4.42,0 8,-3.58 8,-8 0,-1.57 -0.46,-3.03 -1.24,-4.26z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_battery.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M15.67,4H14V2h-4v2H8.33C7.6,4 7,4.6 7,5.33v15.33C7,21.4 7.6,22 8.33,22h7.33c0.74,0 1.34,-0.6 1.34,-1.33V5.33C17,4.6 16.4,4 15.67,4z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_check.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_code.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M9.4,16.6L4.8,12l4.6,-4.6L8,6l-6,6 6,6 1.4,-1.4zM14.6,16.6l4.6,-4.6 -4.6,-4.6L16,6l6,6 -6,6 -1.4,-1.4z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_computer.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M20,18c1.1,0 1.99,-0.9 1.99,-2L22,6c0,-1.1 -0.9,-2 -2,-2L4,4c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2L0,18v2h24v-2h-4zM4,6h16v10L4,16L4,6z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_description.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M14,2L6,2c-1.1,0 -1.99,0.9 -1.99,2L4,20c0,1.1 0.89,2 1.99,2L18,22c1.1,0 2,-0.9 2,-2L20,8l-6,-6zM16,18L8,18v-2h8v2zM16,14L8,14v-2h8v2zM13,9L13,3.5L18.5,9L13,9z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_dns.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M20,13H4c-0.55,0 -1,0.45 -1,1v6c0,0.55 0.45,1 1,1h16c0.55,0 1,-0.45 1,-1v-6c0,-0.55 -0.45,-1 -1,-1zM7,19c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM20,3H4c-0.55,0 -1,0.45 -1,1v6c0,0.55 0.45,1 1,1h16c0.55,0 1,-0.45 1,-1V4c0,-0.55 -0.45,-1 -1,-1zM7,9c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2z\"/>\n</vector>"
  },
  {
    "path": "app/src/main/res/drawable/ic_documentation.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:height=\"24dp\"\n    android:tint=\"?attr/colorControlNormal\"\n    android:viewportHeight=\"960\"\n    android:viewportWidth=\"960\"\n    android:width=\"24dp\">\n      \n    <path android:fillColor=\"@android:color/white\" android:pathData=\"M300,880Q242,880 201,839Q160,798 160,740L160,220Q160,162 201,121Q242,80 300,80L800,80L800,680Q775,680 757.5,697.5Q740,715 740,740Q740,765 757.5,782.5Q775,800 800,800L800,880L300,880ZM240,613Q254,606 269,603Q284,600 300,600L320,600L320,160L300,160Q275,160 257.5,177.5Q240,195 240,220L240,613ZM400,600L720,600L720,160L400,160L400,600ZM240,613Q240,613 240,613Q240,613 240,613L240,613L240,160L240,160Q240,160 240,160Q240,160 240,160L240,613ZM300,800L673,800Q667,786 663.5,771.5Q660,757 660,740Q660,724 663,709Q666,694 673,680L300,680Q274,680 257,697.5Q240,715 240,740Q240,766 257,783Q274,800 300,800Z\"/>\n    \n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_filter_list.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M10,18h4v-2h-4v2zM3,6v2h18L21,6L3,6zM6,13h12v-2L6,11v2z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_folder.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M10,4H4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V8c0,-1.1 -0.9,-2 -2,-2h-8l-2,-2z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_github.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:height=\"24dp\"\n    android:viewportHeight=\"24\"\n    android:viewportWidth=\"24\"\n    android:width=\"24dp\"\n    android:tint=\"?attr/colorOnBackground\">\n    <path android:fillColor=\"#FF000000\" android:pathData=\"M10.9,2.1c-4.6,0.5 -8.3,4.2 -8.8,8.7c-0.5,4.7 2.2,8.9 6.3,10.5C8.7,21.4 9,21.2 9,20.8v-1.6c0,0 -0.4,0.1 -0.9,0.1c-1.4,0 -2,-1.2 -2.1,-1.9c-0.1,-0.4 -0.3,-0.7 -0.6,-1C5.1,16.3 5,16.3 5,16.2C5,16 5.3,16 5.4,16c0.6,0 1.1,0.7 1.3,1c0.5,0.8 1.1,1 1.4,1c0.4,0 0.7,-0.1 0.9,-0.2c0.1,-0.7 0.4,-1.4 1,-1.8c-2.3,-0.5 -4,-1.8 -4,-4c0,-1.1 0.5,-2.2 1.2,-3C7.1,8.8 7,8.3 7,7.6C7,7.2 7,6.6 7.3,6c0,0 1.4,0 2.8,1.3C10.6,7.1 11.3,7 12,7s1.4,0.1 2,0.3C15.3,6 16.8,6 16.8,6C17,6.6 17,7.2 17,7.6c0,0.8 -0.1,1.2 -0.2,1.4c0.7,0.8 1.2,1.8 1.2,3c0,2.2 -1.7,3.5 -4,4c0.6,0.5 1,1.4 1,2.3v2.6c0,0.3 0.3,0.6 0.7,0.5c3.7,-1.5 6.3,-5.1 6.3,-9.3C22,6.1 16.9,1.4 10.9,2.1z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_http.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M4.5,11h-2L2.5,9L1,9v6h1.5v-2.5h2L4.5,15L6,15L6,9L4.5,9v2zM7,10.5h1.5L8.5,15L10,15v-4.5h1.5L11.5,9L7,9v1.5zM12.5,10.5h1.5L14,15h1.5v-4.5L17,10.5L17,9h-4.5v1.5zM21.5,9L18,9v6h1.5v-2h2c0.8,0 1.5,-0.7 1.5,-1.5v-1c0,-0.8 -0.7,-1.5 -1.5,-1.5zM21.5,12h-2v-1.5h2L21.5,12z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_info.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_language.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM18.92,8h-2.95c-0.32,-1.25 -0.78,-2.45 -1.38,-3.56 1.84,0.63 3.37,1.91 4.33,3.56zM12,4.04c0.83,1.2 1.48,2.53 1.91,3.96h-3.82c0.43,-1.43 1.08,-2.76 1.91,-3.96zM4.26,14C4.1,13.36 4,12.69 4,12s0.1,-1.36 0.26,-2h3.38c-0.08,0.66 -0.14,1.32 -0.14,2 0,0.68 0.06,1.34 0.14,2L4.26,14zM5.08,16h2.95c0.32,1.25 0.78,2.45 1.38,3.56 -1.84,-0.63 -3.37,-1.9 -4.33,-3.56zM8.03,8L5.08,8c0.96,-1.66 2.49,-2.93 4.33,-3.56C8.81,5.55 8.35,6.75 8.03,8zM12,19.96c-0.83,-1.2 -1.48,-2.53 -1.91,-3.96h3.82c-0.43,1.43 -1.08,2.76 -1.91,3.96zM14.34,14L9.66,14c-0.09,-0.66 -0.16,-1.32 -0.16,-2 0,-0.68 0.07,-1.35 0.16,-2h4.68c0.09,0.65 0.16,1.32 0.16,2 0,0.68 -0.07,1.34 -0.16,2zM14.59,19.56c0.6,-1.11 1.06,-2.31 1.38,-3.56h2.95c-0.96,1.65 -2.49,2.93 -4.33,3.56zM16.36,14c0.08,-0.66 0.14,-1.32 0.14,-2 0,-0.68 -0.06,-1.34 -0.14,-2h3.38c0.16,0.64 0.26,1.31 0.26,2s-0.1,1.36 -0.26,2h-3.38z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_launcher_monochrome.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:width=\"128dp\"\n    android:height=\"128dp\"\n    android:viewportWidth=\"768\"\n    android:viewportHeight=\"768\">\n    <group android:pivotX=\"90\" android:pivotY=\"120\" android:scaleX=\"0.15\" android:scaleY=\"0.15\" android:translateX=\"150\" android:translateY=\"150\">\n        <path android:pathData=\"m1107,398l2.7,2.2C1127.5,415.4 1137.4,437.1 1147,458l1.2,2.6 1.1,2.4 1,2.2C1151,467 1151,467 1151,469l2.1,0.8c3.2,1.3 6.1,3 9,4.7l1.8,1c1.9,1.1 3.8,2.2 5.7,3.3l2,1.2C1182.5,486.5 1193.4,493.1 1204,500l1.8,1.2C1219.7,510.1 1233.7,520.3 1242,535l-1,3 -3.3,-0C1224.2,537.9 1210.6,537.9 1197,538l-3.3,0c-6.6,0 -13.2,0.1 -19.8,0.2 -2.1,0 -4.2,0 -6.3,0.1C1151.3,538.4 1136.7,539.2 1123,549l-2.7,1.8c-13.9,13.5 -18.1,32.6 -18.7,51.3C1101.4,613.7 1103.1,624.7 1106,636l1,3.7c11.2,38.8 30,75.6 48.2,111.5C1164.6,769.9 1173.6,788.8 1182,808l1,2.2C1196.3,840.6 1208.9,872.2 1215,905l0.4,2.1c2.5,13.7 3.1,27.1 3.1,41l-0,3.1C1218.4,967.4 1217.5,983.1 1214,999l-0.7,3.1C1205.1,1039.3 1189.7,1074.6 1168,1106a2367833856,2367833856 0,0 1,-1.4 2.1c-6.9,10.1 -14.2,19.7 -22,29 -1.5,1.8 -2.9,3.5 -4.3,5.3C1128.3,1156.9 1114.9,1170.6 1100,1182c-1.1,0.9 -2.2,1.8 -3.3,2.7 -13.2,11 -27.5,20.3 -42.8,28.3l-2.5,1.3C1036,1222.3 1022.8,1225.3 1006,1220c-29.3,-10.2 -55.3,-29 -78.6,-49.1 -2.2,-1.9 -4.4,-3.7 -6.6,-5.6 -8.2,-6.8 -15.8,-14 -23.3,-21.6 -1.8,-1.8 -3.6,-3.6 -5.4,-5.4C885.2,1131.5 878.9,1124.6 873,1117c-0.9,-1.2 -1.9,-2.3 -2.8,-3.5C835.5,1070.2 815.1,1020.1 809,965l-0.3,-2.3c-0.6,-6 -0.9,-11.9 -0.9,-17.9l-0,-2.9c-0,-3 -0,-6 -0,-9.1l-0,-3.1C807.8,914.6 808.3,899.9 811,885c0.3,-2.1 0.7,-4.1 1,-6.2 7.6,-44 24.1,-85.2 41.8,-125.9C873.4,707.6 886.9,661.3 891.8,612.1l0.4,-3.5c2.4,-26 2.2,-52.1 2.4,-78.1 0.1,-5.3 0.1,-10.5 0.2,-15.8 0,-2.4 0,-4.8 0.1,-7.2 0.1,-7.8 0.3,-15.5 0.7,-23.3l0.1,-2.3c0.3,-5.2 0.9,-10.1 2.1,-15.1l0.5,-2.2C904.1,441 917.5,421.4 934,404l1.7,-1.9C950.5,386.2 972.2,375.2 993,370l2.7,-0.7C1034.9,360.3 1076.6,372.7 1107,398ZM1029,452c-5.1,8.2 -6.5,16.9 -4.5,26.4C1027.4,486.4 1031.5,491.3 1039,495c7.5,2.4 15.2,1.8 22.3,-1.4 8.5,-4.8 13.1,-11.6 16.1,-20.8 1.6,-7.3 0,-13.5 -3.8,-19.7 -4.9,-6.3 -12,-10.3 -20,-11.4 -9.4,-0.5 -18.4,3.1 -24.6,10.3ZM1866,124c3,1 3,1 4.1,2.5 1.1,2.3 2.2,4.5 3.2,6.8l1.2,2.6C1893.3,177.3 1888.6,222.5 1873,264c-2.4,6.1 -5.1,12.1 -8,18l-1.4,2.8c-18.3,36.9 -42.8,70.7 -70.7,101 -1.9,2 -3.7,4.1 -5.4,6.2 -3.3,3.8 -6.8,7.2 -10.3,10.7 -1.9,1.9 -3.6,3.8 -5.4,5.9 -7.2,8.4 -15.2,16.3 -23.6,23.4 -2.4,2.1 -4.8,4.3 -7.2,6.5C1734.6,444.7 1727.9,450.5 1721,456c-1.2,1 -2.5,2 -3.7,3C1708.1,466.6 1698.7,473.9 1689,481l-2,1.4C1666,497.8 1643.7,511.3 1621,524l-2.2,1.2C1578.1,548.2 1533.2,561.2 1488,572l0.6,2.3C1489.4,577.8 1490.2,581.3 1491,584.8l0.9,3.7 0.8,3.5 0.8,3.2C1494,598 1494,598 1494,602c59.7,-13.5 116,-32.9 171,-60l3.2,-1.6c14.6,-7.1 28.9,-14.6 42.9,-22.8 2.9,-1.7 5.9,-3.4 8.8,-5.1 18.8,-10.8 37.3,-22.1 55.2,-34.3 2.2,-1.5 4.3,-2.9 6.5,-4.4 9.3,-6.3 18.4,-12.7 27.4,-19.4 2.2,-1.6 4.4,-3.2 6.6,-4.8 9.8,-7.1 19.3,-14.5 28.7,-22.2 2.5,-2 4.9,-4 7.4,-6.1 6.2,-5.1 12.2,-10.2 18.3,-15.4l1.8,-1.5c8.1,-6.9 15.9,-13.9 23.6,-21.2 3,-2.9 6.1,-5.7 9.3,-8.4 4.8,-4.2 9.2,-8.6 13.7,-13.1l2.6,-2.6c2.7,-2.7 5.4,-5.4 8.1,-8.1 1.8,-1.8 3.7,-3.7 5.5,-5.5C1939,341 1943.5,336.5 1948,332l3,1c1.1,2.6 2.1,5.1 2.9,7.8l0.8,2.4C1957.6,352.3 1959.4,361.6 1961,371l0.6,3.3C1963.4,390.5 1962.5,407.1 1959,423l-0.5,2.3C1950.8,459.9 1932.7,491.1 1910,518c-0.9,1.1 -1.8,2.2 -2.7,3.2 -10.2,12.3 -21.3,23.9 -33.9,33.8 -2.4,1.9 -4.7,4 -6.9,6.1 -21.2,19.2 -46.6,35.1 -71.6,48.9l-2.7,1.5C1708,658.5 1609.8,687.6 1504,688l0.6,2.5 0.8,3.5 0.8,3.4c1.4,6.8 2,13.7 2.9,20.6 23.5,-0.4 46.7,-1.4 70,-4l2.3,-0.3C1638.3,707.3 1694.3,695.3 1749,678l2.1,-0.7C1785.1,666.5 1818.6,654.1 1851,639l3.1,-1.5c40.6,-19 79.6,-40.8 116,-67.1C1974.7,567.2 1979.3,564.1 1984,561c0.5,2.2 1,4.4 1.4,6.6l0.8,3.7c1.2,6.2 1.9,12.2 2,18.5l0,2.2c0,1.5 0,3.1 0,4.6 0,2.3 0,4.6 0.1,6.9 0.1,13.7 -1.7,27 -6,40.1l-0.8,2.4c-18.4,54.7 -67.2,90.1 -116.8,114.8C1813.7,785.7 1758.3,799.7 1702,806l-3.1,0.4C1637.1,813.2 1558.2,810.3 1500,786l-0.3,3.9c-0.6,5.9 -1.9,11.5 -3.4,17.2C1495.5,810.5 1495,813.4 1495,817c26.8,7 53.6,13.9 81,18l2.2,0.3c11.1,1.7 22.3,3.1 33.5,4.4 1.5,0.2 3,0.3 4.5,0.5C1667.7,846.2 1721.6,845.1 1773,839l2.7,-0.3c62.9,-7.5 128.8,-20.9 186.6,-48C1964,790 1964,790 1966,790c-4.6,43.1 -21.8,78.5 -55.2,106.8C1870.8,929.1 1818.2,943.7 1768,950l-2.8,0.4C1664.6,962.6 1555.5,934.1 1470,881c-2.3,2.2 -3.9,4.3 -5.4,7.1l-1.3,2.4L1461.9,892.9l-1.4,2.4C1458.5,899.1 1456.5,902.9 1455,907c5.7,3.4 11.3,6.7 17,10l2,1.2C1508.9,938.5 1545.9,954.7 1584,968l3.4,1.2C1608.6,976.5 1630.2,981.9 1652,987l2.1,0.5c15.7,3.7 31.6,6.4 47.5,8.8l2.5,0.4C1716.3,998.5 1728.6,999.9 1741,1001l3.6,0.3c37.5,3.3 75.4,2.7 112.8,-0.9 4.9,-0.4 9.6,-0.6 14.5,-0.5 -9.3,33.3 -37.7,60.7 -67,77.3 -7.8,4.2 -15.6,7.8 -24,10.7l-2.2,0.8c-9,3.1 -18,5.7 -27.4,7.5l-2.4,0.5c-15.5,2.8 -30.9,3.7 -46.6,3.6l-2.8,-0c-14.7,-0 -29.1,-0.8 -43.7,-3.3l-3.1,-0.5C1608.6,1089.3 1566.2,1072.7 1527,1051l-2,-1.1C1500.6,1036.3 1477.3,1019.9 1456,1002c-1.1,-0.9 -2.1,-1.7 -3.2,-2.6 -9.6,-7.9 -18.3,-16.7 -27,-25.5 -3.2,-3.2 -6.4,-6.4 -9.7,-9.6C1414,962 1414,962 1414,960h-2l-0.7,1.7C1407.2,969.2 1400.8,975.9 1394,981h-2c8.6,9.9 17.3,19.5 26.6,28.7l2.7,2.7C1426.4,1017.5 1431.5,1022.3 1437,1027c1.2,1.1 2.5,2.2 3.7,3.2C1473.4,1058.7 1509.1,1083 1547,1104l2.9,1.6C1596.3,1131.5 1649.9,1157.7 1703,1166c-0.2,3.3 -1.1,4.1 -3.7,6.4 -1.2,0.9 -2.4,1.8 -3.6,2.6l-2,1.4C1680.6,1185.7 1666.8,1193.8 1652,1200l-1.9,0.8c-15.9,6.7 -33.3,11.3 -50.6,11.5l-2.8,0c-36.6,0.3 -36.6,0.3 -53.8,-4.3 -1.8,-0.4 -3.7,-0.9 -5.5,-1.3C1519,1202.1 1501.8,1194.9 1485,1186l-2,-1c-19.5,-10.3 -37.4,-23.7 -53.6,-38.7 -2.1,-2 -4.3,-3.9 -6.5,-5.8 -7.6,-6.7 -14.4,-13.9 -20.7,-21.8 -2.1,-2.6 -4.3,-5.1 -6.6,-7.5 -19.3,-21.2 -34.9,-45.9 -50,-70.1 -2.1,-3.4 -4.3,-6.8 -6.6,-10.1l-1.8,1.7C1321.9,1047 1321.9,1047 1316,1047c20.3,41.6 44.3,80.3 75,115l1.9,2.2c6,6.8 12.3,13.2 18.7,19.6 1.8,1.8 3.5,3.5 5.3,5.3 6,6.1 12.1,11.8 18.8,17.1C1438.7,1208.6 1441.4,1211.1 1444,1214v2c-8.8,2.3 -17.5,2.4 -26.5,2.4l-2.3,-0c-54.2,-0.2 -104.5,-21.2 -142.6,-59.4l-1.5,-1.5C1262.8,1149.2 1255.5,1140.6 1249,1131l1.2,-1.8c24.9,-38.3 41.2,-80.6 48.4,-125.6 0.3,-2.2 0.7,-4.3 1.1,-6.5C1305.9,955.4 1300.8,912 1293,871l-0.6,-3.4c-9.4,-48.6 -24.8,-96.5 -45.5,-141.4 -5.3,-11.4 -7.5,-24 -3.8,-36.4 1.5,-3.8 3.1,-7.3 4.9,-10.8l1.7,-3.3c10.6,-19.5 24,-38.1 38.2,-55.2 2,-2.5 4,-5 6,-7.5 3.9,-4.9 8.1,-9.4 12.3,-14 2,-2.2 4,-4.4 5.9,-6.7 4.5,-5.2 9.4,-10 14.2,-14.9 1.6,-1.6 3.2,-3.2 4.8,-4.8C1336.6,567.3 1342.1,562 1348,557c1,-0.9 2.1,-1.8 3.1,-2.7C1378.5,531 1407.9,511.9 1439,494c2.1,-1.2 4.3,-2.5 6.4,-3.7 8.6,-5 17.3,-10 25.9,-14.9 23.1,-13.3 46.1,-26.6 68.5,-41 2.3,-1.5 4.6,-2.9 6.9,-4.3C1558,423 1569.1,415.6 1580,408l2.5,-1.7c16.2,-11.2 32.2,-22.8 47.8,-34.9 2,-1.6 4.1,-3.1 6.1,-4.7 8.1,-6.2 16,-12.5 23.7,-19.2 2.8,-2.4 5.6,-4.7 8.4,-6.9 9.2,-7.5 18.3,-15.3 27.1,-23.3 2.1,-1.9 4.2,-3.7 6.3,-5.5 4.3,-3.7 8.4,-7.6 12.5,-11.5 4.9,-4.7 9.9,-9.3 14.9,-13.8 4.7,-4.3 9.2,-8.7 13.7,-13.1l1.9,-1.8c3.7,-3.7 7.1,-7.5 10.5,-11.4 3.1,-3.6 6.5,-7 9.7,-10.5 5.5,-5.8 10.8,-11.6 16.1,-17.6l1.7,-1.9c4.1,-4.6 7.9,-9.3 11.8,-14 2.7,-3.3 5.6,-6.6 8.4,-9.9 5.5,-6.3 10.7,-12.8 15.8,-19.4 1.3,-1.7 2.7,-3.5 4.1,-5.2 6.3,-8 12.5,-16.1 18.6,-24.3 1.8,-2.4 3.7,-4.9 5.5,-7.3C1853.3,141.3 1859.7,132.7 1866,124ZM179,123c4.5,4.2 8.1,9 11.7,14 1.2,1.7 2.5,3.4 3.8,5.1l1.8,2.5C200.1,149.8 204,154.9 208,160l1.3,1.6c7,8.9 14.1,17.8 21.2,26.5C231.8,189.8 233.1,191.4 234.4,193c5.8,7.1 11.6,14.1 17.6,21l1.6,1.8c7.1,8.2 14.3,16.3 21.7,24.3 1.4,1.5 2.7,3 4.1,4.5 6.4,7.1 13,13.9 19.7,20.6 1,1 2,2 3.1,3.1 2.1,2.1 4.2,4.2 6.3,6.3 2.7,2.7 5.4,5.4 8.1,8.1 2.1,2.1 4.2,4.2 6.3,6.3 1,1 2,2 3,3 5,5.1 10.1,10 15.6,14.7 2.5,2.1 4.9,4.4 7.3,6.6 6.1,5.6 12.3,10.9 18.6,16.3 1.8,1.5 3.6,3.1 5.4,4.6C379.7,340.2 386.8,346.2 394,352l2.3,1.8C410.9,365.6 425.8,376.9 441,388l2.3,1.7C454.7,398 466.3,406.1 478,414l3.3,2.2c22.4,15.1 45.4,29.4 68.7,43 3.4,2 6.8,4 10.1,6C570.9,471.5 581.7,477.9 592.6,484.1 619.4,499.3 645.7,515 670,534l2.7,2.1c9.9,7.8 19.4,15.9 28.6,24.5 2.7,2.5 5.4,5 8.2,7.4 5.4,4.7 10.5,9.9 15.6,15 1.7,1.7 3.4,3.4 5.1,5.1 6,5.9 11.5,11.9 16.8,18.5 2.3,2.9 4.7,5.5 7.3,8.2 20.5,22 51.7,57.6 52.1,89l0.1,2.2C806.7,714.9 803.2,722.9 800,731l-0.8,2.2c-1.7,4.4 -3.5,8.8 -5.3,13.2 -24.5,60.9 -46.8,126.9 -47.1,193.2l-0,3.2c-0,3.4 -0,6.8 -0,10.3l-0,3.5C746.8,973.3 747.1,989.6 750,1006l0.5,3.1C754.4,1031.4 760.6,1053 769,1074l0.8,2c6.8,16.9 15.5,34.3 26.6,48.8C797.6,1126.4 797.6,1126.4 799,1129c-5.8,23.4 -40.7,47.7 -60.3,59.7 -23.3,13.7 -49,23.3 -75.8,27.3l-3.3,0.5c-9.1,1.4 -18,1.8 -27.3,1.7 -2.3,-0 -4.6,0 -6.9,0C617.9,1218.3 610.5,1218 603,1216v-2c1.5,-1.5 1.5,-1.5 3.6,-3.2 2.8,-2.3 5.4,-4.7 7.9,-7.3 2.3,-2.4 4.7,-4.6 7.2,-6.8 4.2,-3.7 8.3,-7.4 12.3,-11.3l2,-1.9c8.4,-7.9 8.4,-7.9 16.3,-16.4 2.6,-3.1 5.3,-6.1 8.1,-9.1 4.4,-4.9 8.5,-9.9 12.6,-15.1l2.2,-2.8C711.5,1096.8 711.5,1096.8 731,1047c-1.9,-1.3 -1.9,-1.3 -4.4,-2.6 -6.4,-3.7 -12.4,-8.1 -17.6,-13.4l-1.2,1.9C693,1056.8 677.8,1080.1 660,1102l-2,2.5C643.4,1122.8 626.5,1140.6 608,1155c-1.2,0.9 -2.3,1.9 -3.5,2.9 -47.1,38.7 -104.2,58.9 -165.2,53.8C433.1,1211 427.1,1209.7 421,1208l-2.5,-0.7C391.9,1199.9 365.6,1186.4 345,1168c1,-2 1,-2 3,-2.7l2.6,-0.6 3,-0.8L357,1163.1c36.3,-9.4 70.9,-23.4 105,-39.1l2.9,-1.3C478.6,1116.4 491.8,1109.4 505,1102l2.7,-1.5C519.8,1093.7 531.5,1086.7 543,1079l2.6,-1.7c16.7,-11.2 33.4,-22.6 48.6,-35.8 2.6,-2.2 5.2,-4.3 7.8,-6.4 4.6,-3.6 8.9,-7.6 13.2,-11.6 2.8,-2.6 5.6,-5.2 8.5,-7.7 4.9,-4.2 9.4,-8.7 14,-13.3 1.5,-1.4 2.9,-2.9 4.4,-4.3C647.2,993.1 651.9,988 656,982l-1.6,-1.4C647.5,974.7 640.7,968.8 636,961c-7.1,5.8 -13.5,12.4 -20,19C610.2,985.9 604.3,991.6 598,997l-2.9,2.6C585.4,1007.9 575.3,1015.5 565,1023l-2.5,1.8C541.5,1040.1 519.2,1052.5 496,1064l-2.8,1.4C459.4,1082 422.2,1092.7 385,1098l-2.3,0.4C329.8,1106.1 271.1,1097.4 227,1066c-4.9,-3.8 -9.5,-7.8 -14,-12l-2.5,-2.3C195.9,1037.8 185.3,1020.3 177,1002v-2c5.5,-0.2 10.9,0 16.4,0.7C244.9,1006.4 296.9,1003.4 348,996l2.1,-0.3C380.5,991.3 410.5,984.5 440,976l3.1,-0.9c50.9,-14.7 101.5,-36.5 146.5,-64.5C593.8,908 593.8,908 596,908c-2.1,-3.8 -4.3,-7.5 -6.5,-11.3l-1.3,-2.2c-0.9,-1.5 -1.8,-3 -2.7,-4.5l-1.3,-2.2 -1.2,-2C582,883.9 581.4,882.1 581,880l-1.8,1C516.8,917.2 448.8,941.6 377,950l-2.8,0.4C341.6,954.5 307.6,953 275,949l-3.4,-0.4C213.7,941.2 149.1,918.3 111.9,870.8 93.6,846.6 85.6,819.8 82,790c3.5,0.6 6.6,1.5 9.9,2.9l2.9,1.2L98.1,795.3c67.7,26.4 139.2,41.5 211.6,46.5 2.2,0.2 4.3,0.3 6.5,0.5 8.5,0.7 16.9,0.9 25.4,0.9 1.4,0 2.7,0 4.1,0 2.9,0 5.7,0 8.6,0 2.9,-0 5.7,0 8.6,0C388,843.3 413,842.2 438,839.3l2.1,-0.3c37.5,-4.4 74.7,-11.4 111.1,-21.6C553,817 553,817 555,817l-0.7,-2.5c-2.6,-9.1 -5,-18.3 -7.3,-27.5l-2.2,0.6C518.4,795.1 491.7,800.9 464.4,804.3l-3.5,0.4C456.9,805.2 452.9,805.6 449,806l-2.8,0.3C429.1,807.8 412,808.4 394.8,808.3l-3.8,-0C372.2,808.3 353.7,807.8 335,805c-1.4,-0.2 -2.8,-0.4 -4.2,-0.6C298.5,799.7 267,792.4 236,782l-3,-1c-35.2,-12 -69.2,-28.5 -99.1,-50.6 -1.7,-1.3 -3.5,-2.5 -5.3,-3.8C111.8,714.3 95.1,697.8 84,680l-1.1,-1.7C67.9,653.9 59.8,627.7 59.8,599.1l0,-3C59.9,589.7 60.2,583.3 60.9,577l0.2,-2.2C61.7,570.4 62.7,566.3 64,562c4.2,1.4 7,3.4 10.4,6.2C84.1,575.9 94.6,582.4 105,589l2.7,1.7C149.4,617.3 193.9,639.1 240,657l2.1,0.8C315.9,686.4 393.2,706.9 472,715l2.4,0.2C489.2,716.8 504,717.6 518.9,718.1c2.2,0.1 4.3,0.2 6.5,0.3C530.6,718.6 535.8,718.8 541,719l1,-30 -6.8,-0.3C492.6,686.5 450.5,682.3 409,672l-3.9,-0.9c-44.2,-10.9 -85.7,-26.8 -126.3,-47.1 -1.7,-0.8 -3.4,-1.7 -5.1,-2.5C246.1,607.6 220.4,590.8 196,572l-1.9,-1.5c-6.8,-5.2 -13.4,-10.6 -19.7,-16.4 -2.5,-2.3 -5.2,-4.4 -7.9,-6.5C157.9,540.6 150.2,532.5 143,524l-2.4,-2.8C105.2,480.7 83.3,431.3 86,377c0.5,-6.1 1.6,-12 3,-18l0.6,-2.3C91.7,348.1 94.1,339.9 98,332c3.1,1.4 5.2,2.9 7.5,5.3l2,2.1a363717920,363717920 0,0 1,2.2 2.2l2.3,2.3c2.4,2.4 4.8,4.9 7.2,7.3 2.4,2.4 4.8,4.8 7.2,7.2 1.5,1.5 3,3 4.4,4.5 4,4 8,7.8 12.3,11.5 3.1,2.7 6,5.5 8.9,8.3 6.5,6.1 13.2,12 20.1,17.8 2.5,2.2 5,4.3 7.6,6.5C186.4,412.8 193.1,418.5 200,424c1.1,0.9 2.2,1.8 3.3,2.7C219.4,439.7 236.1,452 253,464l2.4,1.7c11.2,8 22.6,15.6 34.3,22.8 2.3,1.4 4.6,2.9 6.8,4.3C309.7,501.4 323.3,509.2 337,517l2.5,1.4c17.2,9.7 34.7,18.9 52.4,27.5 1.4,0.7 2.9,1.4 4.3,2.1 46.9,23.1 96.2,39.8 147.1,51.2l2.3,0.5C549.3,600.7 549.3,600.7 553,601l7,-30 -15,-3c-2.5,-0.6 -5,-1.2 -7.4,-1.9l-3.8,-1c-1.3,-0.4 -2.6,-0.7 -3.9,-1.1l-2.1,-0.6c-42.6,-12.1 -83.3,-28.7 -121.2,-51.7 -2.5,-1.5 -5,-3 -7.5,-4.5 -23,-13.8 -44.8,-29.6 -65.4,-46.7C331.2,458.4 328.7,456.3 326.1,454.3c-4.3,-3.5 -8.4,-7.2 -12.5,-10.9 -2.3,-2.1 -4.7,-4 -7.2,-5.9 -8.5,-6.9 -16.1,-14.8 -23.9,-22.6 -2.7,-2.7 -5.4,-5.4 -8.1,-8.1 -15.6,-15.6 -15.6,-15.6 -21.8,-23.6 -1.9,-2.4 -4,-4.7 -6.1,-7C241.1,370.1 236,363.6 231,357l-1.8,-2.3C221.1,344 213.2,333.3 206,322l-2,-3.2C198.3,309.8 193.1,300.4 188,291l-1.1,-2c-21.5,-40.2 -34.5,-89.3 -21.5,-134.3C168.9,143.6 173.4,133.2 179,123ZM864,1191c4.4,3.1 8.4,6.3 12.3,10 11.2,10.2 24,19 36.9,26.9 1.2,0.7 2.4,1.5 3.6,2.2C943.3,1246.7 972.5,1259 1003,1266l2.1,0.5c10.3,2.4 19.5,3.2 29.9,1.4l2.3,-0.4c52.3,-9.5 99.4,-35 138.8,-70.3 5.3,-4.7 5.3,-4.7 8.8,-6.1 7.4,8 14.8,16 21.8,24.3 5,5.8 9.9,11.6 15.4,16.9 2.4,2.4 4.5,4.9 6.7,7.4 6.2,7.1 12.7,14.1 19.5,20.7 2.4,2.4 4.6,5 6.8,7.6 2.2,2.5 4.6,4.8 6.9,7.1 1.6,1.7 3.2,3.4 4.7,5.2 5.6,6.5 11.8,12.5 17.9,18.5 1.3,1.3 2.7,2.7 4,4 2.8,2.8 5.6,5.6 8.4,8.4 3.6,3.6 7.1,7.1 10.7,10.7 2.8,2.8 5.5,5.5 8.3,8.3 1.3,1.3 2.6,2.6 3.9,3.9 8.9,9 8.9,9 18.3,17.4 3,2.6 5.9,5.3 8.7,8 1.3,1.2 2.6,2.4 3.9,3.7l2,1.9c10.9,10.2 10.9,10.2 22,20.2 2.3,2 4.6,4.1 6.9,6.2 8.3,7.4 16.7,14.7 25.1,21.9 1.8,1.5 3.6,3.1 5.4,4.6 14,12.1 14,12.1 28.4,23.9 4.1,3.3 8.1,6.7 12.1,10.1 4.5,3.9 9,7.6 13.8,11.3 2.5,1.9 4.9,3.9 7.3,5.9 10.3,8.5 20.7,16.7 31.3,24.8 4.5,3.4 9,6.9 13.4,10.4 7.1,5.5 14.2,10.9 21.5,16.1 2.5,1.8 5,3.6 7.5,5.4 9.3,6.8 18.8,13.4 28.5,19.8l1.8,1.2c1.7,1.1 3.4,2.3 5.1,3.4l3,2c2.2,1.4 4.3,2.6 6.6,3.7 -0.4,4.5 -3.5,6.8 -6.7,9.6l-1.8,1.6C1551.2,1596.9 1510.7,1617.6 1465,1616c-20.1,-1.5 -38.1,-7 -55,-18l-1.9,-1.2c-9.9,-6.5 -18.2,-14.6 -26.6,-22.9l-1.5,-1.5c-6.1,-6.1 -11.8,-12.3 -17.1,-19.1 -1.7,-2.1 -3.5,-4 -5.4,-5.8 -3.7,-3.5 -6.8,-7.4 -10,-11.4C1344.7,1532.7 1341.9,1529.3 1339,1526c-4.3,-5 -8.5,-10.1 -12.7,-15.2 -2.6,-3.2 -5.3,-6.3 -7.9,-9.4 -3.7,-4.3 -7.2,-8.7 -10.6,-13.2 -1.9,-2.5 -4,-5 -6,-7.4 -4.9,-5.9 -9.6,-12 -14.4,-18 -1.3,-1.7 -2.7,-3.4 -4,-5.2 -6.3,-8 -12.5,-16 -18.7,-24 -2.4,-3.1 -4.8,-6.2 -7.2,-9.2 -7.1,-9.1 -14.1,-18.2 -21,-27.5 -1.5,-2 -2.9,-3.9 -4.4,-5.9 -6.9,-9.2 -13.7,-18.5 -20.4,-27.8 -1.6,-2.3 -3.3,-4.6 -4.9,-6.8C1199.4,1346.4 1192.2,1336.2 1185,1326l-1.7,-2.5C1176.1,1313.4 1169,1303.2 1162,1293c-5.4,4 -10.7,8.2 -15.9,12.5C1144,1307 1144,1307 1142,1307c6.9,12.6 14.3,25 21.6,37.3 2.7,4.6 5.5,9.2 8.2,13.9 8,13.6 16.1,27.1 24.6,40.4 2.3,3.7 4.7,7.4 7,11.1 2.6,4.1 5.2,8.2 7.7,12.4 1.1,1.8 2.3,3.6 3.4,5.4 18.4,29.6 38.2,58.4 58.3,86.9l1.5,2.1c17.5,24.7 35.6,49 53.9,73 3.5,4.5 6.9,9.1 10.3,13.7 8.6,11.4 17.4,22.7 26.4,33.8 1.3,1.7 2.7,3.3 4,5l2,2.5c1.3,1.7 2.6,3.3 4,5 4.2,5.3 8.5,10.5 12.8,15.8 1.5,1.8 3,3.6 4.4,5.4 8.3,10.3 16.9,20.3 25.8,30.1 2,2.2 3.9,4.4 5.8,6.6 2,2.3 4,4.5 6.2,6.6C1432,1716 1432,1716 1432,1718c-1.6,1.3 -1.6,1.3 -3.9,2.7l-2.6,1.6c-35.2,21.5 -76,36.6 -117.6,27.5 -31.1,-7.5 -54.3,-27.9 -70.9,-54.5C1220.4,1667.7 1209.2,1636.7 1197,1607l-0.9,-2.3C1191.3,1593.2 1186.6,1581.6 1182,1570l-0.7,-1.8c-16,-40.1 -31.9,-80.3 -47.3,-120.7 -1.1,-3 -2.3,-6 -3.4,-9 -5.4,-14.1 -10.6,-28.2 -15.9,-42.3 -3.7,-9.9 -7.4,-19.8 -11.1,-29.6 -0.7,-1.8 -1.4,-3.7 -2.1,-5.5 -2.1,-5.4 -4.2,-10.8 -6.5,-16.1l-1.7,0.8c-2.6,1.2 -5.1,2.5 -7.7,3.7l-2.7,1.3 -2.6,1.2 -2.4,1.1C1076,1354 1076,1354 1074,1354c9.5,36.8 19.4,73.5 30,110l1.1,3.7c16.2,56.1 33.9,111.7 53.1,166.8 1.3,3.7 2.6,7.5 3.9,11.2 21.9,63.5 44.8,127.5 74.2,188l1.6,3.2c1,2 2,4 3,6l1.3,2.7 1.2,2.4C1244,1850 1244,1850 1243,1853c-1.8,1.3 -1.8,1.3 -4.1,2.7l-2.6,1.6L1233.4,1858.9l-3,1.7c-36.1,20.8 -81.4,46.1 -124.6,35.8 -15.6,-5 -27.9,-13.6 -36.1,-27.9 -19.1,-38.7 -15.6,-92 -17.6,-134.3 -0.2,-3.8 -0.3,-7.6 -0.5,-11.4 -0.8,-18.1 -1.6,-36.2 -2.4,-54.3 -1.4,-34 -3.2,-68 -5,-102 -1.3,-23.9 -2.6,-47.9 -3.8,-71.8l-0.1,-2c-0.7,-13.8 -1.4,-27.7 -2.1,-41.5 -0.2,-4.9 -0.5,-9.8 -0.7,-14.7 -0.2,-3.4 -0.3,-6.7 -0.5,-10.1 -0.6,-11.5 -1.2,-22.9 -1.9,-34.4h-22l-0.4,8.5c-4.5,94.1 -4.5,94.1 -6.2,124.8 -1.2,22.5 -2.3,45 -3.4,67.4l-0.1,2.6c-1.4,27.9 -2.7,55.8 -3.8,83.7 -0.5,12.2 -1,24.4 -1.8,36.6 -0.4,5.8 -0.5,11.7 -0.6,17.6C993.5,1835 993.5,1835 981,1861l-1.3,2.8C972,1879.5 958.4,1890.4 942,1896c-15.7,4.8 -33.6,2.9 -49,-2l-2.4,-0.7C878.4,1889.3 866.6,1884.5 855,1879l-2.8,-1.3C835.7,1870.1 819.1,1862.1 804,1852c1.3,-3.4 2.8,-6.7 4.4,-10 25.4,-51.6 46.4,-105.4 65.7,-159.6 1.2,-3.4 2.5,-6.9 3.7,-10.3C892.4,1631.7 906.1,1591 919,1550l0.9,-2.9C934.5,1500.7 947.5,1453.8 960.3,1406.8l0.9,-3.3c3.2,-11.6 6.2,-23.2 9.2,-34.8l0.8,-3.1 0.7,-2.9 0.6,-2.5c0.6,-2.5 0.6,-2.5 0.4,-6.3l-20,-9c-4.6,10.6 -8.5,21.5 -12.5,32.4 -30.1,83.1 -61.5,165.8 -96,247.1 -1,2.4 -2,4.7 -3,7.1C801.9,1725.3 801.9,1725.3 756,1745c-32,12.7 -67.8,8.2 -99,-5 -14.3,-6.3 -28,-13.3 -41,-22 1.6,-3.7 3.9,-6.3 6.7,-9.3 0.9,-1 1.8,-2 2.7,-2.9L628,1703c1.8,-2 3.5,-4 5.3,-6.1 1.8,-2.1 3.7,-4.2 5.6,-6.3 3.7,-4.1 7.2,-8.4 10.6,-12.7 2.7,-3.3 5.5,-6.6 8.4,-9.8 4.5,-5.2 8.8,-10.6 13,-16 3.1,-4 6.3,-7.9 9.6,-11.7 4.9,-5.7 9.5,-11.6 14,-17.6C697.4,1619.2 700.2,1615.6 703,1612c5.3,-6.7 10.5,-13.5 15.7,-20.3 0.9,-1.2 1.8,-2.4 2.8,-3.6 44.3,-57.7 86.2,-117 124.4,-178.9 2.1,-3.4 4.2,-6.8 6.3,-10.1 13.3,-21.3 25.9,-43.2 38.4,-65 2.3,-3.9 4.6,-7.9 6.9,-11.8l1.6,-2.7c1,-1.6 1.9,-3.3 2.9,-4.9C904.2,1311 904.2,1311 905,1307c-1.7,-1.6 -1.7,-1.6 -3.9,-3.2l-2.5,-1.9L896,1300c-1.7,-1.3 -3.4,-2.6 -5.1,-3.9l-2.3,-1.8L887,1293c-4.9,5.9 -9.4,12 -13.6,18.4C860.9,1330.4 847.3,1348.6 834,1367l-2.1,2.9c-8.8,12.1 -17.6,24.1 -26.6,36.1 -1.7,2.2 -3.3,4.4 -5,6.6 -7,9.4 -14.2,18.8 -21.5,28 -2.4,3.1 -4.8,6.2 -7.2,9.3 -6.1,7.8 -12.1,15.6 -18.3,23.3 -1.4,1.8 -2.8,3.5 -4.1,5.3C743.5,1485.8 737.8,1492.9 732,1500c-1.5,1.8 -2.9,3.6 -4.4,5.4 -3.8,4.6 -7.7,9.2 -11.5,13.8 -3,3.5 -5.8,7 -8.7,10.5 -3.6,4.5 -7.4,8.7 -11.3,13 -1.9,2.1 -3.8,4.2 -5.6,6.3 -3.4,3.9 -6.9,7.7 -10.3,11.6 -1.8,2.1 -3.6,4.1 -5.4,6.2 -24.4,27.7 -54.5,46.9 -92.1,49.4C544.6,1617.3 505.2,1601.9 476,1578l-1.8,-1.5C467.1,1570.8 460.4,1564.6 454,1558c2.1,-2.2 4.2,-3.8 6.7,-5.4l2.3,-1.4L465.4,1549.7c9.6,-6 18.9,-12.4 28.2,-19 2.3,-1.6 4.5,-3.2 6.8,-4.8 9.4,-6.6 18.5,-13.4 27.6,-20.4 2.4,-1.8 4.7,-3.6 7.1,-5.5 1.6,-1.2 3.2,-2.4 4.8,-3.7 2.1,-1.6 4.1,-3.2 6.2,-4.8 6.7,-5.1 13.3,-10.4 19.9,-15.7 4.4,-3.6 8.8,-7.1 13.2,-10.5 5.7,-4.4 11.2,-9.1 16.7,-13.8 5.5,-4.7 11.1,-9.2 16.7,-13.8 6.4,-5.2 12.6,-10.5 18.8,-15.8 3.3,-2.8 6.6,-5.7 10,-8.5 10.4,-8.8 20.7,-17.7 30.7,-26.9 2.2,-2 4.5,-4 6.7,-6C683,1377 687,1373.3 691,1369.5c3.9,-3.7 7.9,-7.4 12,-11 4,-3.5 7.7,-7.2 11.5,-11 3.6,-3.7 7.2,-7.3 11.1,-10.6 5.2,-4.5 10,-9.3 14.8,-14.2 1,-1 2,-2 2.9,-2.9 2,-2 4.1,-4.1 6.1,-6.1 2.6,-2.6 5.2,-5.2 7.8,-7.8 2,-2 4,-4 6.1,-6.1 1.4,-1.4 2.8,-2.8 4.3,-4.2 4.5,-4.5 8.8,-9.1 13,-13.9 1.9,-2.2 4,-4.3 6.1,-6.4l2.4,-2.4 4.9,-4.9c4.3,-4.3 8.5,-8.6 12.5,-13.2 2.3,-2.7 4.7,-5.3 7.1,-7.9l1.5,-1.6c3.5,-3.7 6.9,-7.4 10.4,-11.2C830.8,1228.5 836,1222.9 841,1217c2.1,-2.4 4.2,-4.9 6.3,-7.3l1.7,-2C853.9,1202.1 858.9,1196.5 864,1191Z\" android:fillColor=\"#FF000000\" tools:ignore=\"VectorPath\" />\n    </group>\n</vector>\n\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_network.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M7.77,6.76L6.23,5.48C4.81,6.85 4,8.82 4,11s0.81,4.15 2.23,5.52l1.54,-1.28C6.67,13.97 6,12.57 6,11c0,-1.57 0.67,-2.97 1.77,-4.24z\"/>\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M12,3C8.14,3 5,6.14 5,10h2c0,-2.76 2.24,-5 5,-5s5,2.24 5,5h2c0,-3.86 -3.14,-7 -7,-7z\"/>\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M12,9c-1.1,0 -2,0.9 -2,2v9h4v-9c0,-1.1 -0.9,-2 -2,-2z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_notification.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:width=\"48dp\"\n    android:height=\"48dp\"\n    android:viewportHeight=\"2048\"\n    android:viewportWidth=\"2048\">\n    <path android:fillColor=\"#FDFDFD\" android:pathData=\"M1866,124c3,1 3,1 4.1,2.5 1.1,2.3 2.2,4.5 3.2,6.8l1.2,2.6C1893.3,177.3 1888.6,222.5 1873,264c-2.4,6.1 -5.1,12.1 -8,18l-1.4,2.8c-18.3,36.9 -42.8,70.7 -70.7,101 -1.9,2 -3.7,4.1 -5.4,6.2 -3.3,3.8 -6.8,7.2 -10.3,10.7 -1.9,1.9 -3.6,3.8 -5.4,5.9 -7.2,8.4 -15.2,16.3 -23.6,23.4 -2.4,2.1 -4.8,4.3 -7.2,6.5C1734.6,444.7 1727.9,450.5 1721,456c-1.2,1 -2.5,2 -3.7,3C1708.1,466.6 1698.7,473.9 1689,481l-2,1.4C1666,497.8 1643.7,511.3 1621,524l-2.2,1.2C1578.1,548.2 1533.2,561.2 1488,572l0.6,2.3C1489.4,577.8 1490.2,581.3 1491,584.8l0.9,3.7 0.8,3.5 0.8,3.2C1494,598 1494,598 1494,602c59.7,-13.5 116,-32.9 171,-60l3.2,-1.6c14.6,-7.1 28.9,-14.6 42.9,-22.8 2.9,-1.7 5.9,-3.4 8.8,-5.1 18.8,-10.8 37.3,-22.1 55.2,-34.3 2.2,-1.5 4.3,-2.9 6.5,-4.4 9.3,-6.3 18.4,-12.7 27.4,-19.4 2.2,-1.6 4.4,-3.2 6.6,-4.8 9.8,-7.1 19.3,-14.5 28.7,-22.2 2.5,-2 4.9,-4 7.4,-6.1 6.2,-5.1 12.2,-10.2 18.3,-15.4l1.8,-1.5c8.1,-6.9 15.9,-13.9 23.6,-21.2 3,-2.9 6.1,-5.7 9.3,-8.4 4.8,-4.2 9.2,-8.6 13.7,-13.1l2.6,-2.6c2.7,-2.7 5.4,-5.4 8.1,-8.1 1.8,-1.8 3.7,-3.7 5.5,-5.5C1939,341 1943.5,336.5 1948,332l3,1c1.1,2.6 2.1,5.1 2.9,7.8l0.8,2.4C1957.6,352.3 1959.4,361.6 1961,371l0.6,3.3C1963.4,390.5 1962.5,407.1 1959,423l-0.5,2.3C1950.8,459.9 1932.7,491.1 1910,518c-0.9,1.1 -1.8,2.2 -2.7,3.2 -10.2,12.3 -21.3,23.9 -33.9,33.8 -2.4,1.9 -4.7,4 -6.9,6.1 -21.2,19.2 -46.6,35.1 -71.6,48.9l-2.7,1.5C1708,658.5 1609.8,687.6 1504,688l0.6,2.5 0.8,3.5 0.8,3.4c1.4,6.8 2,13.7 2.9,20.6 23.5,-0.4 46.7,-1.4 70,-4l2.3,-0.3C1638.3,707.3 1694.3,695.3 1749,678l2.1,-0.7C1785.1,666.5 1818.6,654.1 1851,639l3.1,-1.5c40.6,-19 79.6,-40.8 116,-67.1C1974.7,567.2 1979.3,564.1 1984,561c0.5,2.2 1,4.4 1.4,6.6l0.8,3.7c1.2,6.2 1.9,12.2 2,18.5l0,2.2c0,1.5 0,3.1 0,4.6 0,2.3 0,4.6 0.1,6.9 0.1,13.7 -1.7,27 -6,40.1l-0.8,2.4c-18.4,54.7 -67.2,90.1 -116.8,114.8C1813.7,785.7 1758.3,799.7 1702,806l-3.1,0.4C1637.1,813.2 1558.2,810.3 1500,786l-0.3,3.9c-0.6,5.9 -1.9,11.5 -3.4,17.2C1495.5,810.5 1495,813.4 1495,817c26.8,7 53.6,13.9 81,18l2.2,0.3c11.1,1.7 22.3,3.1 33.5,4.4 1.5,0.2 3,0.3 4.5,0.5C1667.7,846.2 1721.6,845.1 1773,839l2.7,-0.3c62.9,-7.5 128.8,-20.9 186.6,-48C1964,790 1964,790 1966,790c-4.6,43.1 -21.8,78.5 -55.2,106.8C1870.8,929.1 1818.2,943.7 1768,950l-2.8,0.4C1664.6,962.6 1555.5,934.1 1470,881c-2.3,2.2 -3.9,4.3 -5.4,7.1l-1.3,2.4L1461.9,892.9l-1.4,2.4C1458.5,899.1 1456.5,902.9 1455,907c5.7,3.4 11.3,6.7 17,10l2,1.2C1508.9,938.5 1545.9,954.7 1584,968l3.4,1.2C1608.6,976.5 1630.2,981.9 1652,987l2.1,0.5c15.7,3.7 31.6,6.4 47.5,8.8l2.5,0.4C1716.3,998.5 1728.6,999.9 1741,1001l3.6,0.3c37.5,3.3 75.4,2.7 112.8,-0.9 4.9,-0.4 9.6,-0.6 14.5,-0.5 -9.3,33.3 -37.7,60.7 -67,77.3 -7.8,4.2 -15.6,7.8 -24,10.7l-2.2,0.8c-9,3.1 -18,5.7 -27.4,7.5l-2.4,0.5c-15.5,2.8 -30.9,3.7 -46.6,3.6l-2.8,-0c-14.7,-0 -29.1,-0.8 -43.7,-3.3l-3.1,-0.5C1608.6,1089.3 1566.2,1072.7 1527,1051l-2,-1.1C1500.6,1036.3 1477.3,1019.9 1456,1002c-1.1,-0.9 -2.1,-1.7 -3.2,-2.6 -9.6,-7.9 -18.3,-16.7 -27,-25.5 -3.2,-3.2 -6.4,-6.4 -9.7,-9.6C1414,962 1414,962 1414,960h-2l-0.7,1.7C1407.2,969.2 1400.8,975.9 1394,981h-2c8.6,9.9 17.3,19.5 26.6,28.7l2.7,2.7C1426.4,1017.5 1431.5,1022.3 1437,1027c1.2,1.1 2.5,2.2 3.7,3.2C1473.4,1058.7 1509.1,1083 1547,1104l2.9,1.6C1596.3,1131.5 1649.9,1157.7 1703,1166c-0.2,3.3 -1.1,4.1 -3.7,6.4 -1.2,0.9 -2.4,1.8 -3.6,2.6l-2,1.4C1680.6,1185.7 1666.8,1193.8 1652,1200l-1.9,0.8c-15.9,6.7 -33.3,11.3 -50.6,11.5l-2.8,0c-36.6,0.3 -36.6,0.3 -53.8,-4.3 -1.8,-0.4 -3.7,-0.9 -5.5,-1.3C1519,1202.1 1501.8,1194.9 1485,1186l-2,-1c-19.5,-10.3 -37.4,-23.7 -53.6,-38.7 -2.1,-2 -4.3,-3.9 -6.5,-5.8 -7.6,-6.7 -14.4,-13.9 -20.7,-21.8 -2.1,-2.6 -4.3,-5.1 -6.6,-7.5 -19.3,-21.2 -34.9,-45.9 -50,-70.1 -2.1,-3.4 -4.3,-6.8 -6.6,-10.1l-1.8,1.7C1321.9,1047 1321.9,1047 1316,1047c20.3,41.6 44.3,80.3 75,115l1.9,2.2c6,6.8 12.3,13.2 18.7,19.6 1.8,1.8 3.5,3.5 5.3,5.3 6,6.1 12.1,11.8 18.8,17.1C1438.7,1208.6 1441.4,1211.1 1444,1214v2c-8.8,2.3 -17.5,2.4 -26.5,2.4l-2.3,-0c-54.2,-0.2 -104.5,-21.2 -142.6,-59.4l-1.5,-1.5C1262.8,1149.2 1255.5,1140.6 1249,1131l1.2,-1.8c24.9,-38.3 41.2,-80.6 48.4,-125.6 0.3,-2.2 0.7,-4.3 1.1,-6.5C1305.9,955.4 1300.8,912 1293,871l-0.6,-3.4c-9.4,-48.6 -24.8,-96.5 -45.5,-141.4 -5.3,-11.4 -7.5,-24 -3.8,-36.4 1.5,-3.8 3.1,-7.3 4.9,-10.8l1.7,-3.3c10.6,-19.5 24,-38.1 38.2,-55.2 2,-2.5 4,-5 6,-7.5 3.9,-4.9 8.1,-9.4 12.3,-14 2,-2.2 4,-4.4 5.9,-6.7 4.5,-5.2 9.4,-10 14.2,-14.9 1.6,-1.6 3.2,-3.2 4.8,-4.8C1336.6,567.3 1342.1,562 1348,557c1,-0.9 2.1,-1.8 3.1,-2.7C1378.5,531 1407.9,511.9 1439,494c2.1,-1.2 4.3,-2.5 6.4,-3.7 8.6,-5 17.3,-10 25.9,-14.9 23.1,-13.3 46.1,-26.6 68.5,-41 2.3,-1.5 4.6,-2.9 6.9,-4.3C1558,423 1569.1,415.6 1580,408l2.5,-1.7c16.2,-11.2 32.2,-22.8 47.8,-34.9 2,-1.6 4.1,-3.1 6.1,-4.7 8.1,-6.2 16,-12.5 23.7,-19.2 2.8,-2.4 5.6,-4.7 8.4,-6.9 9.2,-7.5 18.3,-15.3 27.1,-23.3 2.1,-1.9 4.2,-3.7 6.3,-5.5 4.3,-3.7 8.4,-7.6 12.5,-11.5 4.9,-4.7 9.9,-9.3 14.9,-13.8 4.7,-4.3 9.2,-8.7 13.7,-13.1l1.9,-1.8c3.7,-3.7 7.1,-7.5 10.5,-11.4 3.1,-3.6 6.5,-7 9.7,-10.5 5.5,-5.8 10.8,-11.6 16.1,-17.6l1.7,-1.9c4.1,-4.6 7.9,-9.3 11.8,-14 2.7,-3.3 5.6,-6.6 8.4,-9.9 5.5,-6.3 10.7,-12.8 15.8,-19.4 1.3,-1.7 2.7,-3.5 4.1,-5.2 6.3,-8 12.5,-16.1 18.6,-24.3 1.8,-2.4 3.7,-4.9 5.5,-7.3C1853.3,141.3 1859.7,132.7 1866,124ZM179,123c4.5,4.2 8.1,9 11.7,14 1.2,1.7 2.5,3.4 3.8,5.1l1.8,2.5C200.1,149.8 204,154.9 208,160l1.3,1.6c7,8.9 14.1,17.8 21.2,26.5C231.8,189.8 233.1,191.4 234.4,193c5.8,7.1 11.6,14.1 17.6,21l1.6,1.8c7.1,8.2 14.3,16.3 21.7,24.3 1.4,1.5 2.7,3 4.1,4.5 6.4,7.1 13,13.9 19.7,20.6 1,1 2,2 3.1,3.1 2.1,2.1 4.2,4.2 6.3,6.3 2.7,2.7 5.4,5.4 8.1,8.1 2.1,2.1 4.2,4.2 6.3,6.3 1,1 2,2 3,3 5,5.1 10.1,10 15.6,14.7 2.5,2.1 4.9,4.4 7.3,6.6 6.1,5.6 12.3,10.9 18.6,16.3 1.8,1.5 3.6,3.1 5.4,4.6C379.7,340.2 386.8,346.2 394,352l2.3,1.8C410.9,365.6 425.8,376.9 441,388l2.3,1.7C454.7,398 466.3,406.1 478,414l3.3,2.2c22.4,15.1 45.4,29.4 68.7,43 3.4,2 6.8,4 10.1,6C570.9,471.5 581.7,477.9 592.6,484.1 619.4,499.3 645.7,515 670,534l2.7,2.1c9.9,7.8 19.4,15.9 28.6,24.5 2.7,2.5 5.4,5 8.2,7.4 5.4,4.7 10.5,9.9 15.6,15 1.7,1.7 3.4,3.4 5.1,5.1 6,5.9 11.5,11.9 16.8,18.5 2.3,2.9 4.7,5.5 7.3,8.2 20.5,22 51.7,57.6 52.1,89l0.1,2.2C806.7,714.9 803.2,722.9 800,731l-0.8,2.2c-1.7,4.4 -3.5,8.8 -5.3,13.2 -24.5,60.9 -46.8,126.9 -47.1,193.2l-0,3.2c-0,3.4 -0,6.8 -0,10.3l-0,3.5C746.8,973.3 747.1,989.6 750,1006l0.5,3.1C754.4,1031.4 760.6,1053 769,1074l0.8,2c6.8,16.9 15.5,34.3 26.6,48.8C797.6,1126.4 797.6,1126.4 799,1129c-5.8,23.4 -40.7,47.7 -60.3,59.7 -23.3,13.7 -49,23.3 -75.8,27.3l-3.3,0.5c-9.1,1.4 -18,1.8 -27.3,1.7 -2.3,-0 -4.6,0 -6.9,0C617.9,1218.3 610.5,1218 603,1216v-2c1.5,-1.5 1.5,-1.5 3.6,-3.2 2.8,-2.3 5.4,-4.7 7.9,-7.3 2.3,-2.4 4.7,-4.6 7.2,-6.8 4.2,-3.7 8.3,-7.4 12.3,-11.3l2,-1.9c8.4,-7.9 8.4,-7.9 16.3,-16.4 2.6,-3.1 5.3,-6.1 8.1,-9.1 4.4,-4.9 8.5,-9.9 12.6,-15.1l2.2,-2.8C711.5,1096.8 711.5,1096.8 731,1047c-1.9,-1.3 -1.9,-1.3 -4.4,-2.6 -6.4,-3.7 -12.4,-8.1 -17.6,-13.4l-1.2,1.9C693,1056.8 677.8,1080.1 660,1102l-2,2.5C643.4,1122.8 626.5,1140.6 608,1155c-1.2,0.9 -2.3,1.9 -3.5,2.9 -47.1,38.7 -104.2,58.9 -165.2,53.8C433.1,1211 427.1,1209.7 421,1208l-2.5,-0.7C391.9,1199.9 365.6,1186.4 345,1168c1,-2 1,-2 3,-2.7l2.6,-0.6 3,-0.8L357,1163.1c36.3,-9.4 70.9,-23.4 105,-39.1l2.9,-1.3C478.6,1116.4 491.8,1109.4 505,1102l2.7,-1.5C519.8,1093.7 531.5,1086.7 543,1079l2.6,-1.7c16.7,-11.2 33.4,-22.6 48.6,-35.8 2.6,-2.2 5.2,-4.3 7.8,-6.4 4.6,-3.6 8.9,-7.6 13.2,-11.6 2.8,-2.6 5.6,-5.2 8.5,-7.7 4.9,-4.2 9.4,-8.7 14,-13.3 1.5,-1.4 2.9,-2.9 4.4,-4.3C647.2,993.1 651.9,988 656,982l-1.6,-1.4C647.5,974.7 640.7,968.8 636,961c-7.1,5.8 -13.5,12.4 -20,19C610.2,985.9 604.3,991.6 598,997l-2.9,2.6C585.4,1007.9 575.3,1015.5 565,1023l-2.5,1.8C541.5,1040.1 519.2,1052.5 496,1064l-2.8,1.4C459.4,1082 422.2,1092.7 385,1098l-2.3,0.4C329.8,1106.1 271.1,1097.4 227,1066c-4.9,-3.8 -9.5,-7.8 -14,-12l-2.5,-2.3C195.9,1037.8 185.3,1020.3 177,1002v-2c5.5,-0.2 10.9,0 16.4,0.7C244.9,1006.4 296.9,1003.4 348,996l2.1,-0.3C380.5,991.3 410.5,984.5 440,976l3.1,-0.9c50.9,-14.7 101.5,-36.5 146.5,-64.5C593.8,908 593.8,908 596,908c-2.1,-3.8 -4.3,-7.5 -6.5,-11.3l-1.3,-2.2c-0.9,-1.5 -1.8,-3 -2.7,-4.5l-1.3,-2.2 -1.2,-2C582,883.9 581.4,882.1 581,880l-1.8,1C516.8,917.2 448.8,941.6 377,950l-2.8,0.4C341.6,954.5 307.6,953 275,949l-3.4,-0.4C213.7,941.2 149.1,918.3 111.9,870.8 93.6,846.6 85.6,819.8 82,790c3.5,0.6 6.6,1.5 9.9,2.9l2.9,1.2L98.1,795.3c67.7,26.4 139.2,41.5 211.6,46.5 2.2,0.2 4.3,0.3 6.5,0.5 8.5,0.7 16.9,0.9 25.4,0.9 1.4,0 2.7,0 4.1,0 2.9,0 5.7,0 8.6,0 2.9,-0 5.7,0 8.6,0C388,843.3 413,842.2 438,839.3l2.1,-0.3c37.5,-4.4 74.7,-11.4 111.1,-21.6C553,817 553,817 555,817l-0.7,-2.5c-2.6,-9.1 -5,-18.3 -7.3,-27.5l-2.2,0.6C518.4,795.1 491.7,800.9 464.4,804.3l-3.5,0.4C456.9,805.2 452.9,805.6 449,806l-2.8,0.3C429.1,807.8 412,808.4 394.8,808.3l-3.8,-0C372.2,808.3 353.7,807.8 335,805c-1.4,-0.2 -2.8,-0.4 -4.2,-0.6C298.5,799.7 267,792.4 236,782l-3,-1c-35.2,-12 -69.2,-28.5 -99.1,-50.6 -1.7,-1.3 -3.5,-2.5 -5.3,-3.8C111.8,714.3 95.1,697.8 84,680l-1.1,-1.7C67.9,653.9 59.8,627.7 59.8,599.1l0,-3C59.9,589.7 60.2,583.3 60.9,577l0.2,-2.2C61.7,570.4 62.7,566.3 64,562c4.2,1.4 7,3.4 10.4,6.2C84.1,575.9 94.6,582.4 105,589l2.7,1.7C149.4,617.3 193.9,639.1 240,657l2.1,0.8C315.9,686.4 393.2,706.9 472,715l2.4,0.2C489.2,716.8 504,717.6 518.9,718.1c2.2,0.1 4.3,0.2 6.5,0.3C530.6,718.6 535.8,718.8 541,719l1,-30 -6.8,-0.3C492.6,686.5 450.5,682.3 409,672l-3.9,-0.9c-44.2,-10.9 -85.7,-26.8 -126.3,-47.1 -1.7,-0.8 -3.4,-1.7 -5.1,-2.5C246.1,607.6 220.4,590.8 196,572l-1.9,-1.5c-6.8,-5.2 -13.4,-10.6 -19.7,-16.4 -2.5,-2.3 -5.2,-4.4 -7.9,-6.5C157.9,540.6 150.2,532.5 143,524l-2.4,-2.8C105.2,480.7 83.3,431.3 86,377c0.5,-6.1 1.6,-12 3,-18l0.6,-2.3C91.7,348.1 94.1,339.9 98,332c3.1,1.4 5.2,2.9 7.5,5.3l2,2.1a363717920,363717920 0,0 1,2.2 2.2l2.3,2.3c2.4,2.4 4.8,4.9 7.2,7.3 2.4,2.4 4.8,4.8 7.2,7.2 1.5,1.5 3,3 4.4,4.5 4,4 8,7.8 12.3,11.5 3.1,2.7 6,5.5 8.9,8.3 6.5,6.1 13.2,12 20.1,17.8 2.5,2.2 5,4.3 7.6,6.5C186.4,412.8 193.1,418.5 200,424c1.1,0.9 2.2,1.8 3.3,2.7C219.4,439.7 236.1,452 253,464l2.4,1.7c11.2,8 22.6,15.6 34.3,22.8 2.3,1.4 4.6,2.9 6.8,4.3C309.7,501.4 323.3,509.2 337,517l2.5,1.4c17.2,9.7 34.7,18.9 52.4,27.5 1.4,0.7 2.9,1.4 4.3,2.1 46.9,23.1 96.2,39.8 147.1,51.2l2.3,0.5C549.3,600.7 549.3,600.7 553,601l7,-30 -15,-3c-2.5,-0.6 -5,-1.2 -7.4,-1.9l-3.8,-1c-1.3,-0.4 -2.6,-0.7 -3.9,-1.1l-2.1,-0.6c-42.6,-12.1 -83.3,-28.7 -121.2,-51.7 -2.5,-1.5 -5,-3 -7.5,-4.5 -23,-13.8 -44.8,-29.6 -65.4,-46.7C331.2,458.4 328.7,456.3 326.1,454.3c-4.3,-3.5 -8.4,-7.2 -12.5,-10.9 -2.3,-2.1 -4.7,-4 -7.2,-5.9 -8.5,-6.9 -16.1,-14.8 -23.9,-22.6 -2.7,-2.7 -5.4,-5.4 -8.1,-8.1 -15.6,-15.6 -15.6,-15.6 -21.8,-23.6 -1.9,-2.4 -4,-4.7 -6.1,-7C241.1,370.1 236,363.6 231,357l-1.8,-2.3C221.1,344 213.2,333.3 206,322l-2,-3.2C198.3,309.8 193.1,300.4 188,291l-1.1,-2c-21.5,-40.2 -34.5,-89.3 -21.5,-134.3C168.9,143.6 173.4,133.2 179,123ZM864,1191c4.4,3.1 8.4,6.3 12.3,10 11.2,10.2 24,19 36.9,26.9 1.2,0.7 2.4,1.5 3.6,2.2C943.3,1246.7 972.5,1259 1003,1266l2.1,0.5c10.3,2.4 19.5,3.2 29.9,1.4l2.3,-0.4c52.3,-9.5 99.4,-35 138.8,-70.3 5.3,-4.7 5.3,-4.7 8.8,-6.1 7.4,8 14.8,16 21.8,24.3 5,5.8 9.9,11.6 15.4,16.9 2.4,2.4 4.5,4.9 6.7,7.4 6.2,7.1 12.7,14.1 19.5,20.7 2.4,2.4 4.6,5 6.8,7.6 2.2,2.5 4.6,4.8 6.9,7.1 1.6,1.7 3.2,3.4 4.7,5.2 5.6,6.5 11.8,12.5 17.9,18.5 1.3,1.3 2.7,2.7 4,4 2.8,2.8 5.6,5.6 8.4,8.4 3.6,3.6 7.1,7.1 10.7,10.7 2.8,2.8 5.5,5.5 8.3,8.3 1.3,1.3 2.6,2.6 3.9,3.9 8.9,9 8.9,9 18.3,17.4 3,2.6 5.9,5.3 8.7,8 1.3,1.2 2.6,2.4 3.9,3.7l2,1.9c10.9,10.2 10.9,10.2 22,20.2 2.3,2 4.6,4.1 6.9,6.2 8.3,7.4 16.7,14.7 25.1,21.9 1.8,1.5 3.6,3.1 5.4,4.6 14,12.1 14,12.1 28.4,23.9 4.1,3.3 8.1,6.7 12.1,10.1 4.5,3.9 9,7.6 13.8,11.3 2.5,1.9 4.9,3.9 7.3,5.9 10.3,8.5 20.7,16.7 31.3,24.8 4.5,3.4 9,6.9 13.4,10.4 7.1,5.5 14.2,10.9 21.5,16.1 2.5,1.8 5,3.6 7.5,5.4 9.3,6.8 18.8,13.4 28.5,19.8l1.8,1.2c1.7,1.1 3.4,2.3 5.1,3.4l3,2c2.2,1.4 4.3,2.6 6.6,3.7 -0.4,4.5 -3.5,6.8 -6.7,9.6l-1.8,1.6C1551.2,1596.9 1510.7,1617.6 1465,1616c-20.1,-1.5 -38.1,-7 -55,-18l-1.9,-1.2c-9.9,-6.5 -18.2,-14.6 -26.6,-22.9l-1.5,-1.5c-6.1,-6.1 -11.8,-12.3 -17.1,-19.1 -1.7,-2.1 -3.5,-4 -5.4,-5.8 -3.7,-3.5 -6.8,-7.4 -10,-11.4C1344.7,1532.7 1341.9,1529.3 1339,1526c-4.3,-5 -8.5,-10.1 -12.7,-15.2 -2.6,-3.2 -5.3,-6.3 -7.9,-9.4 -3.7,-4.3 -7.2,-8.7 -10.6,-13.2 -1.9,-2.5 -4,-5 -6,-7.4 -4.9,-5.9 -9.6,-12 -14.4,-18 -1.3,-1.7 -2.7,-3.4 -4,-5.2 -6.3,-8 -12.5,-16 -18.7,-24 -2.4,-3.1 -4.8,-6.2 -7.2,-9.2 -7.1,-9.1 -14.1,-18.2 -21,-27.5 -1.5,-2 -2.9,-3.9 -4.4,-5.9 -6.9,-9.2 -13.7,-18.5 -20.4,-27.8 -1.6,-2.3 -3.3,-4.6 -4.9,-6.8C1199.4,1346.4 1192.2,1336.2 1185,1326l-1.7,-2.5C1176.1,1313.4 1169,1303.2 1162,1293c-5.4,4 -10.7,8.2 -15.9,12.5C1144,1307 1144,1307 1142,1307c6.9,12.6 14.3,25 21.6,37.3 2.7,4.6 5.5,9.2 8.2,13.9 8,13.6 16.1,27.1 24.6,40.4 2.3,3.7 4.7,7.4 7,11.1 2.6,4.1 5.2,8.2 7.7,12.4 1.1,1.8 2.3,3.6 3.4,5.4 18.4,29.6 38.2,58.4 58.3,86.9l1.5,2.1c17.5,24.7 35.6,49 53.9,73 3.5,4.5 6.9,9.1 10.3,13.7 8.6,11.4 17.4,22.7 26.4,33.8 1.3,1.7 2.7,3.3 4,5l2,2.5c1.3,1.7 2.6,3.3 4,5 4.2,5.3 8.5,10.5 12.8,15.8 1.5,1.8 3,3.6 4.4,5.4 8.3,10.3 16.9,20.3 25.8,30.1 2,2.2 3.9,4.4 5.8,6.6 2,2.3 4,4.5 6.2,6.6C1432,1716 1432,1716 1432,1718c-1.6,1.3 -1.6,1.3 -3.9,2.7l-2.6,1.6c-35.2,21.5 -76,36.6 -117.6,27.5 -31.1,-7.5 -54.3,-27.9 -70.9,-54.5C1220.4,1667.7 1209.2,1636.7 1197,1607l-0.9,-2.3C1191.3,1593.2 1186.6,1581.6 1182,1570l-0.7,-1.8c-16,-40.1 -31.9,-80.3 -47.3,-120.7 -1.1,-3 -2.3,-6 -3.4,-9 -5.4,-14.1 -10.6,-28.2 -15.9,-42.3 -3.7,-9.9 -7.4,-19.8 -11.1,-29.6 -0.7,-1.8 -1.4,-3.7 -2.1,-5.5 -2.1,-5.4 -4.2,-10.8 -6.5,-16.1l-1.7,0.8c-2.6,1.2 -5.1,2.5 -7.7,3.7l-2.7,1.3 -2.6,1.2 -2.4,1.1C1076,1354 1076,1354 1074,1354c9.5,36.8 19.4,73.5 30,110l1.1,3.7c16.2,56.1 33.9,111.7 53.1,166.8 1.3,3.7 2.6,7.5 3.9,11.2 21.9,63.5 44.8,127.5 74.2,188l1.6,3.2c1,2 2,4 3,6l1.3,2.7 1.2,2.4C1244,1850 1244,1850 1243,1853c-1.8,1.3 -1.8,1.3 -4.1,2.7l-2.6,1.6L1233.4,1858.9l-3,1.7c-36.1,20.8 -81.4,46.1 -124.6,35.8 -15.6,-5 -27.9,-13.6 -36.1,-27.9 -19.1,-38.7 -15.6,-92 -17.6,-134.3 -0.2,-3.8 -0.3,-7.6 -0.5,-11.4 -0.8,-18.1 -1.6,-36.2 -2.4,-54.3 -1.4,-34 -3.2,-68 -5,-102 -1.3,-23.9 -2.6,-47.9 -3.8,-71.8l-0.1,-2c-0.7,-13.8 -1.4,-27.7 -2.1,-41.5 -0.2,-4.9 -0.5,-9.8 -0.7,-14.7 -0.2,-3.4 -0.3,-6.7 -0.5,-10.1 -0.6,-11.5 -1.2,-22.9 -1.9,-34.4h-22l-0.4,8.5c-4.5,94.1 -4.5,94.1 -6.2,124.8 -1.2,22.5 -2.3,45 -3.4,67.4l-0.1,2.6c-1.4,27.9 -2.7,55.8 -3.8,83.7 -0.5,12.2 -1,24.4 -1.8,36.6 -0.4,5.8 -0.5,11.7 -0.6,17.6C993.5,1835 993.5,1835 981,1861l-1.3,2.8C972,1879.5 958.4,1890.4 942,1896c-15.7,4.8 -33.6,2.9 -49,-2l-2.4,-0.7C878.4,1889.3 866.6,1884.5 855,1879l-2.8,-1.3C835.7,1870.1 819.1,1862.1 804,1852c1.3,-3.4 2.8,-6.7 4.4,-10 25.4,-51.6 46.4,-105.4 65.7,-159.6 1.2,-3.4 2.5,-6.9 3.7,-10.3C892.4,1631.7 906.1,1591 919,1550l0.9,-2.9C934.5,1500.7 947.5,1453.8 960.3,1406.8l0.9,-3.3c3.2,-11.6 6.2,-23.2 9.2,-34.8l0.8,-3.1 0.7,-2.9 0.6,-2.5c0.6,-2.5 0.6,-2.5 0.4,-6.3l-20,-9c-4.6,10.6 -8.5,21.5 -12.5,32.4 -30.1,83.1 -61.5,165.8 -96,247.1 -1,2.4 -2,4.7 -3,7.1C801.9,1725.3 801.9,1725.3 756,1745c-32,12.7 -67.8,8.2 -99,-5 -14.3,-6.3 -28,-13.3 -41,-22 1.6,-3.7 3.9,-6.3 6.7,-9.3 0.9,-1 1.8,-2 2.7,-2.9L628,1703c1.8,-2 3.5,-4 5.3,-6.1 1.8,-2.1 3.7,-4.2 5.6,-6.3 3.7,-4.1 7.2,-8.4 10.6,-12.7 2.7,-3.3 5.5,-6.6 8.4,-9.8 4.5,-5.2 8.8,-10.6 13,-16 3.1,-4 6.3,-7.9 9.6,-11.7 4.9,-5.7 9.5,-11.6 14,-17.6C697.4,1619.2 700.2,1615.6 703,1612c5.3,-6.7 10.5,-13.5 15.7,-20.3 0.9,-1.2 1.8,-2.4 2.8,-3.6 44.3,-57.7 86.2,-117 124.4,-178.9 2.1,-3.4 4.2,-6.8 6.3,-10.1 13.3,-21.3 25.9,-43.2 38.4,-65 2.3,-3.9 4.6,-7.9 6.9,-11.8l1.6,-2.7c1,-1.6 1.9,-3.3 2.9,-4.9C904.2,1311 904.2,1311 905,1307c-1.7,-1.6 -1.7,-1.6 -3.9,-3.2l-2.5,-1.9L896,1300c-1.7,-1.3 -3.4,-2.6 -5.1,-3.9l-2.3,-1.8L887,1293c-4.9,5.9 -9.4,12 -13.6,18.4C860.9,1330.4 847.3,1348.6 834,1367l-2.1,2.9c-8.8,12.1 -17.6,24.1 -26.6,36.1 -1.7,2.2 -3.3,4.4 -5,6.6 -7,9.4 -14.2,18.8 -21.5,28 -2.4,3.1 -4.8,6.2 -7.2,9.3 -6.1,7.8 -12.1,15.6 -18.3,23.3 -1.4,1.8 -2.8,3.5 -4.1,5.3C743.5,1485.8 737.8,1492.9 732,1500c-1.5,1.8 -2.9,3.6 -4.4,5.4 -3.8,4.6 -7.7,9.2 -11.5,13.8 -3,3.5 -5.8,7 -8.7,10.5 -3.6,4.5 -7.4,8.7 -11.3,13 -1.9,2.1 -3.8,4.2 -5.6,6.3 -3.4,3.9 -6.9,7.7 -10.3,11.6 -1.8,2.1 -3.6,4.1 -5.4,6.2 -24.4,27.7 -54.5,46.9 -92.1,49.4C544.6,1617.3 505.2,1601.9 476,1578l-1.8,-1.5C467.1,1570.8 460.4,1564.6 454,1558c2.1,-2.2 4.2,-3.8 6.7,-5.4l2.3,-1.4L465.4,1549.7c9.6,-6 18.9,-12.4 28.2,-19 2.3,-1.6 4.5,-3.2 6.8,-4.8 9.4,-6.6 18.5,-13.4 27.6,-20.4 2.4,-1.8 4.7,-3.6 7.1,-5.5 1.6,-1.2 3.2,-2.4 4.8,-3.7 2.1,-1.6 4.1,-3.2 6.2,-4.8 6.7,-5.1 13.3,-10.4 19.9,-15.7 4.4,-3.6 8.8,-7.1 13.2,-10.5 5.7,-4.4 11.2,-9.1 16.7,-13.8 5.5,-4.7 11.1,-9.2 16.7,-13.8 6.4,-5.2 12.6,-10.5 18.8,-15.8 3.3,-2.8 6.6,-5.7 10,-8.5 10.4,-8.8 20.7,-17.7 30.7,-26.9 2.2,-2 4.5,-4 6.7,-6C683,1377 687,1373.3 691,1369.5c3.9,-3.7 7.9,-7.4 12,-11 4,-3.5 7.7,-7.2 11.5,-11 3.6,-3.7 7.2,-7.3 11.1,-10.6 5.2,-4.5 10,-9.3 14.8,-14.2 1,-1 2,-2 2.9,-2.9 2,-2 4.1,-4.1 6.1,-6.1 2.6,-2.6 5.2,-5.2 7.8,-7.8 2,-2 4,-4 6.1,-6.1 1.4,-1.4 2.8,-2.8 4.3,-4.2 4.5,-4.5 8.8,-9.1 13,-13.9 1.9,-2.2 4,-4.3 6.1,-6.4l2.4,-2.4 4.9,-4.9c4.3,-4.3 8.5,-8.6 12.5,-13.2 2.3,-2.7 4.7,-5.3 7.1,-7.9l1.5,-1.6c3.5,-3.7 6.9,-7.4 10.4,-11.2C830.8,1228.5 836,1222.9 841,1217c2.1,-2.4 4.2,-4.9 6.3,-7.3l1.7,-2C853.9,1202.1 858.9,1196.5 864,1191Z\" tools:ignore=\"VectorPath\" />\n    <path android:fillColor=\"#FEFEFE\" android:pathData=\"m1107,398 l2.7,2.2C1127.5,415.4 1137.4,437.1 1147,458l1.2,2.6 1.1,2.4 1,2.2C1151,467 1151,467 1151,469l2.1,0.8c3.2,1.3 6.1,3 9,4.7l1.8,1c1.9,1.1 3.8,2.2 5.7,3.3l2,1.2C1182.5,486.5 1193.4,493.1 1204,500l1.8,1.2C1219.7,510.1 1233.7,520.3 1242,535l-1,3 -3.3,-0C1224.2,537.9 1210.6,537.9 1197,538l-3.3,0c-6.6,0 -13.2,0.1 -19.8,0.2 -2.1,0 -4.2,0 -6.3,0.1C1151.3,538.4 1136.7,539.2 1123,549l-2.7,1.8c-13.9,13.5 -18.1,32.6 -18.7,51.3C1101.4,613.7 1103.1,624.7 1106,636l1,3.7c11.2,38.8 30,75.6 48.2,111.5C1164.6,769.9 1173.6,788.8 1182,808l1,2.2C1196.3,840.6 1208.9,872.2 1215,905l0.4,2.1c2.5,13.7 3.1,27.1 3.1,41l-0,3.1C1218.4,967.4 1217.5,983.1 1214,999l-0.7,3.1C1205.1,1039.3 1189.7,1074.6 1168,1106a2367833856,2367833856 0,0 1,-1.4 2.1c-6.9,10.1 -14.2,19.7 -22,29 -1.5,1.8 -2.9,3.5 -4.3,5.3C1128.3,1156.9 1114.9,1170.6 1100,1182c-1.1,0.9 -2.2,1.8 -3.3,2.7 -13.2,11 -27.5,20.3 -42.8,28.3l-2.5,1.3C1036,1222.3 1022.8,1225.3 1006,1220c-29.3,-10.2 -55.3,-29 -78.6,-49.1 -2.2,-1.9 -4.4,-3.7 -6.6,-5.6 -8.2,-6.8 -15.8,-14 -23.3,-21.6 -1.8,-1.8 -3.6,-3.6 -5.4,-5.4C885.2,1131.5 878.9,1124.6 873,1117c-0.9,-1.2 -1.9,-2.3 -2.8,-3.5C835.5,1070.2 815.1,1020.1 809,965l-0.3,-2.3c-0.6,-6 -0.9,-11.9 -0.9,-17.9l-0,-2.9c-0,-3 -0,-6 -0,-9.1l-0,-3.1C807.8,914.6 808.3,899.9 811,885c0.3,-2.1 0.7,-4.1 1,-6.2 7.6,-44 24.1,-85.2 41.8,-125.9C873.4,707.6 886.9,661.3 891.8,612.1l0.4,-3.5c2.4,-26 2.2,-52.1 2.4,-78.1 0.1,-5.3 0.1,-10.5 0.2,-15.8 0,-2.4 0,-4.8 0.1,-7.2 0.1,-7.8 0.3,-15.5 0.7,-23.3l0.1,-2.3c0.3,-5.2 0.9,-10.1 2.1,-15.1l0.5,-2.2C904.1,441 917.5,421.4 934,404l1.7,-1.9C950.5,386.2 972.2,375.2 993,370l2.7,-0.7C1034.9,360.3 1076.6,372.7 1107,398ZM1029,452c-5.1,8.2 -6.5,16.9 -4.5,26.4C1027.4,486.4 1031.5,491.3 1039,495c7.5,2.4 15.2,1.8 22.3,-1.4 8.5,-4.8 13.1,-11.6 16.1,-20.8 1.6,-7.3 0,-13.5 -3.8,-19.7 -4.9,-6.3 -12,-10.3 -20,-11.4 -9.4,-0.5 -18.4,3.1 -24.6,10.3Z\" tools:ignore=\"VectorPath\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_palette.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M12,3c-4.97,0 -9,4.03 -9,9s4.03,9 9,9c0.83,0 1.5,-0.67 1.5,-1.5 0,-0.39 -0.15,-0.74 -0.39,-1.01 -0.23,-0.26 -0.38,-0.61 -0.38,-0.99 0,-0.83 0.67,-1.5 1.5,-1.5L16,16c2.76,0 5,-2.24 5,-5 0,-4.42 -4.03,-8 -9,-8zM6.5,12c-0.83,0 -1.5,-0.67 -1.5,-1.5S5.67,9 6.5,9 8,9.67 8,10.5 7.33,12 6.5,12zM9.5,8C8.67,8 8,7.33 8,6.5S8.67,5 9.5,5s1.5,0.67 1.5,1.5S10.33,8 9.5,8zM14.5,8c-0.83,0 -1.5,-0.67 -1.5,-1.5S13.67,5 14.5,5s1.5,0.67 1.5,1.5S15.33,8 14.5,8zM17.5,12c-0.83,0 -1.5,-0.67 -1.5,-1.5S16.67,9 17.5,9s1.5,0.67 1.5,1.5 -0.67,1.5 -1.5,1.5z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_pin.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:height=\"24dp\"\n    android:tint=\"#000000\"\n    android:viewportHeight=\"24\"\n    android:viewportWidth=\"24\"\n    android:width=\"24dp\">\n\n    <path android:fillColor=\"@android:color/white\" android:pathData=\"M16,9V4l1,0c0.55,0 1,-0.45 1,-1v0c0,-0.55 -0.45,-1 -1,-1H7C6.45,2 6,2.45 6,3v0c0,0.55 0.45,1 1,1l1,0v5c0,1.66 -1.34,3 -3,3h0v2h5.97v7l1,1l1,-1v-7H19v-2h0C17.34,12 16,10.66 16,9z\"/>\n\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_pinned.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"24\"\n    android:viewportHeight=\"24\">\n    <path\n        android:fillColor=\"?android:attr/textColorSecondary\"\n        android:pathData=\"M16,9V4h1c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1H7C6.45,2 6,2.45 6,3s0.45,1 1,1h1v5c0,1.66 -1.34,3 -3,3v2h5.97v7l1,1l1,-1v-7H19v-2C17.34,12 16,10.66 16,9z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_port.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8zM12.5,7H11v6l5.25,3.15 0.75,-1.23 -4.5,-2.67z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_power.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M13,3h-2v10h2L13,3zM17.83,5.17l-1.42,1.42C17.99,7.86 19,9.81 19,12c0,3.87 -3.13,7 -7,7s-7,-3.13 -7,-7c0,-2.19 1.01,-4.14 2.58,-5.42L6.17,5.17C4.23,6.82 3,9.26 3,12c0,4.97 4.03,9 9,9s9,-4.03 9,-9c0,-2.74 -1.23,-5.18 -3.17,-6.83z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_speed.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M20.38,8.57l-1.23,1.85a8,8 0,0 1,-0.22 7.58L5.07,18A8,8 0,0 1,15.58 6.85l1.85,-1.23A10,10 0,0 0,3.35 19a2,2 0,0 0,1.72 1h13.85a2,2 0,0 0,1.74 -1,10 10,0 0,0 -0.27,-10.44z\"/>\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M10.59,15.41a2,2 0,0 0,2.83 0l5.66,-8.49 -8.49,5.66a2,2 0,0 0,0 2.83z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_telegram.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:aapt=\"http://schemas.android.com/aapt\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:viewportWidth=\"32\"\n    android:viewportHeight=\"32\">\n  <path\n      android:pathData=\"M16,16m-14,0a14,14 0,1 1,28 0a14,14 0,1 1,-28 0\">\n    <aapt:attr name=\"android:fillColor\">\n      <gradient \n          android:startX=\"16\"\n          android:startY=\"2\"\n          android:endX=\"16\"\n          android:endY=\"30\"\n          android:type=\"linear\">\n        <item android:offset=\"0\" android:color=\"#FF37BBFE\"/>\n        <item android:offset=\"1\" android:color=\"#FF007DBB\"/>\n      </gradient>\n    </aapt:attr>\n  </path>\n  <path\n      android:pathData=\"M22.987,10.209C23.111,9.403 22.345,8.768 21.629,9.082L7.365,15.345C6.851,15.57 6.889,16.348 7.421,16.518L10.363,17.455C10.925,17.633 11.533,17.541 12.023,17.202L18.655,12.62C18.855,12.482 19.073,12.767 18.902,12.943L14.128,17.865C13.665,18.342 13.757,19.151 14.314,19.5L19.659,22.852C20.258,23.228 21.03,22.851 21.142,22.126L22.987,10.209Z\"\n      android:fillColor=\"#ffffff\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_terminal.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M20,4H4C2.89,4 2,4.9 2,6v12c0,1.1 0.89,2 2,2h16c1.1,0 2,-0.9 2,-2V6C22,4.9 21.11,4 20,4zM7.5,16.5l-1.41,-1.41L8.67,12.5L6.09,9.91l1.41,-1.41l4,4L7.5,16.5zM13,17h-2v-2h2V17z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_toggle.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:height=\"24dp\"\n    android:tint=\"#000000\"\n    android:viewportHeight=\"24\"\n    android:viewportWidth=\"24\"\n    android:width=\"24dp\">\n      \n    <path android:fillColor=\"@android:color/white\" android:pathData=\"M13,3h-2v10h2L13,3zM17.83,5.17l-1.42,1.42C17.99,7.86 19,9.81 19,12c0,3.87 -3.13,7 -7,7s-7,-3.13 -7,-7c0,-2.19 1.01,-4.14 2.58,-5.42L6.17,5.17C4.23,6.82 3,9.26 3,12c0,4.97 4.03,9 9,9s9,-4.03 9,-9c0,-2.74 -1.23,-5.18 -3.17,-6.83z\"/>\n    \n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_tune.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M3,17v2h6v-2L3,17zM3,5v2h10L13,5L3,5zM13,21v-2h8v-2h-8v-2h-2v6h2zM7,9v2L3,11v2h4v2h2L9,9L7,9zM21,13v-2L11,11v2h10zM15,9h2L17,7h4L21,5h-4L17,3h-2v6z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_vpn_key.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\" android:height=\"24dp\"\n    android:viewportWidth=\"24\" android:viewportHeight=\"24\"\n    android:tint=\"?attr/colorControlNormal\">\n    <path android:fillColor=\"@android:color/white\"\n        android:pathData=\"M12.65,10C11.83,7.67 9.61,6 7,6c-3.31,0 -6,2.69 -6,6s2.69,6 6,6c2.61,0 4.83,-1.67 5.65,-4H17v4h4v-4h2v-4H12.65zM7,14c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2z\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/material_alert.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <solid android:color=\"?attr/colorSurfaceContainer\" />\n    <corners android:radius=\"28dp\" />\n</shape>"
  },
  {
    "path": "app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:clipChildren=\"false\"\n    android:clipToPadding=\"false\"\n    tools:context=\".activities.MainActivity\">\n\n    <LinearLayout\n        android:id=\"@+id/bottom_buttons\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_marginStart=\"24dp\"\n        android:layout_marginEnd=\"24dp\"\n        android:layout_marginBottom=\"20dp\"\n        android:clipChildren=\"false\"\n        android:clipToPadding=\"false\"\n        android:orientation=\"vertical\">\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"horizontal\"\n            android:gravity=\"center\">\n\n            <com.google.android.material.card.MaterialCardView\n                android:id=\"@+id/editor_button\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                android:layout_marginEnd=\"8dp\"\n                android:clickable=\"true\"\n                android:focusable=\"true\"\n                android:foreground=\"?attr/selectableItemBackground\"\n                app:cardCornerRadius=\"12dp\"\n                app:strokeWidth=\"0dp\">\n\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:orientation=\"vertical\"\n                    android:gravity=\"center\"\n                    android:padding=\"16dp\"\n                    tools:ignore=\"UseCompoundDrawables\">\n\n                    <ImageView\n                        android:layout_width=\"32dp\"\n                        android:layout_height=\"32dp\"\n                        android:src=\"@drawable/ic_tune\"\n                        android:contentDescription=\"@string/open_editor\"\n                        app:tint=\"?attr/colorPrimary\" />\n\n                    <TextView\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_marginTop=\"8dp\"\n                        android:text=\"@string/open_editor\"\n                        android:textSize=\"14sp\"\n                        android:textColor=\"?android:textColorPrimary\" />\n\n                </LinearLayout>\n            </com.google.android.material.card.MaterialCardView>\n\n            <com.google.android.material.card.MaterialCardView\n                android:id=\"@+id/settings_button\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                android:layout_marginStart=\"8dp\"\n                android:clickable=\"true\"\n                android:focusable=\"true\"\n                android:foreground=\"?attr/selectableItemBackground\"\n                app:cardCornerRadius=\"12dp\"\n                app:strokeWidth=\"0dp\">\n\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:orientation=\"vertical\"\n                    android:gravity=\"center\"\n                    android:padding=\"16dp\"\n                    tools:ignore=\"UseCompoundDrawables\">\n\n                    <ImageView\n                        android:layout_width=\"32dp\"\n                        android:layout_height=\"32dp\"\n                        android:src=\"@drawable/baseline_settings_24\"\n                        android:contentDescription=\"@string/title_settings\"\n                        app:tint=\"?attr/colorPrimary\" />\n\n                    <TextView\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_marginTop=\"8dp\"\n                        android:text=\"@string/title_settings\"\n                        android:textSize=\"14sp\"\n                        android:textColor=\"?android:textColorPrimary\" />\n\n                </LinearLayout>\n            </com.google.android.material.card.MaterialCardView>\n\n        </LinearLayout>\n\n        <LinearLayout\n            android:id=\"@+id/cmd_buttons_row\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"horizontal\"\n            android:gravity=\"center\"\n            android:layout_marginTop=\"16dp\"\n            android:visibility=\"gone\">\n\n            <com.google.android.material.card.MaterialCardView\n                android:id=\"@+id/test_proxy_button\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                android:layout_marginEnd=\"8dp\"\n                android:clickable=\"true\"\n                android:focusable=\"true\"\n                android:foreground=\"?attr/selectableItemBackground\"\n                app:cardCornerRadius=\"12dp\"\n                app:strokeWidth=\"0dp\">\n\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:orientation=\"vertical\"\n                    android:gravity=\"center\"\n                    android:padding=\"16dp\"\n                    tools:ignore=\"UseCompoundDrawables\">\n\n                    <ImageView\n                        android:layout_width=\"32dp\"\n                        android:layout_height=\"32dp\"\n                        android:src=\"@drawable/ic_speed\"\n                        android:contentDescription=\"@string/main_btn_test\"\n                        app:tint=\"?attr/colorPrimary\" />\n\n                    <TextView\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_marginTop=\"8dp\"\n                        android:text=\"@string/main_btn_test\"\n                        android:textSize=\"14sp\"\n                        android:textColor=\"?android:textColorPrimary\" />\n\n                </LinearLayout>\n            </com.google.android.material.card.MaterialCardView>\n\n            <com.google.android.material.card.MaterialCardView\n                android:id=\"@+id/domain_lists_button\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                android:layout_marginStart=\"8dp\"\n                android:clickable=\"true\"\n                android:focusable=\"true\"\n                android:foreground=\"?attr/selectableItemBackground\"\n                app:cardCornerRadius=\"12dp\"\n                app:strokeWidth=\"0dp\">\n\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:orientation=\"vertical\"\n                    android:gravity=\"center\"\n                    android:padding=\"16dp\"\n                    tools:ignore=\"UseCompoundDrawables\">\n\n                    <ImageView\n                        android:layout_width=\"32dp\"\n                        android:layout_height=\"32dp\"\n                        android:src=\"@drawable/ic_filter_list\"\n                        android:contentDescription=\"@string/main_btn_list\"\n                        app:tint=\"?attr/colorPrimary\" />\n\n                    <TextView\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_marginTop=\"8dp\"\n                        android:text=\"@string/main_btn_list\"\n                        android:textSize=\"14sp\"\n                        android:textColor=\"?android:textColorPrimary\" />\n\n                </LinearLayout>\n            </com.google.android.material.card.MaterialCardView>\n\n        </LinearLayout>\n\n    </LinearLayout>\n\n    <FrameLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_above=\"@id/bottom_buttons\">\n\n        <LinearLayout\n            android:id=\"@+id/center_container\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\"\n            android:orientation=\"vertical\"\n            android:gravity=\"center\"\n            tools:ignore=\"UselessParent\">\n\n            <com.google.android.material.card.MaterialCardView\n                android:id=\"@+id/status_button_card\"\n                android:layout_width=\"140dp\"\n                android:layout_height=\"140dp\"\n                app:cardCornerRadius=\"70dp\"\n                app:cardElevation=\"8dp\"\n                app:strokeWidth=\"0dp\"\n                android:clickable=\"true\"\n                android:focusable=\"true\"\n                android:foreground=\"?attr/selectableItemBackground\">\n\n                <ImageView\n                    android:id=\"@+id/status_button_icon\"\n                    android:layout_width=\"56dp\"\n                    android:layout_height=\"56dp\"\n                    android:layout_gravity=\"center\"\n                    android:src=\"@drawable/ic_power\"\n                    android:contentDescription=\"@string/vpn_connect\"\n                    app:tint=\"?attr/colorOnPrimary\" />\n\n            </com.google.android.material.card.MaterialCardView>\n\n            <com.google.android.material.textview.MaterialTextView\n                android:id=\"@+id/status_text\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginTop=\"16dp\"\n                android:textSize=\"16sp\"\n                tools:text=\"@string/vpn_disconnected\" />\n\n            <com.google.android.material.textview.MaterialTextView\n                android:id=\"@+id/proxy_address\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginTop=\"8dp\"\n                android:textSize=\"14sp\"\n                android:textColor=\"?android:textColorSecondary\"\n                tools:text=\"127.0.0.1:1080\" />\n\n        </LinearLayout>\n    </FrameLayout>\n\n</RelativeLayout>"
  },
  {
    "path": "app/src/main/res/layout/activity_proxy_test.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"vertical\"\n        android:paddingTop=\"16dp\"\n        android:paddingBottom=\"12dp\"\n        android:background=\"?android:attr/colorBackground\">\n\n        <Button\n            android:id=\"@+id/startStopButton\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"42dp\"\n            android:layout_gravity=\"center_horizontal\"\n            android:insetTop=\"0dp\"\n            android:insetBottom=\"0dp\"\n            android:paddingLeft=\"10pt\"\n            android:paddingRight=\"10pt\"\n            android:textAllCaps=\"true\"\n            android:text=\"@string/test_start\" />\n\n        <TextView\n            android:id=\"@+id/progressTextView\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:textAlignment=\"center\"\n            android:paddingTop=\"6dp\"/>\n    </LinearLayout>\n\n    <androidx.recyclerview.widget.RecyclerView\n        android:id=\"@+id/strategiesRecyclerView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"1\"\n        android:clipToPadding=\"false\"\n        android:paddingTop=\"0dp\"\n        android:paddingBottom=\"4dp\" />\n\n    <TextView\n        android:id=\"@+id/disclaimerTextView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:padding=\"16dp\"\n        android:text=\"@string/test_disclaimer\"\n        android:textSize=\"12sp\"\n        android:textAlignment=\"center\"/>\n\n</LinearLayout>\n"
  },
  {
    "path": "app/src/main/res/layout/activity_settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.fragment.app.FragmentContainerView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/settings\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\" />\n"
  },
  {
    "path": "app/src/main/res/layout/activity_test_settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.fragment.app.FragmentContainerView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/test_settings\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\" />\n"
  },
  {
    "path": "app/src/main/res/layout/app_selection_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"horizontal\"\n    android:padding=\"8dp\"\n    android:background=\"?android:attr/selectableItemBackground\"\n    android:clickable=\"true\"\n    android:focusable=\"true\">\n\n    <ImageView\n        android:id=\"@+id/appIcon\"\n        android:layout_width=\"48dp\"\n        android:layout_height=\"48dp\"\n        android:layout_marginEnd=\"8dp\" />\n\n    <LinearLayout\n        android:layout_width=\"0dp\"\n        android:layout_height=\"wrap_content\"\n        android:layout_weight=\"1\"\n        android:layout_gravity=\"center_vertical\"\n        android:orientation=\"vertical\">\n\n        <TextView\n            android:id=\"@+id/appName\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:textSize=\"16sp\"\n            android:textColor=\"?android:attr/textColorPrimary\" />\n\n        <TextView\n            android:id=\"@+id/appPackageName\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:textSize=\"12sp\"\n            android:textColor=\"?android:attr/textColorSecondary\" />\n\n    </LinearLayout>\n\n    <CheckBox\n        android:id=\"@+id/appCheckBox\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center_vertical\"\n        android:clickable=\"false\" />\n\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/app_selection_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\">\n\n    <SearchView\n        android:id=\"@+id/searchView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:iconifiedByDefault=\"false\"\n        android:visibility=\"gone\"\n        android:queryHint=\"@string/search_apps\" />\n\n    <FrameLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"1\">\n\n        <ProgressBar\n            android:id=\"@+id/progressBar\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\"\n            android:visibility=\"gone\" />\n\n        <androidx.recyclerview.widget.RecyclerView\n            android:id=\"@+id/recyclerView\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\" />\n    </FrameLayout>\n</LinearLayout>\n"
  },
  {
    "path": "app/src/main/res/layout/cmd_editor_buttons.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"horizontal\"\n    android:paddingStart=\"8dp\"\n    android:paddingEnd=\"8dp\"\n    android:paddingBottom=\"8dp\"\n    android:paddingTop=\"0dp\"\n    android:gravity=\"start\">\n\n    <TextView\n        android:id=\"@+id/btn_clear\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"@string/cmd_args_clear\"\n        android:textColor=\"?android:attr/textColorSecondary\"\n        android:textSize=\"14sp\"\n        android:padding=\"8dp\"\n        android:clickable=\"true\"\n        android:focusable=\"true\"\n        android:background=\"?attr/selectableItemBackground\" />\n\n    <TextView\n        android:id=\"@+id/btn_paste\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"@string/cmd_args_paste\"\n        android:textColor=\"?android:attr/textColorSecondary\"\n        android:textSize=\"14sp\"\n        android:padding=\"8dp\"\n        android:layout_marginStart=\"8dp\"\n        android:clickable=\"true\"\n        android:focusable=\"true\"\n        android:background=\"?attr/selectableItemBackground\" />\n\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/domain_lists.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\">\n\n    <RelativeLayout\n        android:id=\"@+id/add_new_list_button\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"?android:attr/selectableItemBackground\"\n        android:clickable=\"true\"\n        android:focusable=\"true\"\n        android:padding=\"16dp\">\n\n        <TextView\n            android:id=\"@+id/add_list_title\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/domain_list_add_new\"\n            android:textAppearance=\"?android:attr/textAppearanceListItem\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_below=\"@id/add_list_title\"\n            android:text=\"@string/domain_list_add_new_summary\"\n            android:textAppearance=\"?android:attr/textAppearanceListItemSecondary\" />\n\n    </RelativeLayout>\n\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"?android:attr/listDivider\" />\n\n    <androidx.recyclerview.widget.RecyclerView\n        android:id=\"@+id/domain_lists_recycler\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"1\"\n        android:clipToPadding=\"false\"\n        android:padding=\"8dp\" />\n</LinearLayout>\n"
  },
  {
    "path": "app/src/main/res/layout/history_category.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"vertical\"\n    android:paddingTop=\"0dp\"\n    android:paddingBottom=\"16dp\">\n\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:layout_marginBottom=\"15dp\"\n        android:background=\"?android:attr/listDivider\" />\n\n    <TextView\n        android:id=\"@android:id/title\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:paddingStart=\"16dp\"\n        android:paddingEnd=\"16dp\"\n        android:textColor=\"?android:attr/colorAccent\"\n        android:textStyle=\"bold\"\n        android:paddingBottom=\"4dp\" />\n\n    <TextView\n        android:id=\"@android:id/summary\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:paddingStart=\"16dp\"\n        android:paddingEnd=\"16dp\"\n        android:textColor=\"?android:attr/textColorSecondary\"\n        android:textSize=\"12sp\" />\n\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/history_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<com.google.android.material.card.MaterialCardView\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:layout_marginStart=\"8dp\"\n    android:layout_marginTop=\"4dp\"\n    android:layout_marginEnd=\"8dp\"\n    android:layout_marginBottom=\"4dp\"\n    app:strokeWidth=\"0dp\"\n    app:cardCornerRadius=\"12dp\"\n    android:clickable=\"true\"\n    android:focusable=\"true\"\n    android:foreground=\"?attr/selectableItemBackground\">\n\n    <RelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\">\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\"\n            android:padding=\"16dp\">\n\n            <TextView\n                android:id=\"@+id/command_name\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:textStyle=\"bold\"\n                android:textSize=\"16sp\"\n                android:textColor=\"?android:attr/textColorPrimary\"\n                android:visibility=\"gone\"\n                android:paddingBottom=\"4dp\" />\n\n            <TextView\n                android:id=\"@android:id/title\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:textSize=\"14sp\"\n                android:textColor=\"?android:attr/textColorPrimary\"\n                android:ellipsize=\"end\"\n                android:maxLines=\"3\" />\n\n            <TextView\n                android:id=\"@android:id/summary\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:textSize=\"12sp\"\n                android:textColor=\"?attr/colorPrimary\"\n                android:textStyle=\"bold\"\n                android:visibility=\"gone\"\n                android:paddingTop=\"4dp\" />\n        </LinearLayout>\n\n        <ImageView\n            android:id=\"@+id/pin_icon\"\n            android:layout_width=\"18dp\"\n            android:layout_height=\"18dp\"\n            android:layout_alignParentTop=\"true\"\n            android:layout_alignParentEnd=\"true\"\n            android:layout_margin=\"12dp\"\n            android:src=\"@drawable/ic_pin\"\n            android:visibility=\"gone\"\n            android:contentDescription=\"@string/cmd_history_pinned\"\n            app:tint=\"?attr/colorPrimary\" />\n\n    </RelativeLayout>\n</com.google.android.material.card.MaterialCardView>\n"
  },
  {
    "path": "app/src/main/res/layout/item_domain_list.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<com.google.android.material.card.MaterialCardView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:layout_margin=\"4dp\"\n    app:cardElevation=\"2dp\"\n    app:cardCornerRadius=\"8dp\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"horizontal\"\n        android:padding=\"12dp\"\n        android:gravity=\"center_vertical\">\n\n        <LinearLayout\n            android:id=\"@+id/list_content\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:orientation=\"vertical\"\n            android:background=\"?attr/selectableItemBackground\"\n            android:clickable=\"true\"\n            android:focusable=\"true\">\n\n            <TextView\n                android:id=\"@+id/list_name\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:textSize=\"16sp\"\n                android:textStyle=\"bold\"\n                android:textColor=\"?android:textColorPrimary\" />\n\n            <TextView\n                android:id=\"@+id/list_count\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:textSize=\"14sp\"\n                android:textColor=\"?android:textColorSecondary\" />\n\n        </LinearLayout>\n\n        <CheckBox\n            android:id=\"@+id/list_checkbox\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginStart=\"12dp\" />\n\n    </LinearLayout>\n\n</com.google.android.material.card.MaterialCardView>"
  },
  {
    "path": "app/src/main/res/layout/item_site_result.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"horizontal\"\n    android:clickable=\"true\"\n    android:focusable=\"true\"\n    android:padding=\"4dp\"\n    android:background=\"?attr/selectableItemBackground\">\n\n    <TextView\n        android:id=\"@+id/siteTextView\"\n        android:layout_width=\"0dp\"\n        android:layout_height=\"wrap_content\"\n        android:layout_weight=\"1\"\n        android:textSize=\"12sp\"\n        android:ellipsize=\"end\"\n        android:maxLines=\"1\"/>\n\n    <TextView\n        android:id=\"@+id/siteResultTextView\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"12sp\"\n        android:layout_marginStart=\"8dp\"/>\n\n</LinearLayout>\n"
  },
  {
    "path": "app/src/main/res/layout/item_strategy_result.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<com.google.android.material.card.MaterialCardView\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:layout_marginStart=\"8dp\"\n    android:layout_marginTop=\"0dp\"\n    android:layout_marginEnd=\"8dp\"\n    android:layout_marginBottom=\"8dp\"\n    app:strokeWidth=\"0dp\"\n    app:cardCornerRadius=\"8dp\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"vertical\"\n        android:padding=\"12dp\">\n\n        <TextView\n            android:id=\"@+id/commandTextView\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:textSize=\"14sp\"\n            android:textColor=\"?android:attr/textColorPrimary\"\n            android:background=\"?attr/selectableItemBackground\"\n            android:clickable=\"true\"\n            android:focusable=\"true\"\n            android:padding=\"4dp\"\n            android:ellipsize=\"end\"\n            android:maxLines=\"10\"/>\n\n        <LinearLayout\n            android:id=\"@+id/progressLayout\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"horizontal\"\n            android:layout_marginTop=\"8dp\"\n            android:visibility=\"gone\">\n\n            <ProgressBar\n                android:id=\"@+id/progressBar\"\n                style=\"?android:attr/progressBarStyleHorizontal\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                android:layout_gravity=\"center_vertical\"/>\n\n            <TextView\n                android:id=\"@+id/progressTextView\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginStart=\"8dp\"\n                android:textSize=\"14sp\"\n                android:textStyle=\"bold\"/>\n        </LinearLayout>\n\n        <LinearLayout\n            android:id=\"@+id/expandButton\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"horizontal\"\n            android:layout_marginTop=\"4dp\"\n            android:background=\"?attr/selectableItemBackground\"\n            android:clickable=\"true\"\n            android:focusable=\"true\"\n            android:paddingStart=\"4dp\"\n            android:paddingTop=\"4dp\"\n            android:paddingEnd=\"4dp\"\n            android:paddingBottom=\"0dp\"\n            android:visibility=\"gone\">\n\n            <TextView\n                android:id=\"@+id/expandTextView\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                android:text=\"@string/test_show_details\"\n                android:textSize=\"12sp\"\n                android:layout_gravity=\"center_vertical\"\n                android:textColor=\"?attr/colorPrimary\"/>\n\n            <ImageView\n                android:id=\"@+id/expandIcon\"\n                android:layout_width=\"24dp\"\n                android:layout_height=\"24dp\"\n                android:src=\"@drawable/ic_arrow_down\"\n                android:layout_gravity=\"center_vertical\"\n                android:contentDescription=\"@string/test_expand\"/>\n        </LinearLayout>\n\n        <androidx.recyclerview.widget.RecyclerView\n            android:id=\"@+id/sitesRecyclerView\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"8dp\"\n            android:visibility=\"gone\"\n            android:nestedScrollingEnabled=\"false\"/>\n    </LinearLayout>\n</com.google.android.material.card.MaterialCardView>\n"
  },
  {
    "path": "app/src/main/res/layout/material_switch.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<com.google.android.material.materialswitch.MaterialSwitch xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@android:id/switch_widget\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:background=\"@null\"\n    android:clickable=\"false\"\n    android:focusable=\"false\"\n    tools:ignore=\"NewApi\" />"
  },
  {
    "path": "app/src/main/res/layout-land/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:baselineAligned=\"false\"\n    android:orientation=\"horizontal\"\n    android:clipChildren=\"false\"\n    android:clipToPadding=\"false\"\n    tools:context=\".activities.MainActivity\">\n\n    <LinearLayout\n        android:id=\"@+id/left_container\"\n        android:layout_width=\"0dp\"\n        android:layout_height=\"match_parent\"\n        android:layout_weight=\"1\"\n        android:orientation=\"vertical\"\n        android:gravity=\"center\">\n\n        <com.google.android.material.card.MaterialCardView\n            android:id=\"@+id/status_button_card\"\n            android:layout_width=\"120dp\"\n            android:layout_height=\"120dp\"\n            app:cardCornerRadius=\"60dp\"\n            app:cardElevation=\"8dp\"\n            app:strokeWidth=\"0dp\"\n            android:clickable=\"true\"\n            android:focusable=\"true\"\n            android:foreground=\"?attr/selectableItemBackground\">\n\n            <ImageView\n                android:id=\"@+id/status_button_icon\"\n                android:layout_width=\"56dp\"\n                android:layout_height=\"56dp\"\n                android:layout_gravity=\"center\"\n                android:src=\"@drawable/ic_power\"\n                android:contentDescription=\"@string/vpn_connect\"\n                app:tint=\"?attr/colorOnPrimary\" />\n\n        </com.google.android.material.card.MaterialCardView>\n\n        <com.google.android.material.textview.MaterialTextView\n            android:id=\"@+id/status_text\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"16dp\"\n            android:textSize=\"16sp\"\n            android:gravity=\"center\"\n            tools:text=\"@string/vpn_disconnected\" />\n\n        <com.google.android.material.textview.MaterialTextView\n            android:id=\"@+id/proxy_address\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"8dp\"\n            android:textSize=\"14sp\"\n            android:gravity=\"center\"\n            android:textColor=\"?android:textColorSecondary\"\n            tools:text=\"127.0.0.1:1080\" />\n\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/right_container\"\n        android:layout_width=\"0dp\"\n        android:layout_height=\"match_parent\"\n        android:layout_weight=\"1\"\n        android:orientation=\"horizontal\"\n        android:gravity=\"center\"\n        android:clipChildren=\"false\"\n        android:clipToPadding=\"false\"\n        android:paddingEnd=\"48dp\">\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\"\n            android:gravity=\"center\"\n            android:layout_marginEnd=\"8dp\">\n\n            <com.google.android.material.card.MaterialCardView\n                android:id=\"@+id/editor_button\"\n                android:layout_width=\"200dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginBottom=\"8dp\"\n                android:clickable=\"true\"\n                android:focusable=\"true\"\n                android:foreground=\"?attr/selectableItemBackground\"\n                app:cardCornerRadius=\"12dp\"\n                app:strokeWidth=\"0dp\">\n\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:orientation=\"vertical\"\n                    android:gravity=\"center\"\n                    android:padding=\"16dp\"\n                    tools:ignore=\"UseCompoundDrawables\">\n\n                    <ImageView\n                        android:layout_width=\"32dp\"\n                        android:layout_height=\"32dp\"\n                        android:src=\"@drawable/ic_tune\"\n                        android:contentDescription=\"@string/open_editor\"\n                        app:tint=\"?attr/colorPrimary\" />\n\n                    <TextView\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_marginTop=\"8dp\"\n                        android:text=\"@string/open_editor\"\n                        android:textSize=\"14sp\"\n                        android:textColor=\"?android:textColorPrimary\" />\n\n                </LinearLayout>\n            </com.google.android.material.card.MaterialCardView>\n\n            <com.google.android.material.card.MaterialCardView\n                android:id=\"@+id/settings_button\"\n                android:layout_width=\"200dp\"\n                android:layout_height=\"wrap_content\"\n                android:clickable=\"true\"\n                android:focusable=\"true\"\n                android:foreground=\"?attr/selectableItemBackground\"\n                app:cardCornerRadius=\"12dp\"\n                app:strokeWidth=\"0dp\">\n\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:orientation=\"vertical\"\n                    android:gravity=\"center\"\n                    android:padding=\"16dp\"\n                    tools:ignore=\"UseCompoundDrawables\">\n\n                    <ImageView\n                        android:layout_width=\"32dp\"\n                        android:layout_height=\"32dp\"\n                        android:src=\"@drawable/baseline_settings_24\"\n                        android:contentDescription=\"@string/title_settings\"\n                        app:tint=\"?attr/colorPrimary\" />\n\n                    <TextView\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_marginTop=\"8dp\"\n                        android:text=\"@string/title_settings\"\n                        android:textSize=\"14sp\"\n                        android:textColor=\"?android:textColorPrimary\" />\n\n                </LinearLayout>\n            </com.google.android.material.card.MaterialCardView>\n\n        </LinearLayout>\n\n        <LinearLayout\n            android:id=\"@+id/cmd_buttons_row\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\"\n            android:gravity=\"center\"\n            android:layout_marginStart=\"16dp\"\n            android:visibility=\"gone\">\n\n            <com.google.android.material.card.MaterialCardView\n                android:id=\"@+id/test_proxy_button\"\n                android:layout_width=\"200dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginBottom=\"8dp\"\n                android:clickable=\"true\"\n                android:focusable=\"true\"\n                android:foreground=\"?attr/selectableItemBackground\"\n                app:cardCornerRadius=\"12dp\"\n                app:strokeWidth=\"0dp\">\n\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:orientation=\"vertical\"\n                    android:gravity=\"center\"\n                    android:padding=\"16dp\"\n                    tools:ignore=\"UseCompoundDrawables\">\n\n                    <ImageView\n                        android:layout_width=\"32dp\"\n                        android:layout_height=\"32dp\"\n                        android:src=\"@drawable/ic_speed\"\n                        android:contentDescription=\"@string/main_btn_test\"\n                        app:tint=\"?attr/colorPrimary\" />\n\n                    <TextView\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_marginTop=\"8dp\"\n                        android:text=\"@string/main_btn_test\"\n                        android:textSize=\"14sp\"\n                        android:textColor=\"?android:textColorPrimary\" />\n\n                </LinearLayout>\n            </com.google.android.material.card.MaterialCardView>\n\n            <com.google.android.material.card.MaterialCardView\n                android:id=\"@+id/domain_lists_button\"\n                android:layout_width=\"200dp\"\n                android:layout_height=\"wrap_content\"\n                android:clickable=\"true\"\n                android:focusable=\"true\"\n                android:foreground=\"?attr/selectableItemBackground\"\n                app:cardCornerRadius=\"12dp\"\n                app:strokeWidth=\"0dp\">\n\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:orientation=\"vertical\"\n                    android:gravity=\"center\"\n                    android:padding=\"16dp\"\n                    tools:ignore=\"UseCompoundDrawables\">\n\n                    <ImageView\n                        android:layout_width=\"32dp\"\n                        android:layout_height=\"32dp\"\n                        android:src=\"@drawable/ic_filter_list\"\n                        android:contentDescription=\"@string/main_btn_list\"\n                        app:tint=\"?attr/colorPrimary\" />\n\n                    <TextView\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_marginTop=\"8dp\"\n                        android:text=\"@string/main_btn_list\"\n                        android:textSize=\"14sp\"\n                        android:textColor=\"?android:textColorPrimary\" />\n\n                </LinearLayout>\n            </com.google.android.material.card.MaterialCardView>\n\n        </LinearLayout>\n\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/menu/menu_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    tools:context=\".activities.MainActivity\">\n\n    <item\n        android:id=\"@+id/action_save_logs\"\n        android:orderInCategory=\"1\"\n        android:title=\"@string/save_logs\"\n        app:showAsAction=\"never\" />\n\n    <item\n        android:id=\"@+id/action_close_app\"\n        android:orderInCategory=\"2\"\n        android:title=\"@string/close_app\"\n        app:showAsAction=\"never\" />\n\n</menu>\n"
  },
  {
    "path": "app/src/main/res/menu/menu_settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\r\n    xmlns:tools=\"http://schemas.android.com/tools\"\r\n    tools:context=\".activities.MainActivity\">\r\n\r\n    <item\r\n        android:id=\"@+id/action_export_settings\"\r\n        android:orderInCategory=\"1\"\r\n        android:title=\"@string/export_settings\"\r\n        app:showAsAction=\"never\" />\r\n\r\n    <item\r\n        android:id=\"@+id/action_import_settings\"\r\n        android:orderInCategory=\"2\"\r\n        android:title=\"@string/import_settings\"\r\n        app:showAsAction=\"never\" />\r\n\r\n    <item\r\n        android:id=\"@+id/action_reset_settings\"\r\n        android:orderInCategory=\"3\"\r\n        android:title=\"@string/reset_settings\"\r\n        app:showAsAction=\"never\" />\r\n\r\n</menu>\r\n"
  },
  {
    "path": "app/src/main/res/menu/menu_test.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\">\n    <item\n        android:id=\"@+id/action_settings\"\n        android:icon=\"@drawable/baseline_settings_24\"\n        android:title=\"@string/title_settings\"\n        app:showAsAction=\"ifRoom\" />\n</menu>"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@color/icon_color\"/>\n    <foreground android:drawable=\"@mipmap/ic_launcher_foreground\"/>\n    <monochrome android:drawable=\"@drawable/ic_launcher_monochrome\"/>\n</adaptive-icon>"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@color/icon_color\"/>\n    <foreground android:drawable=\"@mipmap/ic_launcher_foreground\"/>\n    <monochrome android:drawable=\"@drawable/ic_launcher_monochrome\"/>\n</adaptive-icon>"
  },
  {
    "path": "app/src/main/res/values/arrays.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <array name=\"languages\">\n        <item name=\"system\">Автоматически</item>\n        <item name=\"ru\">Русский</item>\n        <item name=\"en\">English</item>\n        <item name=\"tr\">Türkçe</item>\n        <item name=\"kk\">Қазақша</item>\n        <item name=\"vi\">Tiếng Việt</item>\n    </array>\n    <array name=\"languages_entries\">\n        <item name=\"system\">system</item>\n        <item name=\"ru\">ru</item>\n        <item name=\"en\">en</item>\n        <item name=\"tr\">tr</item>\n        <item name=\"kk\">kk</item>\n        <item name=\"vi\">vi</item>\n    </array>\n\n    <array name=\"themes\">\n        <item name=\"system\">Системная</item>\n        <item name=\"light\">Светлая</item>\n        <item name=\"dark\">Темная</item>\n    </array>\n    <array name=\"themes_entries\">\n        <item name=\"system\">system</item>\n        <item name=\"light\">light</item>\n        <item name=\"dark\">dark</item>\n    </array>\n\n    <array name=\"byedpi_modes\">\n        <item name=\"vpn\">VPN</item>\n        <item name=\"proxy\">Proxy</item>\n    </array>\n    <array name=\"byedpi_modes_entries\">\n        <item name=\"vpn\">vpn</item>\n        <item name=\"proxy\">proxy</item>\n    </array>\n\n    <array name=\"byedpi_desync_methods\">\n        <item name=\"none\">None</item>\n        <item name=\"split\">Split</item>\n        <item name=\"disorder\">Disorder</item>\n        <item name=\"fake\">Fake</item>\n        <item name=\"oob\">Out-of-band</item>\n        <item name=\"oob\">Disordered out-of-band</item>\n    </array>\n    <array name=\"byedpi_desync_methods_entries\">\n        <item name=\"none\">none</item>\n        <item name=\"split\">split</item>\n        <item name=\"disorder\">disorder</item>\n        <item name=\"fake\">fake</item>\n        <item name=\"oob\">oob</item>\n        <item name=\"oob\">disoob</item>\n    </array>\n\n    <array name=\"byedpi_hosts_modes\">\n        <item name=\"disable\">Нет</item>\n        <item name=\"blacklist\">Черный список</item>\n        <item name=\"whitelist\">Белый список</item>\n    </array>\n    <array name=\"byedpi_hosts_modes_entries\">\n        <item name=\"disable\">disable</item>\n        <item name=\"blacklist\">blacklist</item>\n        <item name=\"whitelist\">whitelist</item>\n    </array>\n\n    <array name=\"applist_types\">\n        <item name=\"disable\">Нет</item>\n        <item name=\"blacklist\">Черный список</item>\n        <item name=\"whitelist\">Белый список</item>\n    </array>\n    <array name=\"applist_types_entries\">\n        <item name=\"disable\">disable</item>\n        <item name=\"blacklist\">blacklist</item>\n        <item name=\"whitelist\">whitelist</item>\n    </array>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"icon_color\">#0B4680</color>\n    <color name=\"green_active\">#4CAF50</color>\n</resources>"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"byedpi_docs\">https://github.com/hufrea/byedpi/blob/main/README.md</string>\n    <string name=\"app_name\">ByeByeDPI</string>\n    <string name=\"cmd_documentation\">Документация ByeDPI</string>\n    <string name=\"toggle_connect\">Вкл/Выкл</string>\n    <string name=\"vpn_connect\">Подключить</string>\n    <string name=\"vpn_disconnect\">Отключить</string>\n    <string name=\"vpn_connected\">Подключено (VPN)</string>\n    <string name=\"vpn_disconnected\">Отключено (VPN)</string>\n    <string name=\"proxy_up\">Подключено (Proxy)</string>\n    <string name=\"proxy_down\">Отключено (Proxy)</string>\n    <string name=\"proxy_start\">Старт</string>\n    <string name=\"proxy_stop\">Стоп</string>\n    <string name=\"service_start_btn\">Старт</string>\n    <string name=\"service_pause_btn\">Пауза</string>\n    <string name=\"service_stop_btn\">Стоп</string>\n    <string name=\"service_paused_text\">Приостановлен</string>\n    <string name=\"open_editor\">Редактор</string>\n    <string name=\"settings\">Настройки</string>\n    <string name=\"vpn_permission_denied\">Нет разрешения на активацию VPN</string>\n    <string name=\"service_restart\">Сервис перезапущен с новыми параметрами</string>\n    <string name=\"settings_unavailable\">Сначала отключитесь, чтобы зайти в настройки</string>\n    <string name=\"title_settings\">Настройки</string>\n    <string name=\"save_logs\">Сохранить логи</string>\n    <string name=\"close_app\">Остановить</string>\n    <string name=\"reset_settings\">Сбросить настройки</string>\n    <string name=\"export_settings\">Экспорт настроек</string>\n    <string name=\"import_settings\">Импорт настроек</string>\n    <string name=\"logs_failed\">Не удалось собрать логи</string>\n    <string name=\"proxy_address\">%1$s:%2$s</string>\n    <string name=\"lang_settings\">Язык</string>\n    <string name=\"theme_settings\">Тема</string>\n    <string name=\"mode_setting\">Режим</string>\n    <string name=\"dbs_ip_setting\">DNS</string>\n    <string name=\"byedpi_version\">ByeDPI</string>\n    <string name=\"bye_dpi_proxy_ip_setting\">Прослушиваемый IP</string>\n    <string name=\"byedpi_proxy_port_setting\">Порт</string>\n    <string name=\"byedpi_http_connect_setting\">HTTP прокси</string>\n    <string name=\"byedpi_http_connect_summary\">ByeDPI будет проксировать HTTPS или любой TCP трафик, кроме HTTP</string>\n    <string name=\"byedpi_max_connections_setting\">Максимальное к-во подключений</string>\n    <string name=\"byedpi_buffer_size_setting\">Размер буфера</string>\n    <string name=\"byedpi_default_ttl_setting\">TTL по умолчанию</string>\n    <string name=\"byedpi_no_domain_setting\">Без домена</string>\n    <string name=\"byedpi_desync_method_setting\">Метод десинхронизации</string>\n    <string name=\"byedpi_split_position_setting\">Позиция разделения</string>\n    <string name=\"byedpi_split_at_host_setting\">Разделить в хосте</string>\n    <string name=\"byedpi_fake_ttl_setting\">TTL поддельных пакетов</string>\n    <string name=\"byedpi_host_mixed_case_setting\">Смешанный регистр хоста</string>\n    <string name=\"byedpi_domain_mixed_case_setting\">Смешанный регистр домена</string>\n    <string name=\"byedpi_host_remove_spaces_setting\">Удалить пробелы из хоста</string>\n    <string name=\"byedpi_tlsrec_enabled_setting\">Разделить TLS запись</string>\n    <string name=\"byedpi_tlsrec_position_setting\">Позиция разделения TLS записи</string>\n    <string name=\"byedpi_tlsrec_at_sni_setting\">Разделить TLS запись в SNI</string>\n    <string name=\"version\">ByeByeDPI</string>\n    <string name=\"source_code_link\">Исходный код</string>\n    <string name=\"byedpi_readme_link\">Что все это значит?</string>\n    <string name=\"failed_to_start\">Не удалось запустить %1$s</string>\n    <string name=\"vpn_channel_name\">VPN</string>\n    <string name=\"proxy_channel_name\">Прокси</string>\n    <string name=\"notification_title\">ByeByeDPI</string>\n    <string name=\"vpn_notification_content\">VPN работает</string>\n    <string name=\"proxy_notification_content\">Прокси работает</string>\n    <string name=\"general_category\">Общие</string>\n    <string name=\"byedpi_category\">ByeDPI</string>\n    <string name=\"about_category\">О программе</string>\n    <string name=\"command_line_editor\">Редактор командной строки</string>\n    <string name=\"ui_editor\">Стандартный редактор</string>\n    <string name=\"use_command_line_settings\">Использовать командную строку</string>\n    <string name=\"desync_http\">Десинхронизация HTTP</string>\n    <string name=\"desync_https\">Десинхронизация HTTPS</string>\n    <string name=\"desync_udp\">Десинхронизация UDP</string>\n    <string name=\"oob_data\">OOB Данные</string>\n    <string name=\"sni_of_fake_packet\">SNI поддельного пакета</string>\n    <string name=\"byedpi_proxy\">Прокси</string>\n    <string name=\"byedpi_desync\">Десинхронизация</string>\n    <string name=\"command_line_arguments\">Аргументы командной строки</string>\n    <string name=\"byedpi_hosts_mode_setting\">Хосты</string>\n    <string name=\"byedpi_hosts_blacklist_setting\">Черный список хостов</string>\n    <string name=\"byedpi_hosts_whitelist_setting\">Белый список хостов</string>\n    <string name=\"byedpi_tcp_fast_open_setting\">TCP Fast Open</string>\n    <string name=\"byedpi_udp_fake_count\">Количество поддельных UDP</string>\n    <string name=\"ipv6_setting\">IPv6</string>\n    <string name=\"byedpi_fake_offset_setting\">Смещение поддельных пакетов</string>\n    <string name=\"byedpi_drop_sack_setting\">Отбрасывать SACK</string>\n    <string name=\"desync_udp_category\">UDP</string>\n    <string name=\"desync_http_category\">HTTP</string>\n    <string name=\"desync_https_category\">HTTPS</string>\n    <string name=\"byedpi_protocols_category\">Протоколы</string>\n    <string name=\"byedpi_protocols_hint\">Снимите все галочки, чтобы десинхронизировать весь трафик</string>\n    <string name=\"automation\">Автоматизация</string>\n    <string name=\"autostart_settings\">Автозапуск приложения при включении устройства</string>\n    <string name=\"autohide_settings\">Автоматически скрывать приложение после автозапуска</string>\n    <string name=\"autoconnect_settings\">Автоматическое подключение при открытии ByeByeDPI</string>\n    <string name=\"applist_setting\">Фильтр приложений</string>\n    <string name=\"apps_select\">Выбрать приложения</string>\n    <string name=\"search_apps\">Поиск приложений</string>\n    <string name=\"storage_access\">Доступ к файлам</string>\n    <string name=\"storage_access_summary\">Предоставьте доступ к хранилищу, если вы хотите использовать файлы в стратегиях</string>\n    <string name=\"storage_access_allowed_summary\">Разрешен</string>\n    <string name=\"cmd_args_clear\">Очистить</string>\n    <string name=\"cmd_args_paste\">Вставить</string>\n    <string name=\"cmd_history_title\">Список стратегий</string>\n    <string name=\"cmd_history_title_summary\">Нажмите для управления историей</string>\n    <string name=\"cmd_history_delete_all\">Очистить историю</string>\n    <string name=\"cmd_history_delete_unpinned\">Удалить незакрепленные</string>\n    <string name=\"cmd_history_menu\">Выберите действие</string>\n    <string name=\"cmd_history_apply\">Применить</string>\n    <string name=\"cmd_history_copy\">Копировать</string>\n    <string name=\"cmd_history_rename\">Переименовать</string>\n    <string name=\"cmd_history_edit\">Редактировать</string>\n    <string name=\"cmd_history_pin\">Закрепить</string>\n    <string name=\"cmd_history_unpin\">Открепить</string>\n    <string name=\"cmd_history_pinned\">Закреплено</string>\n    <string name=\"cmd_history_applied\">Применена</string>\n    <string name=\"cmd_history_delete\">Удалить</string>\n    <string name=\"telegram_link\">Группа Telegram</string>\n    <string name=\"title_test\">Подбор стратегий (Beta)</string>\n    <string name=\"summary_test\">Тестирование работы подготовленных аргументов командной строки</string>\n    <string name=\"test_start\">Начать проверку</string>\n    <string name=\"test_stop\">Остановить проверку</string>\n    <string name=\"test_disclaimer\">\n        Данный раздел предоставляет возможность протестировать работу приложения с помощью набора заранее подготовленных команд.\n        \\nВ процессе тестирования система проверяет доступность различных сайтов через прокси, и вы можете наблюдать за ходом выполнения в режиме реального времени.\n        \\n\n        \\nОбратите внимание, что функционал данного тестирования находится на этапе разработки, и набор команд пока что ограничен.\n        \\nРезультаты тестов могут быть полезны для предварительной оценки работы прокси, однако их успешное прохождение не гарантирует безупречную работу в реальных условиях.\n    </string>\n    <string name=\"test_crash\">\n        Приложение вылетело во время тестирования?\n        \\n\\nПерейдите в настройки теста и увеличивайте время ожидания между проверками шагом в 2 секунды (2, 4, 6..).\n    </string>\n    <string name=\"test_process\">Проверка %1$d/%2$d</string>\n    <string name=\"test_proxy_error\">Ошибка прокси. Тест остановлен</string>\n    <string name=\"test_good_cmds\">Стратегии с наилучшим результатом, применяйте от большего к меньшему</string>\n    <string name=\"test_complete\">Проверка завершена</string>\n    <string name=\"test_complete_info\">Нажмите на стратегию, чтобы скопировать ее или применить</string>\n    <string name=\"test_cmd_connect\">Применить и запустить</string>\n    <string name=\"test_cmd_apply\">Применить без запуска</string>\n    <string name=\"test_cmd_connected\">Подключено</string>\n    <string name=\"toast_copied\">Скопировано</string>\n    <string name=\"test_settings_sni\">SNI фейк пакетов</string>\n    <string name=\"test_settings_fulllog\">Вывод ответа хостов</string>\n    <string name=\"test_settings_logclickable\">Все стратегии кликабельны</string>\n    <string name=\"test_settings_domain_lists\">Списки доменов для проверки</string>\n    <string name=\"test_settings_domain_empty\">Нет доменов для проверки</string>\n    <string name=\"test_settings_domains\">Свой список доменов</string>\n    <string name=\"test_settings_usercommands\">Свой список стратегий</string>\n    <string name=\"test_settings_commands\">Список стратегий</string>\n    <string name=\"test_delay\">Ожидание между проверками</string>\n    <string name=\"test_requests\">Количество запросов к домену</string>\n    <string name=\"test_requests_limit\">Максимум парралельных запросов</string>\n    <string name=\"test_timeout\">Таймаут ответа домена</string>\n    <string name=\"test_show_details\">Показать детали</string>\n    <string name=\"test_hide_details\">Скрыть детали</string>\n    <string name=\"test_expand\">Развернуть</string>\n    <string name=\"battery_optimization\">Оптимизация батареи</string>\n    <string name=\"battery_optimization_summary\">Включите для улучшения стабильности</string>\n    <string name=\"battery_optimization_disabled_summary\">Отключена</string>\n    <string name=\"permission_category\">Разрешения</string>\n    <string name=\"documentation_link\">Документация</string>\n    <string name=\"proxytest_delay_desc\">Увеличение значения повышает стабильность</string>\n    <string name=\"proxytest_requests_desc\">Увеличение значения повышает точность, но может снизить стабильность</string>\n    <string name=\"proxytest_limit_desc\">Увеличение значения ускоряет тест, но может снизить стабильность</string>\n    <string name=\"proxytest_timeout_desc\">Увеличение значения замедляет тест, но повышает стабильность и точность</string>\n    <string name=\"domain_lists\">Списки доменов</string>\n    <string name=\"domain_lists_summary\">Управление списками доменов для тестирования</string>\n    <string name=\"domain_list_add_new\">Добавить список</string>\n    <string name=\"domain_list_add_new_summary\">Создать пользовательский список доменов для тестирования</string>\n    <string name=\"domain_list_edit\">Редактировать</string>\n    <string name=\"domain_list_delete\">Удалить</string>\n    <string name=\"domain_list_name_hint\">Название списка</string>\n    <string name=\"domain_list_domains_hint\">Домены, каждый с новой строки</string>\n    <string name=\"domain_list_summary\">%d доменов</string>\n    <string name=\"domain_list_name_empty\">Название списка не может быть пустым</string>\n    <string name=\"domain_list_domains_empty\">Список доменов не может быть пустым</string>\n    <string name=\"domain_list_already_exists\">Список с таким названием уже существует</string>\n    <string name=\"domain_list_added\">Список доменов добавлен</string>\n    <string name=\"domain_list_updated\">Список доменов обновлен</string>\n    <string name=\"domain_list_update_failed\">Не удалось обновить список доменов</string>\n    <string name=\"domain_list_deleted\">Список доменов удален</string>\n    <string name=\"domain_list_delete_failed\">Не удалось удалить список доменов</string>\n    <string name=\"main_btn_test\">Подбор</string>\n    <string name=\"main_btn_list\">Списки</string>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/themes.xml",
    "content": "<resources>\n    <style name=\"Theme.ByeDPI\" parent=\"Theme.MaterialComponents.DayNight.DarkActionBar\">\n        <item name=\"colorPrimary\">#5976DF</item>\n        <item name=\"colorPrimaryVariant\">#3C52A3</item>\n        <item name=\"colorOnPrimary\">#FFFFFF</item>\n\n        <item name=\"colorSecondary\">#5976DF</item>\n        <item name=\"colorSecondaryVariant\">#3C52A3</item>\n        <item name=\"colorOnSecondary\">#FFFFFF</item>\n\n        <item name=\"android:statusBarColor\">#3C52A3</item>\n\n        <item name=\"colorSurface\">#F5F5F5</item>\n        <item name=\"colorOnSurface\">#212121</item>\n\n        <item name=\"materialCardViewStyle\">@style/SmallShadowCard</item>\n    </style>\n\n    <style name=\"SmallShadowCard\" parent=\"Widget.MaterialComponents.CardView\">\n        <item name=\"cardElevation\">1dp</item>\n    </style>\n\n    <style name=\"CircleButton\" parent=\"Widget.MaterialComponents.Button\">\n        <item name=\"cornerRadius\">60dp</item>\n        <item name=\"android:textSize\">0sp</item>\n        <item name=\"backgroundTint\">?attr/colorPrimary</item>\n        <item name=\"iconTint\">?attr/colorOnPrimary</item>\n    </style>\n\n    <style name=\"CustomAlertDialog\" parent=\"ThemeOverlay.MaterialComponents.Dialog.Alert\">\n        <!-- -->\n    </style>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-en/arrays.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <array name=\"languages\">\n        <item name=\"system\">Auto</item>\n        <item name=\"ru\">Русский</item>\n        <item name=\"en\">English</item>\n        <item name=\"tr\">Türkçe</item>\n        <item name=\"kk\">Қазақша</item>\n        <item name=\"vi\">Tiếng Việt</item>\n    </array>\n\n    <array name=\"themes\">\n        <item name=\"system\">System</item>\n        <item name=\"light\">Light</item>\n        <item name=\"dark\">Dark</item>\n    </array>\n\n    <array name=\"byedpi_hosts_modes\">\n        <item name=\"disable\">Disable</item>\n        <item name=\"blacklist\">Blacklist</item>\n        <item name=\"whitelist\">Whitelist</item>\n    </array>\n\n    <array name=\"applist_types\">\n        <item name=\"disable\">Disable</item>\n        <item name=\"blacklist\">Blacklist</item>\n        <item name=\"whitelist\">Whitelist</item>\n    </array>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-en/strings.xml",
    "content": "<resources>\n    <string name=\"byedpi_docs\">https://github.com/hufrea/byedpi/blob/main/README.md</string>\n    <string name=\"app_name\">ByeByeDPI</string>\n    <string name=\"cmd_documentation\">Documentation</string>\n    <string name=\"toggle_connect\">On/Off</string>\n    <string name=\"vpn_connect\">Connect</string>\n    <string name=\"vpn_disconnect\">Disconnect</string>\n    <string name=\"vpn_connected\">Connected (VPN)</string>\n    <string name=\"vpn_disconnected\">Disconnected (VPN)</string>\n    <string name=\"proxy_up\">Connected (Proxy)</string>\n    <string name=\"proxy_down\">Disconnected (Proxy)</string>\n    <string name=\"proxy_start\">Start</string>\n    <string name=\"proxy_stop\">Stop</string>\n    <string name=\"service_start_btn\">Start</string>\n    <string name=\"service_pause_btn\">Pause</string>\n    <string name=\"service_stop_btn\">Stop</string>\n    <string name=\"service_paused_text\">Service paused</string>\n    <string name=\"open_editor\">Editor</string>\n    <string name=\"settings\">Settings</string>\n    <string name=\"vpn_permission_denied\">No permission to activate VPN</string>\n    <string name=\"service_restart\">Service restarted with new parameters</string>\n    <string name=\"settings_unavailable\">Disconnect first to access settings</string>\n    <string name=\"title_settings\">Settings</string>\n    <string name=\"save_logs\">Save logs</string>\n    <string name=\"close_app\">Force close</string>\n    <string name=\"reset_settings\">Reset settings</string>\n    <string name=\"export_settings\">Export settings</string>\n    <string name=\"import_settings\">Import settings</string>\n    <string name=\"logs_failed\">Failed to collect logs</string>\n    <string name=\"proxy_address\">%1$s:%2$s</string>\n    <string name=\"lang_settings\">Language</string>\n    <string name=\"theme_settings\">Theme</string>\n    <string name=\"mode_setting\">Mode</string>\n    <string name=\"dbs_ip_setting\">DNS</string>\n    <string name=\"byedpi_version\">ByeDPI</string>\n    <string name=\"bye_dpi_proxy_ip_setting\">Listening IP</string>\n    <string name=\"byedpi_proxy_port_setting\">Port</string>\n    <string name=\"byedpi_http_connect_setting\">HTTP proxy</string>\n    <string name=\"byedpi_http_connect_summary\">ByeDPI will proxy HTTPS or any TCP traffic except HTTP</string>\n    <string name=\"byedpi_max_connections_setting\">Max connections</string>\n    <string name=\"byedpi_buffer_size_setting\">Buffer size</string>\n    <string name=\"byedpi_default_ttl_setting\">Default TTL</string>\n    <string name=\"byedpi_no_domain_setting\">No domain</string>\n    <string name=\"byedpi_desync_method_setting\">Desync method</string>\n    <string name=\"byedpi_split_position_setting\">Split position</string>\n    <string name=\"byedpi_split_at_host_setting\">Split at host</string>\n    <string name=\"byedpi_fake_ttl_setting\">TTL of fake packets</string>\n    <string name=\"byedpi_host_mixed_case_setting\">Host mixed case</string>\n    <string name=\"byedpi_domain_mixed_case_setting\">Domain mixed case</string>\n    <string name=\"byedpi_host_remove_spaces_setting\">Remove spaces from host</string>\n    <string name=\"byedpi_tlsrec_enabled_setting\">Split TLS record</string>\n    <string name=\"byedpi_tlsrec_position_setting\">TLS record split position</string>\n    <string name=\"byedpi_tlsrec_at_sni_setting\">Split TLS record at SNI</string>\n    <string name=\"version\">ByeByeDPI</string>\n    <string name=\"source_code_link\">Source code</string>\n    <string name=\"byedpi_readme_link\">What does it all mean?</string>\n    <string name=\"failed_to_start\">Failed to start %1$s</string>\n    <string name=\"vpn_channel_name\">VPN</string>\n    <string name=\"proxy_channel_name\">Proxy</string>\n    <string name=\"notification_title\">ByeByeDPI</string>\n    <string name=\"vpn_notification_content\">VPN is running</string>\n    <string name=\"proxy_notification_content\">Proxy is running</string>\n    <string name=\"general_category\">General</string>\n    <string name=\"byedpi_category\">ByeDPI</string>\n    <string name=\"about_category\">About</string>\n    <string name=\"command_line_editor\">Command line editor</string>\n    <string name=\"ui_editor\">UI editor</string>\n    <string name=\"use_command_line_settings\">Use command line settings</string>\n    <string name=\"desync_http\">HTTP desync</string>\n    <string name=\"desync_https\">HTTPS desync</string>\n    <string name=\"desync_udp\">UDP desync</string>\n    <string name=\"oob_data\">OOB Data</string>\n    <string name=\"sni_of_fake_packet\">SNI of fake packet</string>\n    <string name=\"byedpi_proxy\">Proxy</string>\n    <string name=\"byedpi_desync\">Desync</string>\n    <string name=\"command_line_arguments\">Command line arguments</string>\n    <string name=\"byedpi_hosts_mode_setting\">Hosts</string>\n    <string name=\"byedpi_hosts_blacklist_setting\">Host blacklist</string>\n    <string name=\"byedpi_hosts_whitelist_setting\">Host whitelist</string>\n    <string name=\"byedpi_tcp_fast_open_setting\">TCP Fast Open</string>\n    <string name=\"byedpi_udp_fake_count\">Number of fake UDP</string>\n    <string name=\"ipv6_setting\">IPv6</string>\n    <string name=\"byedpi_fake_offset_setting\">Fake packet offset</string>\n    <string name=\"byedpi_drop_sack_setting\">Drop SACK</string>\n    <string name=\"desync_udp_category\">UDP</string>\n    <string name=\"desync_http_category\">HTTP</string>\n    <string name=\"desync_https_category\">HTTPS</string>\n    <string name=\"byedpi_protocols_category\">Protocols</string>\n    <string name=\"byedpi_protocols_hint\">Uncheck all to desync all traffic</string>\n    <string name=\"automation\">Automation</string>\n    <string name=\"autostart_settings\">Autostart service on device startup</string>\n    <string name=\"autohide_settings\">Automatically hide application after autostart</string>\n    <string name=\"autoconnect_settings\">Automatically connect when the ByeByeDPI start</string>\n    <string name=\"applist_setting\">Apps filter</string>\n    <string name=\"apps_select\">Select apps</string>\n    <string name=\"search_apps\">Search apps</string>\n    <string name=\"storage_access\">Storage access</string>\n    <string name=\"storage_access_summary\">If you want to use file arguments in strategies, provide access to the storage</string>\n    <string name=\"storage_access_allowed_summary\">Allowed</string>\n    <string name=\"cmd_args_clear\">Clear</string>\n    <string name=\"cmd_args_paste\">Paste</string>\n    <string name=\"cmd_history_title\">Command history</string>\n    <string name=\"cmd_history_title_summary\">Tap to manage history</string>\n    <string name=\"cmd_history_delete_all\">Delete all history</string>\n    <string name=\"cmd_history_delete_unpinned\">Delete unpinned</string>\n    <string name=\"cmd_history_menu\">Select action</string>\n    <string name=\"cmd_history_apply\">Apply</string>\n    <string name=\"cmd_history_copy\">Copy</string>\n    <string name=\"cmd_history_rename\">Rename</string>\n    <string name=\"cmd_history_edit\">Edit</string>\n    <string name=\"cmd_history_pin\">Pin</string>\n    <string name=\"cmd_history_unpin\">Unpin</string>\n    <string name=\"cmd_history_pinned\">Pinned</string>\n    <string name=\"cmd_history_applied\">Applied</string>\n    <string name=\"cmd_history_delete\">Delete</string>\n    <string name=\"telegram_link\">Telegram group</string>\n    <string name=\"title_test\">Proxy test (Beta)</string>\n    <string name=\"summary_test\">Testing of prepared command sets</string>\n    <string name=\"test_start\">Start testing</string>\n    <string name=\"test_stop\">Stop testing</string>\n    <string name=\"test_disclaimer\">\n        This section allows you to test the application using a set of pre-prepared commands.\n        \\nDuring testing, the system checks the availability of various websites via the proxy, and you can observe the process in real time.\n        \\n\n        \\nPlease note that this testing functionality is under development, and the command set is currently limited.\n        \\nTest results may be helpful for a preliminary assessment of the proxy, but successful completion does not guarantee flawless performance in real-world conditions.\n    </string>\n    <string name=\"test_crash\">\n        Did the application crash during testing?\n        \\n\\nGo to the test settings and increase the waiting time between commands in 2-second increments (2, 4, 6..).\n    </string>\n    <string name=\"test_process\">Checking %1$d/%2$d</string>\n    <string name=\"test_proxy_error\">Proxy error. Test stopped</string>\n    <string name=\"test_good_cmds\">Commands with more than 50% success probability</string>\n    <string name=\"test_complete\">Test completed</string>\n    <string name=\"test_complete_info\">Tap on a command to copy or apply it</string>\n    <string name=\"test_cmd_connect\">Apply and run</string>\n    <string name=\"test_cmd_apply\">Apply without run</string>\n    <string name=\"test_cmd_connected\">Connected</string>\n    <string name=\"toast_copied\">Сopied</string>\n    <string name=\"test_settings_sni\">SNI fake packets</string>\n    <string name=\"test_settings_fulllog\">Host response output</string>\n    <string name=\"test_settings_logclickable\">All commands are clickable</string>\n    <string name=\"test_settings_domain_lists\">Domain lists for testing</string>\n    <string name=\"test_settings_domain_empty\">No domains to test</string>\n    <string name=\"test_settings_domains\">Your list of domains</string>\n    <string name=\"test_settings_usercommands\">Сustom command lists</string>\n    <string name=\"test_settings_commands\">Command list</string>\n    <string name=\"test_delay\">Delay between commands</string>\n    <string name=\"test_requests\">Number of domain requests</string>\n    <string name=\"test_requests_limit\">Maximum parallel requests</string>\n    <string name=\"test_timeout\">Domain response timeout</string>\n    <string name=\"test_show_details\">Show details</string>\n    <string name=\"test_hide_details\">Hide details</string>\n    <string name=\"test_expand\">Expand</string>\n    <string name=\"battery_optimization\">Battery optimization</string>\n    <string name=\"battery_optimization_summary\">Turn it on to improve stability</string>\n    <string name=\"battery_optimization_disabled_summary\">Disabled</string>\n    <string name=\"permission_category\">Permissions</string>\n    <string name=\"documentation_link\">Documentation</string>\n    <string name=\"proxytest_delay_desc\">A higher number may increase stability</string>\n    <string name=\"proxytest_requests_desc\">A higher number increases accuracy but may reduce stability</string>\n    <string name=\"proxytest_limit_desc\">A higher number increases test speed but may reduce stability</string>\n    <string name=\"proxytest_timeout_desc\">A higher number reduces test speed but improves stability</string>\n    <string name=\"domain_lists\">Domain Lists</string>\n    <string name=\"domain_lists_summary\">Managing domain lists for testing</string>\n    <string name=\"domain_list_add_new\">Add new list</string>\n    <string name=\"domain_list_add_new_summary\">Create a custom list of domains for testing</string>\n    <string name=\"domain_list_edit\">Edit</string>\n    <string name=\"domain_list_delete\">Delete</string>\n    <string name=\"domain_list_name_hint\">List name</string>\n    <string name=\"domain_list_domains_hint\">Domains (one per line)</string>\n    <string name=\"domain_list_summary\">%d domains</string>\n    <string name=\"domain_list_name_empty\">List name cannot be empty</string>\n    <string name=\"domain_list_domains_empty\">Domain list cannot be empty</string>\n    <string name=\"domain_list_already_exists\">A list with this name already exists</string>\n    <string name=\"domain_list_added\">Domain list added</string>\n    <string name=\"domain_list_updated\">Domain list updated</string>\n    <string name=\"domain_list_update_failed\">Failed to update domain list</string>\n    <string name=\"domain_list_deleted\">Domain list deleted</string>\n    <string name=\"domain_list_delete_failed\">Failed to delete domain list</string>\n    <string name=\"main_btn_test\">Test</string>\n    <string name=\"main_btn_list\">Lists</string>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-kk/arrays.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <array name=\"languages\">\n        <item name=\"system\">Автоматты</item>\n        <item name=\"ru\">Орыс</item>\n        <item name=\"en\">Ағылшын</item>\n        <item name=\"tr\">Түрік</item>\n        <item name=\"kk\">Қазақша</item>\n        <item name=\"vi\">Tiếng Việt</item>\n    </array>\n\n    <array name=\"themes\">\n        <item name=\"system\">Жүйе</item>\n        <item name=\"light\">Жарық</item>\n        <item name=\"dark\">Қараңғы</item>\n    </array>\n\n    <array name=\"byedpi_hosts_modes\">\n        <item name=\"disable\">Өшіру</item>\n        <item name=\"blacklist\">Қара тізім</item>\n        <item name=\"whitelist\">Ақ тізім</item>\n    </array>\n\n    <array name=\"applist_types\">\n        <item name=\"disable\">Өшіру</item>\n        <item name=\"blacklist\">Қара тізім</item>\n        <item name=\"whitelist\">Ақ тізім</item>\n    </array>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-kk/strings.xml",
    "content": "<resources>\n    <string name=\"byedpi_docs\">https://github.com/hufrea/byedpi/blob/main/README.md</string>\n    <string name=\"app_name\">ByeByeDPI</string>\n    <string name=\"cmd_documentation\">ByeDPI документациясы</string>\n    <string name=\"toggle_connect\">Қосу/Сөнд</string>\n    <string name=\"vpn_connect\">Қосылу</string>\n    <string name=\"vpn_disconnect\">Сөндіру</string>\n    <string name=\"vpn_connected\">Қосулы (VPN)</string>\n    <string name=\"vpn_disconnected\">Сөндірулі (VPN)</string>\n    <string name=\"proxy_up\">Қосулы (Proxy)</string>\n    <string name=\"proxy_down\">Сөндірулі (Proxy)</string>\n    <string name=\"proxy_start\">Старт</string>\n    <string name=\"proxy_stop\">Стоп</string>\n    <string name=\"service_start_btn\">Бастау</string>\n    <string name=\"service_pause_btn\">Кідірту</string>\n    <string name=\"service_stop_btn\">Тоқтату</string>\n    <string name=\"service_paused_text\">Қызмет кідіртілді</string>\n    <string name=\"open_editor\">Редакторды</string>\n    <string name=\"settings\">Баптаулар</string>\n    <string name=\"vpn_permission_denied\">VPN-ды активациялауға рұқсат жоқ</string>\n    <string name=\"service_restart\">Қызмет жаңа параметрлермен қайта іске қосылды</string>\n    <string name=\"settings_unavailable\">Баптауға өту үшін ең алдымен сөндірңіз</string>\n    <string name=\"title_settings\">Баптаулар</string>\n    <string name=\"save_logs\">Логтарды сақтау</string>\n    <string name=\"close_app\">Тоқтату</string>\n    <string name=\"reset_settings\">Қалпына келтіру</string>\n    <string name=\"export_settings\">Баптауларды экспорттау</string>\n    <string name=\"import_settings\">Баптауларды импорттау</string>\n    <string name=\"logs_failed\">Логтарды жинау мүмкін болмады</string>\n    <string name=\"proxy_address\">%1$s:%2$s</string>\n    <string name=\"lang_settings\">Тіл</string>\n    <string name=\"theme_settings\">Тема</string>\n    <string name=\"mode_setting\">Режим</string>\n    <string name=\"dbs_ip_setting\">DNS</string>\n    <string name=\"byedpi_version\">ByeDPI</string>\n    <string name=\"bye_dpi_proxy_ip_setting\">Тыңдалатын IP</string>\n    <string name=\"byedpi_proxy_port_setting\">Порт</string>\n    <string name=\"byedpi_http_connect_setting\">HTTP прокси</string>\n    <string name=\"byedpi_http_connect_summary\">ByeDPI HTTP-дан басқа HTTPS немесе кез келген TCP трафикты проксилайды</string>\n    <string name=\"byedpi_max_connections_setting\">Максималды қосылымдар саны</string>\n    <string name=\"byedpi_buffer_size_setting\">Буфер өлшемі</string>\n    <string name=\"byedpi_default_ttl_setting\">TTL әдепкі мәні</string>\n    <string name=\"byedpi_no_domain_setting\">Доменсіз</string>\n    <string name=\"byedpi_desync_method_setting\">Десинхронизация әдісі</string>\n    <string name=\"byedpi_split_position_setting\">Бөлу нүктесі</string>\n    <string name=\"byedpi_split_at_host_setting\">Хостта бөлу</string>\n    <string name=\"byedpi_fake_ttl_setting\">Жалған пакеттердің TTL мәні</string>\n    <string name=\"byedpi_host_mixed_case_setting\">Араласқан хост регистрі</string>\n    <string name=\"byedpi_domain_mixed_case_setting\">Араласқан домен регистрі</string>\n    <string name=\"byedpi_host_remove_spaces_setting\">Хосттағы бос орындарды жою</string>\n    <string name=\"byedpi_tlsrec_enabled_setting\">TLS жазбаны бөлу</string>\n    <string name=\"byedpi_tlsrec_position_setting\">TLS жазбану бөлу позициясы</string>\n    <string name=\"byedpi_tlsrec_at_sni_setting\">SNI ішіндегі TLS жазбасын бөлу</string>\n    <string name=\"version\">ByeByeDPI</string>\n    <string name=\"source_code_link\">Бастапқы код</string>\n    <string name=\"byedpi_readme_link\">Мұның бәрі нені білдіреді?</string>\n    <string name=\"failed_to_start\">%1$s іске қосу сәтсіз аяқталды</string>\n    <string name=\"vpn_channel_name\">VPN</string>\n    <string name=\"proxy_channel_name\">Прокси</string>\n    <string name=\"notification_title\">ByeByeDPI</string>\n    <string name=\"vpn_notification_content\">VPN жұмыс істеуде</string>\n    <string name=\"proxy_notification_content\">Прокси жұмыс істеуде</string>\n    <string name=\"general_category\">Жалпы</string>\n    <string name=\"byedpi_category\">ByeDPI</string>\n    <string name=\"about_category\">Бағдарлама туралы</string>\n    <string name=\"command_line_editor\">Командалық жол редакторы</string>\n    <string name=\"ui_editor\">Стандартты редактор</string>\n    <string name=\"use_command_line_settings\">Командалық жол редакторын қолдану</string>\n    <string name=\"desync_http\">Десинхронизация HTTP</string>\n    <string name=\"desync_https\">Десинхронизация HTTPS</string>\n    <string name=\"desync_udp\">Десинхронизация UDP</string>\n    <string name=\"oob_data\">OOB Деректері</string>\n    <string name=\"sni_of_fake_packet\">Жалған пакет SNI-і</string>\n    <string name=\"byedpi_proxy\">Прокси</string>\n    <string name=\"byedpi_desync\">Десинхронизация</string>\n    <string name=\"command_line_arguments\">Командалық жол аргументтері</string>\n    <string name=\"byedpi_hosts_mode_setting\">Хосттар</string>\n    <string name=\"byedpi_hosts_blacklist_setting\">Хосттардың қара тізімі</string>\n    <string name=\"byedpi_hosts_whitelist_setting\">Хосттардың ақ тізімі</string>\n    <string name=\"byedpi_tcp_fast_open_setting\">TCP Fast Open</string>\n    <string name=\"byedpi_udp_fake_count\">Жалған UDP саны</string>\n    <string name=\"ipv6_setting\">IPv6</string>\n    <string name=\"byedpi_fake_offset_setting\">Жалған пакеттердің ығысуы</string>\n    <string name=\"byedpi_drop_sack_setting\">SACK хабарларын қабылдамай тастау</string>\n    <string name=\"desync_udp_category\">UDP</string>\n    <string name=\"desync_http_category\">HTTP</string>\n    <string name=\"desync_https_category\">HTTPS</string>\n    <string name=\"byedpi_protocols_category\">Протоколдар</string>\n    <string name=\"byedpi_protocols_hint\">Барлық трафикті десинхронизациялау үшін таңдалған ұяшықтарды алып тастаңыз</string>\n    <string name=\"automation\">Автоматизация</string>\n    <string name=\"autostart_settings\">Құрылғы қосылғанда қолданбаны автоіске қосу</string>\n    <string name=\"autohide_settings\">Автоіске қосылғаннан кейін қолданбаны автоматты түрде жасыру</string>\n    <string name=\"autoconnect_settings\">ByeByeDPI ашылғанда автоматты түрде қосылу</string>\n    <string name=\"applist_setting\">Қолданбалар фильтрі</string>\n    <string name=\"apps_select\">Қолданбаларды таңдау</string>\n    <string name=\"search_apps\">Қолданбаларды іздеу</string>\n    <string name=\"storage_access\">Файлдарға қолжетімділік</string>\n    <string name=\"storage_access_summary\">Стратегияларда файлдарды пайдалану үшін қойманы қолжетімді етіңіз</string>\n    <string name=\"storage_access_allowed_summary\">Рұқсат етілген</string>\n    <string name=\"cmd_args_clear\">Тазалау</string>\n    <string name=\"cmd_args_paste\">Қою</string>\n    <string name=\"cmd_history_title\">Стратегия тізімі</string>\n    <string name=\"cmd_history_title_summary\">Тарихты басқару үшін басыңыз</string>\n    <string name=\"cmd_history_delete_all\">Тарихты тазалау</string>\n    <string name=\"cmd_history_delete_unpinned\">Бекітілмегендерді өшіру</string>\n    <string name=\"cmd_history_menu\">Әрекетті таңдаңыз</string>\n    <string name=\"cmd_history_apply\">Қолдану</string>\n    <string name=\"cmd_history_copy\">Көшіру</string>\n    <string name=\"cmd_history_rename\">Атын өзгерту</string>\n    <string name=\"cmd_history_edit\">Өңдеу</string>\n    <string name=\"cmd_history_pin\">Бекіту</string>\n    <string name=\"cmd_history_unpin\">Бекітуді алып тастау</string>\n    <string name=\"cmd_history_pinned\">Бекітілді</string>\n    <string name=\"cmd_history_applied\">Қолданылды</string>\n    <string name=\"cmd_history_delete\">Өшіру</string>\n    <string name=\"telegram_link\">Telegram группа</string>\n    <string name=\"title_test\">Стратегияларды таңдау (Beta)</string>\n    <string name=\"summary_test\">Командалық жолға дайындалған аргументтердің жұмысын тестілеу</string>\n    <string name=\"test_start\">Тексеруді бастау</string>\n    <string name=\"test_stop\">Тексеруді тоқтату</string>\n    <string name=\"test_disclaimer\">\n            Бұл бөлім алдын ала дайындалған командалар жинағы арқылы қолданбаның жұмысын тестілеуге мүмкіндік береді.\n            \\nТестілеу барысында жүйе әртүрлі сайттардың прокси арқылы қолжетімділігін тексереді, ал сіз процесті нақты уақыт режимінде бақылай аласыз.\n            \\n\n            \\nНазар аударыңыз: бұл тестілеу функционалы әзірлеу кезеңінде, сондықтан командалар жинағы әзірге шектеулі.\n            \\nТест нәтижелері проксидің жұмысын алдын ала бағалауға пайдалы болуы мүмкін, алайда олардың сәтті өтуі нақты жағдайда мінсіз жұмысқа кепілдік бермейді.\n    </string>\n    <string name=\"test_crash\">\n            Қолданба тестілеу кезінде жабылып қалды ма?\n            \\n\\nТест баптауларына өтіп, тексерулер арасындағы күту уақытын 2 секундтан қосып көбейтіңіз (2, 4, 6…).\n    </string>\n    <string name=\"test_process\">Тексеру %1$d/%2$d</string>\n    <string name=\"test_proxy_error\">Прокси қатесі. Тест тоқтатылды</string>\n    <string name=\"test_good_cmds\">Ең жақсы нәтиже берген стратегиялар, оларды үлкеннен кішісіне қарай қолданыңыз</string>\n    <string name=\"test_complete\">Тексеру аяқталды</string>\n    <string name=\"test_complete_info\">Стратегияны көшіру немесе қолдану үшін оны басыңыз</string>\n    <string name=\"test_cmd_connect\">Қолдану және іске қосу</string>\n    <string name=\"test_cmd_apply\">Іске қоспай қолдану</string>\n    <string name=\"test_cmd_connected\">Қосылу</string>\n    <string name=\"toast_copied\">Нәтиже көшірілген</string>\n    <string name=\"test_settings_sni\">SNI жалған пакеттері</string>\n    <string name=\"test_settings_fulllog\">Хосттар жауабын шығару</string>\n    <string name=\"test_settings_logclickable\">Барлық стратегиялар кликабельді</string>\n    <string name=\"test_settings_domain_lists\">Тексеруге арналған домен тізімдері</string>\n    <string name=\"test_settings_domain_empty\">Тексеруге арналған домендер жоқ</string>\n    <string name=\"test_settings_domains\">Өз домендер тізімі</string>\n    <string name=\"test_settings_usercommands\">Өз стратегиялар тізімі</string>\n    <string name=\"test_settings_commands\">Стратегиялар тізімі</string>\n    <string name=\"test_delay\">Тексерулер арасындағы күту уақыты</string>\n    <string name=\"test_requests\">Доменге сұраныстар саны</string>\n    <string name=\"test_requests_limit\">Параллель сұраныстардың ең көп саны</string>\n    <string name=\"test_timeout\">Домен жауабының таймауты</string>\n    <string name=\"test_show_details\">Мәліметтерді көрсету</string>\n    <string name=\"test_hide_details\">Мәліметтерді жасыру</string>\n    <string name=\"test_expand\">Кеңейту</string>\n    <string name=\"battery_optimization\">Батареяны оңтайландыру</string>\n    <string name=\"battery_optimization_summary\">Тұрақтылықты жақсарту үшін қосыңыз</string>\n    <string name=\"battery_optimization_disabled_summary\">Ажыратылған</string>\n    <string name=\"permission_category\">Рұқсаттар</string>\n    <string name=\"documentation_link\">Құжаттама</string>\n    <string name=\"proxytest_delay_desc\">Үлкен мән тұрақтылықты арттыра алады</string>\n    <string name=\"proxytest_requests_desc\">Үлкен мән дәлдікті арттырады, бірақ тұрақтылықты төмендетуі мүмкін</string>\n    <string name=\"proxytest_limit_desc\">Үлкен мән тесттің жылдамдығын арттырады, бірақ тұрақтылықты төмендетуі мүмкін</string>\n    <string name=\"proxytest_timeout_desc\">Үлкен мән тесттің жылдамдығын азайтады, бірақ тұрақтылықты арттырады</string>\n    <string name=\"domain_lists\">Домендер тізімдері</string>\n    <string name=\"domain_lists_summary\">Тестілеу үшін домендер тізімдерін қосыңыз, өңдеңіз немесе жойыңыз</string>\n    <string name=\"domain_list_add_new\">Жаңа тізім қосу</string>\n    <string name=\"domain_list_add_new_summary\">Тестілеу үшін арнайы домендер тізімін жасаңыз</string>\n    <string name=\"domain_list_edit\">Өңдеу</string>\n    <string name=\"domain_list_delete\">Жою</string>\n    <string name=\"domain_list_name_hint\">Тізім атауы</string>\n    <string name=\"domain_list_domains_hint\">Домендер (әр жолда біреуден)</string>\n    <string name=\"domain_list_summary\">%d домен</string>\n    <string name=\"domain_list_name_empty\">Тізім атауы бос болмауы керек</string>\n    <string name=\"domain_list_domains_empty\">Домендер тізімі бос болмауы керек</string>\n    <string name=\"domain_list_already_exists\">Осы атаумен тізім әлдеқашан бар</string>\n    <string name=\"domain_list_added\">Домендер тізімі қосылды</string>\n    <string name=\"domain_list_updated\">Домендер тізімі жаңартылды</string>\n    <string name=\"domain_list_update_failed\">Домендер тізімін жаңарту мүмкін болмады</string>\n    <string name=\"domain_list_deleted\">Домендер тізімі жойылды</string>\n    <string name=\"domain_list_delete_failed\">Домендер тізімін жою мүмкін болмады</string>\n    <string name=\"main_btn_test\">Тест</string>\n    <string name=\"main_btn_list\">Тізімдер</string>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-night/themes.xml",
    "content": "<resources>\n    <style name=\"Theme.ByeDPI\" parent=\"Theme.MaterialComponents.DayNight.DarkActionBar\">\n        <item name=\"colorPrimary\">#FFFFFF</item>\n        <item name=\"colorPrimaryVariant\">#E5E5E5</item>\n        <item name=\"colorOnPrimary\">#000000</item>\n\n        <item name=\"colorSecondary\">#5976DF</item>\n        <item name=\"colorSecondaryVariant\">#3C52A3</item>\n        <item name=\"colorOnSecondary\">#FFFFFF</item>\n\n        <item name=\"android:statusBarColor\">#000000</item>\n        <item name=\"materialCardViewStyle\">@style/SmallShadowCard</item>\n    </style>\n\n    <style name=\"CircleButton\" parent=\"Widget.MaterialComponents.Button\">\n        <item name=\"cornerRadius\">60dp</item>\n        <item name=\"android:textSize\">0sp</item>\n        <item name=\"backgroundTint\">?attr/colorPrimary</item>\n        <item name=\"iconTint\">?attr/colorOnPrimary</item>\n    </style>\n\n    <style name=\"CustomAlertDialog\" parent=\"ThemeOverlay.MaterialComponents.Dialog.Alert\">\n        <!-- -->\n    </style>\n</resources>"
  },
  {
    "path": "app/src/main/res/values-night-v31/themes.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <style name=\"Theme.ByeDPI\" parent=\"Theme.Material3.DynamicColors.DayNight\">\n        <item name=\"android:navigationBarColor\">?attr/colorSurface</item>\n        <item name=\"android:statusBarColor\">?attr/colorSurfaceContainer</item>\n\n        <item name=\"actionBarStyle\">@style/ActionBarTheme</item>\n        <item name=\"actionBarTheme\">@style/ActionBarTextTheme</item>\n\n        <item name=\"android:windowLightStatusBar\">false</item>\n        <item name=\"android:windowLightNavigationBar\">false</item>\n\n        <item name=\"colorControlActivated\">?attr/colorPrimary</item>\n        <item name=\"colorControlHighlight\">?attr/colorSecondaryContainer</item>\n\n        <item name=\"alertDialogTheme\">@style/CustomAlertDialog</item>\n\n        <item name=\"android:textAppearanceListItem\">@style/TextPrimary</item>\n        <item name=\"android:textAppearanceListItemSecondary\">@style/TextSummary</item>\n        <item name=\"android:textAppearanceListItemSmall\">@style/TextSummary</item>\n\n        <item name=\"switchPreferenceStyle\">@style/App.Preference.SwitchPreference</item>\n        <item name=\"materialCardViewStyle\">@style/SmallShadowCard</item>\n    </style>\n\n    <style name=\"CircleButton\" parent=\"Widget.Material3.Button.Icon\">\n        <item name=\"cornerRadius\">60dp</item>\n        <item name=\"android:textSize\">0sp</item>\n    </style>\n\n    <style name=\"App.Preference.SwitchPreference\" parent=\"Preference.SwitchPreference.Material\">\n        <item name=\"android:widgetLayout\">@layout/material_switch</item>\n    </style>\n\n    <style name=\"ActionBarTheme\" parent=\"Widget.AppCompat.ActionBar.Solid\">\n        <item name=\"background\">?attr/colorSurfaceContainer</item>\n        <item name=\"elevation\">0dp</item>\n    </style>\n\n    <style name=\"ActionBarTextTheme\" parent=\"ThemeOverlay.Material3.ActionBar\">\n        <item name=\"android:textColorPrimary\">?attr/colorOnSurface</item>\n        <item name=\"android:textColorSecondary\">?attr/colorOnSurfaceVariant</item>\n    </style>\n\n    <style name=\"CustomAlertDialog\" parent=\"ThemeOverlay.Material3.MaterialAlertDialog\">\n        <item name=\"android:windowBackground\">@drawable/material_alert</item>\n        <item name=\"android:textColorPrimary\">?attr/colorOnSurface</item>\n        <item name=\"android:textColorSecondary\">?attr/colorOnSurfaceVariant</item>\n    </style>\n\n    <style name=\"TextPrimary\" parent=\"TextAppearance.AppCompat.Title\">\n        <item name=\"android:textSize\">14sp</item>\n    </style>\n\n    <style name=\"TextSummary\" parent=\"TextAppearance.AppCompat.Subhead\">\n        <item name=\"android:textSize\">14sp</item>\n    </style>\n</resources>"
  },
  {
    "path": "app/src/main/res/values-tr/arrays.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <array name=\"languages\">\n        <item name=\"system\">Otomatik</item>\n        <item name=\"ru\">Русский</item>\n        <item name=\"en\">English</item>\n        <item name=\"tr\">Türkçe</item>\n        <item name=\"kk\">Қазақша</item>\n        <item name=\"vi\">Tiếng Việt</item>\n    </array>\n\n    <array name=\"themes\">\n        <item name=\"system\">Sistem</item>\n        <item name=\"light\">Açık</item>\n        <item name=\"dark\">Karanlık</item>\n    </array>\n\n    <array name=\"byedpi_hosts_modes\">\n        <item name=\"disable\">Kapalı</item>\n        <item name=\"blacklist\">Karaliste</item>\n        <item name=\"whitelist\">Beyazliste</item>\n    </array>\n\n    <array name=\"applist_types\">\n        <item name=\"disable\">Kapalı</item>\n        <item name=\"blacklist\">Karaliste</item>\n        <item name=\"whitelist\">Beyazliste</item>\n    </array>\n</resources>"
  },
  {
    "path": "app/src/main/res/values-tr/strings.xml",
    "content": "<resources>\n    <string name=\"byedpi_docs\">https://github.com/hufrea/byedpi/blob/main/README.md</string>\n    <string name=\"app_name\">ByeByeDPI</string>\n    <string name=\"cmd_documentation\">Dökümantasyon</string>\n    <string name=\"toggle_connect\">Aç/Kapa</string>\n    <string name=\"vpn_connect\">Bağlan</string>\n    <string name=\"vpn_disconnect\">Bağlantıyı Kes</string>\n    <string name=\"vpn_connected\">Bağlandı (VPN)</string>\n    <string name=\"vpn_disconnected\">Bağlantı Kesildi (VPN)</string>\n    <string name=\"proxy_up\">Bağlandı (Proxy)</string>\n    <string name=\"proxy_down\">Bağlantı Kesildi (Proxy)</string>\n    <string name=\"proxy_start\">Başlat</string>\n    <string name=\"proxy_stop\">Durdur</string>\n    <string name=\"service_start_btn\">Başlat</string>\n    <string name=\"service_pause_btn\">Duraklat</string>\n    <string name=\"service_stop_btn\">Durdur</string>\n    <string name=\"service_paused_text\">Hizmet duraklatıldı</string>\n    <string name=\"open_editor\">Editör</string>\n    <string name=\"settings\">Ayarlar</string>\n    <string name=\"vpn_permission_denied\">VPN açma yetkisi yok.</string>\n    <string name=\"service_restart\">Servis yeni parametrelerle yeniden başlatıldı</string>\n    <string name=\"settings_unavailable\">Ayarları açmak için bağlantıyı kesin</string>\n    <string name=\"title_settings\">Ayarlar</string>\n    <string name=\"save_logs\">Günlükleri kaydet</string>\n    <string name=\"close_app\">Zorla Durdur</string>\n    <string name=\"reset_settings\">Ayarları sıfırla</string>\n    <string name=\"export_settings\">Ayarları Dışa Aktar</string>\n    <string name=\"import_settings\">Ayarları İçe Aktar</string>\n    <string name=\"logs_failed\">Günlükleri toplarken bir hata oluştu</string>\n    <string name=\"proxy_address\">%1$s:%2$s</string>\n    <string name=\"lang_settings\">Dil</string>\n    <string name=\"theme_settings\">Tema</string>\n    <string name=\"mode_setting\">Mod</string>\n    <string name=\"dbs_ip_setting\">DNS</string>\n    <string name=\"byedpi_version\">ByeDPI</string>\n    <string name=\"bye_dpi_proxy_ip_setting\">Dinleme IPsi</string>\n    <string name=\"byedpi_proxy_port_setting\">Port</string>\n    <string name=\"byedpi_http_connect_setting\">HTTP proxy</string>\n    <string name=\"byedpi_http_connect_summary\">ByeDPI, HTTP dışında HTTPS veya herhangi bir TCP trafiğini proxyler.</string>\n    <string name=\"byedpi_max_connections_setting\">Maksimum bağlantılar</string>\n    <string name=\"byedpi_buffer_size_setting\">Tampon boyutu</string>\n    <string name=\"byedpi_default_ttl_setting\">Varsayılan TTL</string>\n    <string name=\"byedpi_no_domain_setting\">Alan adı yok</string>\n    <string name=\"byedpi_desync_method_setting\">Desenkronizasyon yöntemi</string>\n    <string name=\"byedpi_split_position_setting\">Bölme pozisyonu</string>\n    <string name=\"byedpi_split_at_host_setting\">Hostta bölme</string>\n    <string name=\"byedpi_fake_ttl_setting\">Sahte paketlerin TTL değeri</string>\n    <string name=\"byedpi_host_mixed_case_setting\">Karışık harfli host</string>\n    <string name=\"byedpi_domain_mixed_case_setting\">Karışık harfli domain</string>\n    <string name=\"byedpi_host_remove_spaces_setting\">Hosttan boşlukları kaldır</string>\n    <string name=\"byedpi_tlsrec_enabled_setting\">TLS kaydını böl</string>\n    <string name=\"byedpi_tlsrec_position_setting\">TLS kaydı bölme pozisyonu</string>\n    <string name=\"byedpi_tlsrec_at_sni_setting\">TLS kaydını SNIde böl</string>\n    <string name=\"version\">ByeByeDPI</string>\n    <string name=\"source_code_link\">Kaynak kodu</string>\n    <string name=\"byedpi_readme_link\">Hepsi ne anlama geliyor?</string>\n    <string name=\"failed_to_start\">Başlatırken hata oluştu ( %1$s )</string>\n    <string name=\"vpn_channel_name\">VPN</string>\n    <string name=\"proxy_channel_name\">Proxy</string>\n    <string name=\"notification_title\">ByeByeDPI</string>\n    <string name=\"vpn_notification_content\">VPN çalışıyor</string>\n    <string name=\"proxy_notification_content\">Proxy çalışıyor</string>\n    <string name=\"general_category\">Genel</string>\n    <string name=\"byedpi_category\">ByeDPI</string>\n    <string name=\"about_category\">Hakkında</string>\n    <string name=\"command_line_editor\">Komut satırı editörü</string>\n    <string name=\"ui_editor\">UI editörü</string>\n    <string name=\"use_command_line_settings\">Komut satırı editörünü kullan</string>\n    <string name=\"desync_http\">HTTP desenkronizasyonu</string>\n    <string name=\"desync_https\">HTTPS desenkronizasyonu</string>\n    <string name=\"desync_udp\">UDP desenkronizasyonu</string>\n    <string name=\"oob_data\">OOB Veri</string>\n    <string name=\"sni_of_fake_packet\">Sahte paketin SNIsi</string>\n    <string name=\"byedpi_proxy\">Proxy</string>\n    <string name=\"byedpi_desync\">Desenkronizasyon</string>\n    <string name=\"command_line_arguments\">Komut satırı argümanları</string>\n    <string name=\"byedpi_hosts_mode_setting\">Hostlar</string>\n    <string name=\"byedpi_hosts_blacklist_setting\">Host karaliste</string>\n    <string name=\"byedpi_hosts_whitelist_setting\">Host beyazliste</string>\n    <string name=\"byedpi_tcp_fast_open_setting\">TCP Fast Open</string>\n    <string name=\"byedpi_udp_fake_count\">Sahte UDP sayısı</string>\n    <string name=\"ipv6_setting\">IPv6</string>\n    <string name=\"byedpi_fake_offset_setting\">Sahte paket ofseti</string>\n    <string name=\"byedpi_drop_sack_setting\">SACKı düşür</string>\n    <string name=\"desync_udp_category\">UDP</string>\n    <string name=\"desync_http_category\">HTTP</string>\n    <string name=\"desync_https_category\">HTTPS</string>\n    <string name=\"byedpi_protocols_category\">Protokoller</string>\n    <string name=\"byedpi_protocols_hint\">Tümünü işareti kaldırarak tüm trafiği desenkronize et</string>\n    <string name=\"automation\">Otomasyon</string>\n    <string name=\"autostart_settings\">Cihaz başlangıcında servisi otomatik başlat</string>\n    <string name=\"autohide_settings\">Oto başlatmadan sonra uygulamayı otomatik gizle</string>\n    <string name=\"autoconnect_settings\">ByeByeDPI açılınca otomatik bağlan</string>\n    <string name=\"applist_setting\">Uygulama filtresi</string>\n    <string name=\"apps_select\">Uygulama seç</string>\n    <string name=\"search_apps\">Uygulama ara</string>\n    <string name=\"storage_access\">Depolama erişimi</string>\n    <string name=\"storage_access_summary\">Stratejilerde dosya argümanlarını kullanmak istiyorsanız, depolamaya erişim sağlayın</string>\n    <string name=\"storage_access_allowed_summary\">Verildi</string>\n    <string name=\"cmd_args_clear\">Temizle</string>\n    <string name=\"cmd_args_paste\">Yapıştır</string>\n    <string name=\"cmd_history_title\">Komut geçmişi</string>\n    <string name=\"cmd_history_title_summary\">Geçmişi yönetmek için tıklayın</string>\n    <string name=\"cmd_history_delete_all\">Tüm geçmişi sil</string>\n    <string name=\"cmd_history_delete_unpinned\">Sabitlenmemişleri sil</string>\n    <string name=\"cmd_history_menu\">Bir işlem seç</string>\n    <string name=\"cmd_history_apply\">Uygula</string>\n    <string name=\"cmd_history_copy\">Kopyala</string>\n    <string name=\"cmd_history_rename\">Yeniden adlandır</string>\n    <string name=\"cmd_history_edit\">Düzenle</string>\n    <string name=\"cmd_history_pin\">Sabitle</string>\n    <string name=\"cmd_history_unpin\">Sabitlemeyi kaldır</string>\n    <string name=\"cmd_history_pinned\">Sabitlendi</string>\n    <string name=\"cmd_history_applied\">Uygulandı</string>\n    <string name=\"cmd_history_delete\">Sil</string>\n    <string name=\"telegram_link\">Telegram grubu</string>\n    <string name=\"title_test\">Proxy testi (Beta)</string>\n    <string name=\"summary_test\">Hazırlanmış komut setlerinin test edilmesi</string>\n    <string name=\"test_start\">Testi başlat</string>\n    <string name=\"test_stop\">Testi durdur</string>\n    <string name=\"test_disclaimer\">\n        Bu bölüm, önceden hazırlanmış komut setlerini kullanarak uygulamayı test etmenizi sağlar.\\n\n        Test sırasında sistem, proxy üzerinden çeşitli web sitelerine erişimi kontrol eder ve süreci gerçek zamanlı olarak izleyebilirsiniz.\\n\n        \\n\n        Lütfen unutmayın: Bu test özelliği hâlâ geliştirme aşamasındadır ve komut seti şu anda sınırlıdır.\\n\n        Test sonuçları, proxy hakkında ön değerlendirme yapmanıza yardımcı olabilir; ancak testin başarılı tamamlanması, gerçek kullanım senaryolarında sorunsuz çalışacağı garantisini vermez.\n    </string>\n    <string name=\"test_crash\">\n        Uygulama test sırasında çöktü mü?\\n\\n\n        Test ayarlarına gidin ve komutlar arasındaki bekleme süresini 2 saniye artışlarla artırın. (2, 4, 6..)\n    </string>\n    <string name=\"test_process\">Kontrol ediliyor %1$d/%2$d</string>\n    <string name=\"test_proxy_error\">Proxy hatası. Test durduruldu.</string>\n    <string name=\"test_good_cmds\">%50 başarıya ulaşan komutlar</string>\n    <string name=\"test_complete\">Test tamamlandı</string>\n    <string name=\"test_complete_info\">Kullanmak veya kopyalamk için bir komuta basılı tut</string>\n    <string name=\"test_cmd_connect\">Uygula ve çalıştır</string>\n    <string name=\"test_cmd_apply\">Çalıştırmadan uygula</string>\n    <string name=\"test_cmd_connected\">Bağlandı</string>\n    <string name=\"toast_copied\">Sonuç kopyalandı</string>\n    <string name=\"test_settings_sni\">SNI sahte paketleri</string>\n    <string name=\"test_settings_fulllog\">Ana bilgisayar yanıt çıktısı</string>\n    <string name=\"test_settings_logclickable\">Tüm stratejiler tıklanabilir</string>\n    <string name=\"test_settings_domain_lists\">Test için alan adı listeleri</string>\n    <string name=\"test_settings_domain_empty\">Test edilecek alan adı yok</string>\n    <string name=\"test_settings_domains\">Alan adlarınızın listesi</string>\n    <string name=\"test_settings_usercommands\">Özel komut listesi kullan</string>\n    <string name=\"test_settings_commands\">Komut listesi</string>\n    <string name=\"test_delay\">Komutlar arasındaki gecikme</string>\n    <string name=\"test_requests\">Alan adı istek sayısı</string>\n    <string name=\"test_requests_limit\">Maksimum paralel istek sayısı</string>\n    <string name=\"test_timeout\">Alan adı yanıt zaman aşımı</string>\n    <string name=\"test_show_details\">Detayları göster</string>\n    <string name=\"test_hide_details\">Detayları gizle</string>\n    <string name=\"test_expand\">Genişlet</string>\n    <string name=\"battery_optimization\">Pil optimizasyonu</string>\n    <string name=\"battery_optimization_summary\">Kararlılığı artırmak için etkinleştirin</string>\n    <string name=\"battery_optimization_disabled_summary\">Devre dışı bırakıldı</string>\n    <string name=\"permission_category\">İzinler</string>\n    <string name=\"documentation_link\">Dokümantasyon</string>\n    <string name=\"proxytest_delay_desc\">Daha yüksek bir sayı stabiliteyi artırabilir</string>\n    <string name=\"proxytest_requests_desc\">Daha yüksek bir sayı doğruluğu artırır ama stabiliteyi azaltabilir</string>\n    <string name=\"proxytest_limit_desc\">Daha yüksek bir sayı testi hızlandırır ama stabiliteyi azaltabilir</string>\n    <string name=\"proxytest_timeout_desc\">Daha yüksek bir sayı testi yavaşlatır ama stabiliteyi artırır</string>\n    <string name=\"domain_lists\">Alan Adı Listeleri</string>\n    <string name=\"domain_lists_summary\">Test için alan adı listelerini ekleyin, düzenleyin veya kaldırın</string>\n    <string name=\"domain_list_add_new\">Yeni Liste Ekle</string>\n    <string name=\"domain_list_add_new_summary\">Test edilecek özel alan adları listesi oluşturun</string>\n    <string name=\"domain_list_edit\">Düzeltme</string>\n    <string name=\"domain_list_delete\">Kaldırmak</string>\n    <string name=\"domain_list_name_hint\">Liste adı</string>\n    <string name=\"domain_list_domains_hint\">Alan adları (her satırda bir tane)</string>\n    <string name=\"domain_list_summary\">%d alan adı</string>\n    <string name=\"domain_list_name_empty\">Liste adı boş olamaz</string>\n    <string name=\"domain_list_domains_empty\">Alan adı listesi boş olamaz</string>\n    <string name=\"domain_list_already_exists\">Bu adda bir liste zaten var</string>\n    <string name=\"domain_list_added\">Alan adı listesi eklendi</string>\n    <string name=\"domain_list_updated\">Alan adı listesi güncellendi</string>\n    <string name=\"domain_list_update_failed\">Alan adı listesi güncellenemedi</string>\n    <string name=\"domain_list_deleted\">Alan adı listesi silindi</string>\n    <string name=\"domain_list_delete_failed\">Alan adı listesi silinemedi</string>\n    <string name=\"main_btn_test\">Test</string>\n    <string name=\"main_btn_list\">Listeler</string>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-v31/themes.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <style name=\"Theme.ByeDPI\" parent=\"Theme.Material3.DynamicColors.DayNight\">\n        <item name=\"android:navigationBarColor\">?attr/colorSurface</item>\n        <item name=\"android:statusBarColor\">?attr/colorSurfaceContainer</item>\n\n        <item name=\"actionBarStyle\">@style/ActionBarTheme</item>\n        <item name=\"actionBarTheme\">@style/ActionBarTextTheme</item>\n\n        <item name=\"android:windowLightStatusBar\">true</item>\n        <item name=\"android:windowLightNavigationBar\">true</item>\n\n        <item name=\"colorControlActivated\">?attr/colorPrimary</item>\n        <item name=\"colorControlHighlight\">?attr/colorSecondaryContainer</item>\n\n        <item name=\"alertDialogTheme\">@style/CustomAlertDialog</item>\n\n        <item name=\"android:textAppearanceListItem\">@style/TextPrimary</item>\n        <item name=\"android:textAppearanceListItemSecondary\">@style/TextSummary</item>\n        <item name=\"android:textAppearanceListItemSmall\">@style/TextSummary</item>\n\n        <item name=\"switchPreferenceStyle\">@style/App.Preference.SwitchPreference</item>\n        <item name=\"materialCardViewStyle\">@style/SmallShadowCard</item>\n    </style>\n\n    <style name=\"CircleButton\" parent=\"Widget.Material3.Button.Icon\">\n        <item name=\"cornerRadius\">60dp</item>\n        <item name=\"android:textSize\">0sp</item>\n    </style>\n\n    <style name=\"App.Preference.SwitchPreference\" parent=\"Preference.SwitchPreference.Material\">\n        <item name=\"android:widgetLayout\">@layout/material_switch</item>\n    </style>\n\n    <style name=\"ActionBarTheme\" parent=\"Widget.AppCompat.ActionBar.Solid\">\n        <item name=\"background\">?attr/colorSurfaceContainer</item>\n        <item name=\"elevation\">0dp</item>\n    </style>\n\n    <style name=\"ActionBarTextTheme\" parent=\"ThemeOverlay.Material3.ActionBar\">\n        <item name=\"android:textColorPrimary\">?attr/colorOnSurface</item>\n        <item name=\"android:textColorSecondary\">?attr/colorOnSurfaceVariant</item>\n    </style>\n\n    <style name=\"CustomAlertDialog\" parent=\"ThemeOverlay.Material3.MaterialAlertDialog\">\n        <item name=\"android:windowBackground\">@drawable/material_alert</item>\n        <item name=\"android:textColorPrimary\">?attr/colorOnSurface</item>\n        <item name=\"android:textColorSecondary\">?attr/colorOnSurfaceVariant</item>\n    </style>\n\n    <style name=\"TextPrimary\" parent=\"TextAppearance.AppCompat.Title\">\n        <item name=\"android:textSize\">14sp</item>\n    </style>\n\n    <style name=\"TextSummary\" parent=\"TextAppearance.AppCompat.Subhead\">\n        <item name=\"android:textSize\">14sp</item>\n    </style>\n</resources>"
  },
  {
    "path": "app/src/main/res/values-vi/arrays.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <array name=\"languages\">\n        <item name=\"system\">Tự động</item>\n        <item name=\"ru\">Русский</item>\n        <item name=\"en\">English</item>\n        <item name=\"tr\">Türkçe</item>\n        <item name=\"kk\">Қазақша</item>\n        <item name=\"vi\">Tiếng Việt</item>\n    </array>\n\n    <array name=\"themes\">\n        <item name=\"system\">Theo hệ thống</item>\n        <item name=\"light\">Sáng</item>\n        <item name=\"dark\">Tối</item>\n    </array>\n\n    <array name=\"byedpi_hosts_modes\">\n        <item name=\"disable\">Tắt</item>\n        <item name=\"blacklist\">Danh sách đen</item>\n        <item name=\"whitelist\">Danh sách trắng</item>\n    </array>\n\n    <array name=\"applist_types\">\n        <item name=\"disable\">Tắt</item>\n        <item name=\"blacklist\">Danh sách đen</item>\n        <item name=\"whitelist\">Danh sách trắng</item>\n    </array>\n</resources>"
  },
  {
    "path": "app/src/main/res/values-vi/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string name=\"byedpi_docs\">https://github.com/hufrea/byedpi/blob/main/README.md</string>\n    <string name=\"app_name\">ByeByeDPI</string>\n    <string name=\"cmd_documentation\">Tài liệu</string>\n    <string name=\"toggle_connect\">Bật/Tắt</string>\n    <string name=\"vpn_connect\">Kết nối</string>\n    <string name=\"vpn_disconnect\">Ngắt kết nối</string>\n    <string name=\"vpn_connected\">Đã kết nối (VPN)</string>\n    <string name=\"vpn_disconnected\">Ngắt kết nối (VPN)</string>\n    <string name=\"proxy_up\">Đã kết nối (Proxy)</string>\n    <string name=\"proxy_down\">Ngắt kết nối (Proxy)</string>\n    <string name=\"proxy_start\">Bắt đầu</string>\n    <string name=\"proxy_stop\">Dừng</string>\n    <string name=\"service_start_btn\">Bắt đầu</string>\n    <string name=\"service_pause_btn\">Tạm dừng</string>\n    <string name=\"service_stop_btn\">Dừng</string>\n    <string name=\"service_paused_text\">Dịch vụ tạm dừng</string>\n    <string name=\"open_editor\">Trình chỉnh sửa</string>\n    <string name=\"settings\">Cài đặt</string>\n    <string name=\"vpn_permission_denied\">Không có quyền kích hoạt VPN</string>\n    <string name=\"service_restart\">Dịch vụ đã được khởi động lại với tham số mới</string>\n    <string name=\"settings_unavailable\">Ngắt kết nối trước để truy cập cài đặt</string>\n    <string name=\"title_settings\">Cài đặt</string>\n    <string name=\"save_logs\">Lưu nhật ký</string>\n    <string name=\"close_app\">Buộc đóng ứng dụng</string>\n    <string name=\"reset_settings\">Đặt lại cài đặt</string>\n    <string name=\"export_settings\">Xuất cài đặt</string>\n    <string name=\"import_settings\">Nhập cài đặt</string>\n    <string name=\"logs_failed\">Không thể thu thập nhật ký</string>\n    <string name=\"proxy_address\">%1$s:%2$s</string>\n    <string name=\"lang_settings\">Ngôn ngữ</string>\n    <string name=\"theme_settings\">Chủ đề</string>\n    <string name=\"mode_setting\">Chế độ</string>\n    <string name=\"dbs_ip_setting\">DNS</string>\n    <string name=\"byedpi_version\">ByeDPI</string>\n    <string name=\"bye_dpi_proxy_ip_setting\">Địa chỉ IP lắng nghe</string>\n    <string name=\"byedpi_proxy_port_setting\">Cổng</string>\n    <string name=\"byedpi_http_connect_setting\">Proxy HTTP</string>\n    <string name=\"byedpi_http_connect_summary\">ByeDPI sẽ bật proxy HTTPS hoặc bất kỳ lưu lượng TCP nào trừ HTTP</string>\n    <string name=\"byedpi_max_connections_setting\">Số kết nối tối đa</string>\n    <string name=\"byedpi_buffer_size_setting\">Kích thước bộ đệm</string>\n    <string name=\"byedpi_default_ttl_setting\">TTL mặc định</string>\n    <string name=\"byedpi_no_domain_setting\">Không có tên miền</string>\n    <string name=\"byedpi_desync_method_setting\">Phương thức desync</string>\n    <string name=\"byedpi_split_position_setting\">Vị trí chia gói</string>\n    <string name=\"byedpi_split_at_host_setting\">Chia tại host</string>\n    <string name=\"byedpi_fake_ttl_setting\">TTL của gói giả</string>\n    <string name=\"byedpi_host_mixed_case_setting\">Host chữ hoa/thường xen kẽ</string>\n    <string name=\"byedpi_domain_mixed_case_setting\">Tên miền chữ hoa/thường xen kẽ</string>\n    <string name=\"byedpi_host_remove_spaces_setting\">Xóa khoảng trắng trong host</string>\n    <string name=\"byedpi_tlsrec_enabled_setting\">Chia TLS record</string>\n    <string name=\"byedpi_tlsrec_position_setting\">Vị trí chia TLS record</string>\n    <string name=\"byedpi_tlsrec_at_sni_setting\">Chia TLS record tại SNI</string>\n    <string name=\"version\">ByeByeDPI</string>\n    <string name=\"source_code_link\">Mã nguồn</string>\n    <string name=\"byedpi_readme_link\">Ý nghĩa của các tham số?</string>\n    <string name=\"failed_to_start\">Không thể khởi động %1$s</string>\n    <string name=\"vpn_channel_name\">VPN</string>\n    <string name=\"proxy_channel_name\">Proxy</string>\n    <string name=\"notification_title\">ByeByeDPI</string>\n    <string name=\"vpn_notification_content\">VPN đang chạy</string>\n    <string name=\"proxy_notification_content\">Proxy đang chạy</string>\n    <string name=\"general_category\">Chung</string>\n    <string name=\"byedpi_category\">ByeDPI</string>\n    <string name=\"about_category\">Giới thiệu</string>\n    <string name=\"command_line_editor\">Chỉnh sửa dòng lệnh</string>\n    <string name=\"ui_editor\">Chỉnh sửa giao diện</string>\n    <string name=\"use_command_line_settings\">Sử dụng cài đặt dòng lệnh</string>\n    <string name=\"desync_http\">Desync HTTP</string>\n    <string name=\"desync_https\">Desync HTTPS</string>\n    <string name=\"desync_udp\">Desync UDP</string>\n    <string name=\"oob_data\">Dữ liệu OOB</string>\n    <string name=\"sni_of_fake_packet\">SNI của gói giả</string>\n    <string name=\"byedpi_proxy\">Proxy</string>\n    <string name=\"byedpi_desync\">Desync</string>\n    <string name=\"command_line_arguments\">Tham số dòng lệnh</string>\n    <string name=\"byedpi_hosts_mode_setting\">Chế độ Hosts</string>\n    <string name=\"byedpi_hosts_blacklist_setting\">Danh sách đen</string>\n    <string name=\"byedpi_hosts_whitelist_setting\">Danh sách trắng</string>\n    <string name=\"byedpi_tcp_fast_open_setting\">TCP Fast Open</string>\n    <string name=\"byedpi_udp_fake_count\">Số lượng gói UDP giả</string>\n    <string name=\"ipv6_setting\">IPv6</string>\n    <string name=\"byedpi_fake_offset_setting\">Offset gói giả</string>\n    <string name=\"byedpi_drop_sack_setting\">Bỏ qua SACK</string>\n    <string name=\"desync_udp_category\">UDP</string>\n    <string name=\"desync_http_category\">HTTP</string>\n    <string name=\"desync_https_category\">HTTPS</string>\n    <string name=\"byedpi_protocols_category\">Giao thức</string>\n    <string name=\"byedpi_protocols_hint\">Bỏ chọn tất cả để desync toàn bộ lưu lượng</string>\n    <string name=\"automation\">Tự động hóa</string>\n    <string name=\"autostart_settings\">Tự động khởi động dịch vụ khi bật thiết bị</string>\n    <string name=\"autohide_settings\">Tự động ẩn ứng dụng sau khi tự khởi động</string>\n    <string name=\"autoconnect_settings\">Tự động kết nối khi ByeByeDPI khởi động</string>\n    <string name=\"applist_setting\">Bộ lọc ứng dụng</string>\n    <string name=\"apps_select\">Chọn ứng dụng</string>\n    <string name=\"search_apps\">Tìm kiếm ứng dụng</string>\n    <string name=\"storage_access\">Quyền truy cập bộ nhớ</string>\n    <string name=\"storage_access_summary\">Cấp quyền truy cập bộ nhớ nếu bạn muốn dùng file trong các chiến lược</string>\n    <string name=\"storage_access_allowed_summary\">Đã cho phép</string>\n    <string name=\"cmd_args_clear\">Xóa</string>\n    <string name=\"cmd_args_paste\">Dán</string>\n    <string name=\"cmd_history_title\">Lịch sử lệnh</string>\n    <string name=\"cmd_history_title_summary\">Nhấn để quản lý lịch sử</string>\n    <string name=\"cmd_history_delete_all\">Xóa toàn bộ lịch sử</string>\n    <string name=\"cmd_history_delete_unpinned\">Xóa các mục không ghim</string>\n    <string name=\"cmd_history_menu\">Chọn hành động</string>\n    <string name=\"cmd_history_apply\">Áp dụng</string>\n    <string name=\"cmd_history_copy\">Sao chép</string>\n    <string name=\"cmd_history_rename\">Đổi tên</string>\n    <string name=\"cmd_history_edit\">Chỉnh sửa</string>\n    <string name=\"cmd_history_pin\">Ghim</string>\n    <string name=\"cmd_history_unpin\">Bỏ ghim</string>\n    <string name=\"cmd_history_pinned\">Đã ghim</string>\n    <string name=\"cmd_history_applied\">Đã áp dụng</string>\n    <string name=\"cmd_history_delete\">Xóa</string>\n    <string name=\"telegram_link\">Nhóm Telegram</string>\n    <string name=\"title_test\">Kiểm tra proxy (Beta)</string>\n    <string name=\"summary_test\">Kiểm tra các bộ lệnh đã chuẩn bị</string>\n    <string name=\"test_start\">Bắt đầu kiểm tra</string>\n    <string name=\"test_stop\">Dừng kiểm tra</string>\n    <string name=\"test_disclaimer\">\n        Phần này cho phép bạn kiểm tra ứng dụng bằng các bộ lệnh đã chuẩn bị sẵn.\\n\n        Trong quá trình kiểm tra, hệ thống sẽ kiểm tra khả năng truy cập các trang web qua proxy, bạn có thể theo dõi tiến trình theo thời gian thực.\\n\n        \\n\n        Lưu ý: Chức năng kiểm tra đang trong giai đoạn phát triển, bộ lệnh hiện tại còn hạn chế.\\n\n        Kết quả kiểm tra có thể giúp đánh giá sơ bộ proxy, nhưng hoàn thành thành công không đảm bảo hoạt động hoàn hảo trong điều kiện thực tế.\n    </string>\n    <string name=\"test_crash\">\n        Ứng dụng có bị crash trong lúc kiểm tra không?\\n\\n\n        Vào cài đặt kiểm tra và tăng thời gian chờ giữa các lệnh thêm 2 giây mỗi lần (2, 4, 6..)\n    </string>\n    <string name=\"test_process\">Đang kiểm tra %1$d/%2$d</string>\n    <string name=\"test_proxy_error\">Lỗi proxy. Kiểm tra dừng lại</string>\n    <string name=\"test_good_cmds\">Các lệnh có xác suất thành công > 50%</string>\n    <string name=\"test_complete\">Kiểm tra hoàn tất</string>\n    <string name=\"test_complete_info\">Nhấn vào lệnh để sao chép hoặc áp dụng</string>\n    <string name=\"test_cmd_connect\">Áp dụng và chạy</string>\n    <string name=\"test_cmd_apply\">Áp dụng mà không chạy</string>\n    <string name=\"test_cmd_connected\">Đã kết nối</string>\n    <string name=\"toast_copied\">Đã sao chép</string>\n    <string name=\"test_settings_sni\">Gói giả SNI</string>\n    <string name=\"test_settings_fulllog\">Hiển thị phản hồi host</string>\n    <string name=\"test_settings_logclickable\">Tất cả lệnh đều có thể nhấn</string>\n    <string name=\"test_settings_domain_lists\">Danh sách tên miền để kiểm tra</string>\n    <string name=\"test_settings_domain_empty\">Không có tên miền để kiểm tra</string>\n    <string name=\"test_settings_domains\">Danh sách tên miền của bạn</string>\n    <string name=\"test_settings_usercommands\">Danh sách lệnh tùy chỉnh</string>\n    <string name=\"test_settings_commands\">Danh sách lệnh</string>\n    <string name=\"test_delay\">Độ trễ giữa các lệnh</string>\n    <string name=\"test_requests\">Số lượng yêu cầu tên miền</string>\n    <string name=\"test_requests_limit\">Số yêu cầu song song tối đa</string>\n    <string name=\"test_timeout\">Thời gian chờ phản hồi tên miền</string>\n    <string name=\"test_show_details\">Hiện chi tiết</string>\n    <string name=\"test_hide_details\">Ẩn chi tiết</string>\n    <string name=\"test_expand\">Mở rộng</string>\n    <string name=\"battery_optimization\">Tối ưu pin</string>\n    <string name=\"battery_optimization_summary\">Bật để tăng độ ổn định</string>\n    <string name=\"battery_optimization_disabled_summary\">Đã tắt</string>\n    <string name=\"permission_category\">Quyền</string>\n    <string name=\"documentation_link\">Tài liệu</string>\n    <string name=\"proxytest_delay_desc\">Số lớn hơn có thể tăng độ ổn định</string>\n    <string name=\"proxytest_requests_desc\">Số lớn hơn tăng độ chính xác nhưng có thể giảm ổn định</string>\n    <string name=\"proxytest_limit_desc\">Số lớn hơn tăng tốc độ kiểm tra nhưng có thể giảm ổn định</string>\n    <string name=\"proxytest_timeout_desc\">Số lớn hơn giảm tốc độ kiểm tra nhưng tăng ổn định</string>\n    <string name=\"domain_lists\">Danh sách tên miền</string>\n    <string name=\"domain_lists_summary\">Quản lý danh sách tên miền dùng để kiểm tra</string>\n    <string name=\"domain_list_add_new\">Thêm danh sách mới</string>\n    <string name=\"domain_list_add_new_summary\">Tạo danh sách tên miền tùy chỉnh để kiểm tra</string>\n    <string name=\"domain_list_edit\">Chỉnh sửa</string>\n    <string name=\"domain_list_delete\">Xóa</string>\n    <string name=\"domain_list_name_hint\">Tên danh sách</string>\n    <string name=\"domain_list_domains_hint\">Tên miền (mỗi dòng một tên miền)</string>\n    <string name=\"domain_list_summary\">%d tên miền</string>\n    <string name=\"domain_list_name_empty\">Tên danh sách không được để trống</string>\n    <string name=\"domain_list_domains_empty\">Danh sách tên miền không được để trống</string>\n    <string name=\"domain_list_already_exists\">Đã tồn tại danh sách với tên này</string>\n    <string name=\"domain_list_added\">Đã thêm danh sách tên miền</string>\n    <string name=\"domain_list_updated\">Đã cập nhật danh sách tên miền</string>\n    <string name=\"domain_list_update_failed\">Không thể cập nhật danh sách tên miền</string>\n    <string name=\"domain_list_deleted\">Đã xóa danh sách tên miền</string>\n    <string name=\"domain_list_delete_failed\">Không thể xóa danh sách tên miền</string>\n    <string name=\"main_btn_test\">Kiểm tra</string>\n    <string name=\"main_btn_list\">Danh sách</string>\n</resources>"
  },
  {
    "path": "app/src/main/res/xml/backup_rules.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?><!--\n   Sample backup rules file; uncomment and customize as necessary.\n   See https://developer.android.com/guide/topics/data/autobackup\n   for details.\n   Note: This file is ignored for devices older that API 31\n   See https://developer.android.com/about/versions/12/backup-restore\n-->\n<full-backup-content>\n    <!--\n   <include domain=\"sharedpref\" path=\".\"/>\n   <exclude domain=\"sharedpref\" path=\"device.xml\"/>\n-->\n</full-backup-content>"
  },
  {
    "path": "app/src/main/res/xml/byedpi_cmd_settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<PreferenceScreen xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:tag=\"byedpi_cmd_settings\">\n\n    <EditTextPreference\n        android:key=\"byedpi_cmd_args\"\n        android:title=\"@string/command_line_arguments\"\n        android:dialogTitle=\"@string/command_line_arguments\"\n        android:defaultValue=\"-Ku -a1 -An -o1 -At,r,s -d1\"\n        android:inputType=\"textMultiLine\"\n        app:iconSpaceReserved=\"false\"\n        app:useSimpleSummaryProvider=\"true\" />\n\n    <Preference\n        android:key=\"cmd_editor_buttons\"\n        android:layout=\"@layout/cmd_editor_buttons\"\n        android:selectable=\"false\" />\n\n    <Preference\n        android:key=\"cmd_history_header\"\n        android:title=\"@string/cmd_history_title\"\n        android:summary=\"@string/cmd_history_title_summary\"\n        android:layout=\"@layout/history_category\" />\n\n</PreferenceScreen>"
  },
  {
    "path": "app/src/main/res/xml/byedpi_ui_settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<PreferenceScreen xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:tag=\"byedpi_ui_settings\">\n\n    <androidx.preference.PreferenceCategory\n        android:title=\"@string/byedpi_proxy\"\n        app:iconSpaceReserved=\"false\">\n\n        <EditTextPreference\n            android:key=\"byedpi_max_connections\"\n            android:title=\"@string/byedpi_max_connections_setting\"\n            android:inputType=\"number\"\n            android:defaultValue=\"512\"\n            app:iconSpaceReserved=\"false\"\n            app:useSimpleSummaryProvider=\"true\" />\n\n        <EditTextPreference\n            android:key=\"byedpi_buffer_size\"\n            android:title=\"@string/byedpi_buffer_size_setting\"\n            android:inputType=\"number\"\n            android:defaultValue=\"16384\"\n            app:iconSpaceReserved=\"false\"\n            app:useSimpleSummaryProvider=\"true\" />\n\n        <CheckBoxPreference\n            android:key=\"byedpi_no_domain\"\n            android:title=\"@string/byedpi_no_domain_setting\"\n            android:defaultValue=\"false\"\n            app:iconSpaceReserved=\"false\" />\n\n        <CheckBoxPreference\n            android:key=\"byedpi_tcp_fast_open\"\n            android:title=\"@string/byedpi_tcp_fast_open_setting\"\n            android:defaultValue=\"false\"\n            app:iconSpaceReserved=\"false\" />\n\n    </androidx.preference.PreferenceCategory>\n\n    <androidx.preference.PreferenceCategory\n        android:title=\"@string/byedpi_desync\"\n        app:iconSpaceReserved=\"false\">\n\n        <ListPreference\n            android:key=\"byedpi_hosts_mode\"\n            android:title=\"@string/byedpi_hosts_mode_setting\"\n            android:entries=\"@array/byedpi_hosts_modes\"\n            android:entryValues=\"@array/byedpi_hosts_modes_entries\"\n            android:defaultValue=\"disable\"\n            android:summary=\"%s\"\n            app:iconSpaceReserved=\"false\" />\n\n        <EditTextPreference\n            android:key=\"byedpi_hosts_blacklist\"\n            android:title=\"@string/byedpi_hosts_blacklist_setting\"\n            android:dialogTitle=\"@string/byedpi_hosts_blacklist_setting\"\n            android:inputType=\"textMultiLine\"\n            app:useSimpleSummaryProvider=\"true\"\n            app:iconSpaceReserved=\"false\" />\n\n        <EditTextPreference\n            android:key=\"byedpi_hosts_whitelist\"\n            android:title=\"@string/byedpi_hosts_whitelist_setting\"\n            android:dialogTitle=\"@string/byedpi_hosts_whitelist_setting\"\n            android:inputType=\"textMultiLine\"\n            app:useSimpleSummaryProvider=\"true\"\n            app:iconSpaceReserved=\"false\" />\n\n        <EditTextPreference\n            android:key=\"byedpi_default_ttl\"\n            android:title=\"@string/byedpi_default_ttl_setting\"\n            android:inputType=\"number\"\n            android:defaultValue=\"0\"\n            app:useSimpleSummaryProvider=\"true\"\n            app:iconSpaceReserved=\"false\" />\n\n        <ListPreference\n            android:key=\"byedpi_desync_method\"\n            android:title=\"@string/byedpi_desync_method_setting\"\n            android:entries=\"@array/byedpi_desync_methods\"\n            android:entryValues=\"@array/byedpi_desync_methods_entries\"\n            android:defaultValue=\"oob\"\n            android:summary=\"%s\"\n            app:iconSpaceReserved=\"false\" />\n\n        <EditTextPreference\n            android:key=\"byedpi_split_position\"\n            android:title=\"@string/byedpi_split_position_setting\"\n            android:inputType=\"numberSigned\"\n            android:defaultValue=\"1\"\n            app:useSimpleSummaryProvider=\"true\"\n            app:iconSpaceReserved=\"false\" />\n\n        <CheckBoxPreference\n            android:key=\"byedpi_split_at_host\"\n            android:title=\"@string/byedpi_split_at_host_setting\"\n            android:defaultValue=\"false\"\n            app:iconSpaceReserved=\"false\" />\n\n        <CheckBoxPreference\n            android:key=\"byedpi_drop_sack\"\n            android:title=\"@string/byedpi_drop_sack_setting\"\n            android:defaultValue=\"false\"\n            app:iconSpaceReserved=\"false\" />\n\n        <EditTextPreference\n            android:key=\"byedpi_fake_ttl\"\n            android:title=\"@string/byedpi_fake_ttl_setting\"\n            android:inputType=\"number\"\n            android:defaultValue=\"8\"\n            app:useSimpleSummaryProvider=\"true\"\n            app:iconSpaceReserved=\"false\" />\n\n        <EditTextPreference\n            android:key=\"byedpi_fake_offset\"\n            android:title=\"@string/byedpi_fake_offset_setting\"\n            android:inputType=\"number\"\n            android:defaultValue=\"0\"\n            app:useSimpleSummaryProvider=\"true\"\n            app:iconSpaceReserved=\"false\" />\n\n        <EditTextPreference\n            android:key=\"byedpi_fake_sni\"\n            android:title=\"@string/sni_of_fake_packet\"\n            android:defaultValue=\"www.iana.org\"\n            app:useSimpleSummaryProvider=\"true\"\n            app:iconSpaceReserved=\"false\" />\n\n        <EditTextPreference\n            android:key=\"byedpi_oob_data\"\n            android:title=\"@string/oob_data\"\n            android:defaultValue=\"a\"\n            app:useSimpleSummaryProvider=\"true\"\n            app:iconSpaceReserved=\"false\" />\n\n    </androidx.preference.PreferenceCategory>\n\n    <androidx.preference.PreferenceCategory\n        android:title=\"@string/byedpi_protocols_category\"\n        app:iconSpaceReserved=\"false\">\n\n        <CheckBoxPreference\n            android:key=\"byedpi_desync_http\"\n            android:title=\"@string/desync_http\"\n            android:defaultValue=\"true\"\n            app:iconSpaceReserved=\"false\" />\n\n        <CheckBoxPreference\n            android:key=\"byedpi_desync_https\"\n            android:title=\"@string/desync_https\"\n            android:defaultValue=\"true\"\n            app:iconSpaceReserved=\"false\" />\n\n        <CheckBoxPreference\n            android:key=\"byedpi_desync_udp\"\n            android:title=\"@string/desync_udp\"\n            android:defaultValue=\"true\"\n            app:iconSpaceReserved=\"false\" />\n\n    </androidx.preference.PreferenceCategory>\n\n    <androidx.preference.PreferenceCategory\n        android:title=\"@string/desync_http_category\"\n        app:iconSpaceReserved=\"false\">\n\n        <CheckBoxPreference\n            android:key=\"byedpi_host_mixed_case\"\n            android:title=\"@string/byedpi_host_mixed_case_setting\"\n            android:defaultValue=\"false\"\n            app:iconSpaceReserved=\"false\" />\n\n        <CheckBoxPreference\n            android:key=\"byedpi_domain_mixed_case\"\n            android:title=\"@string/byedpi_domain_mixed_case_setting\"\n            android:defaultValue=\"false\"\n            app:iconSpaceReserved=\"false\" />\n\n        <CheckBoxPreference\n            android:key=\"byedpi_host_remove_spaces\"\n            android:title=\"@string/byedpi_host_remove_spaces_setting\"\n            android:defaultValue=\"false\"\n            app:iconSpaceReserved=\"false\" />\n\n    </androidx.preference.PreferenceCategory>\n\n    <androidx.preference.PreferenceCategory\n        android:title=\"@string/desync_https_category\"\n        app:iconSpaceReserved=\"false\">\n\n        <CheckBoxPreference\n            android:key=\"byedpi_tlsrec_enabled\"\n            android:title=\"@string/byedpi_tlsrec_enabled_setting\"\n            android:defaultValue=\"false\"\n            app:iconSpaceReserved=\"false\" />\n\n        <EditTextPreference\n            android:key=\"byedpi_tlsrec_position\"\n            android:title=\"@string/byedpi_tlsrec_position_setting\"\n            android:inputType=\"numberSigned\"\n            android:defaultValue=\"0\"\n            app:useSimpleSummaryProvider=\"true\"\n            app:iconSpaceReserved=\"false\" />\n\n        <CheckBoxPreference\n            android:key=\"byedpi_tlsrec_at_sni\"\n            android:title=\"@string/byedpi_tlsrec_at_sni_setting\"\n            android:defaultValue=\"false\"\n            app:iconSpaceReserved=\"false\" />\n\n    </androidx.preference.PreferenceCategory>\n\n    <androidx.preference.PreferenceCategory\n        android:title=\"@string/desync_udp_category\"\n        app:iconSpaceReserved=\"false\">\n\n        <EditTextPreference\n            android:key=\"byedpi_udp_fake_count\"\n            android:title=\"@string/byedpi_udp_fake_count\"\n            android:inputType=\"number\"\n            android:defaultValue=\"1\"\n            app:useSimpleSummaryProvider=\"true\"\n            app:iconSpaceReserved=\"false\" />\n\n    </androidx.preference.PreferenceCategory>\n\n</PreferenceScreen>\n"
  },
  {
    "path": "app/src/main/res/xml/data_extraction_rules.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?><!--\n   Sample data extraction rules file; uncomment and customize as necessary.\n   See https://developer.android.com/about/versions/12/backup-restore#xml-changes\n   for details.\n-->\n<data-extraction-rules>\n    <cloud-backup>\n        <!-- TODO: Use <include> and <exclude> to control what is backed up.\n        <include .../>\n        <exclude .../>\n        -->\n    </cloud-backup>\n    <!--\n    <device-transfer>\n        <include .../>\n        <exclude .../>\n    </device-transfer>\n    -->\n</data-extraction-rules>"
  },
  {
    "path": "app/src/main/res/xml/main_settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<PreferenceScreen xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:tag=\"main_settings\">\n\n    <androidx.preference.PreferenceCategory\n        android:title=\"@string/general_category\">\n\n        <ListPreference\n            android:key=\"language\"\n            android:icon=\"@drawable/ic_language\"\n            android:title=\"@string/lang_settings\"\n            android:entries=\"@array/languages\"\n            android:entryValues=\"@array/languages_entries\"\n            android:summary=\"%s\"\n            android:defaultValue=\"system\" />\n\n        <ListPreference\n            android:key=\"app_theme\"\n            android:icon=\"@drawable/ic_palette\"\n            android:title=\"@string/theme_settings\"\n            android:entries=\"@array/themes\"\n            android:entryValues=\"@array/themes_entries\"\n            android:summary=\"%s\"\n            android:defaultValue=\"system\" />\n\n        <ListPreference\n            android:key=\"byedpi_mode\"\n            android:icon=\"@drawable/ic_vpn_key\"\n            android:title=\"@string/mode_setting\"\n            android:entries=\"@array/byedpi_modes\"\n            android:entryValues=\"@array/byedpi_modes_entries\"\n            android:summary=\"%s\"\n            android:defaultValue=\"vpn\" />\n\n        <EditTextPreference\n            android:key=\"dns_ip\"\n            android:icon=\"@drawable/ic_dns\"\n            android:title=\"@string/dbs_ip_setting\"\n            android:defaultValue=\"8.8.8.8\"\n            app:useSimpleSummaryProvider=\"true\" />\n\n        <SwitchPreference\n            android:key=\"ipv6_enable\"\n            android:icon=\"@drawable/ic_network\"\n            android:title=\"@string/ipv6_setting\"\n            android:defaultValue=\"false\" />\n\n        <ListPreference\n            android:key=\"applist_type\"\n            android:icon=\"@drawable/ic_filter_list\"\n            android:title=\"@string/applist_setting\"\n            android:entries=\"@array/applist_types\"\n            android:entryValues=\"@array/applist_types_entries\"\n            android:summary=\"%s\"\n            android:defaultValue=\"disable\" />\n\n        <Preference\n            android:key=\"selected_apps\"\n            android:icon=\"@drawable/ic_apps\"\n            android:title=\"@string/apps_select\"\n            app:fragment=\"io.github.romanvht.byedpi.fragments.AppSelectionFragment\" />\n\n    </androidx.preference.PreferenceCategory>\n\n    <androidx.preference.PreferenceCategory\n        android:title=\"@string/automation\">\n\n        <SwitchPreference\n            android:key=\"autostart\"\n            android:icon=\"@drawable/ic_power\"\n            android:title=\"@string/autostart_settings\"\n            android:defaultValue=\"false\" />\n\n        <SwitchPreference\n            android:key=\"auto_connect\"\n            android:icon=\"@drawable/ic_autorenew\"\n            android:title=\"@string/autoconnect_settings\"\n            android:defaultValue=\"false\" />\n\n    </androidx.preference.PreferenceCategory>\n\n    <androidx.preference.PreferenceCategory\n        android:title=\"@string/byedpi_category\">\n\n        <SwitchPreference\n            android:key=\"byedpi_enable_cmd_settings\"\n            android:icon=\"@drawable/ic_terminal\"\n            android:title=\"@string/use_command_line_settings\"\n            android:defaultValue=\"false\" />\n\n        <Preference\n            android:key=\"byedpi_ui_settings\"\n            android:icon=\"@drawable/ic_tune\"\n            android:title=\"@string/ui_editor\"\n            app:useSimpleSummaryProvider=\"true\"\n            app:fragment=\"io.github.romanvht.byedpi.fragments.ByeDpiUISettingsFragment\" />\n\n        <Preference\n            android:key=\"byedpi_cmd_settings\"\n            android:icon=\"@drawable/ic_code\"\n            android:title=\"@string/command_line_editor\"\n            app:useSimpleSummaryProvider=\"true\"\n            app:fragment=\"io.github.romanvht.byedpi.fragments.ByeDpiCMDSettingsFragment\" />\n\n        <Preference\n            android:key=\"proxy_test\"\n            android:icon=\"@drawable/ic_speed\"\n            android:title=\"@string/title_test\"\n            android:summary=\"@string/summary_test\"/>\n\n    </androidx.preference.PreferenceCategory>\n\n    <androidx.preference.PreferenceCategory\n        android:title=\"@string/byedpi_proxy\"\n        android:key=\"byedpi_proxy_category\">\n\n        <EditTextPreference\n            android:key=\"byedpi_proxy_ip\"\n            android:icon=\"@drawable/ic_computer\"\n            android:title=\"@string/bye_dpi_proxy_ip_setting\"\n            android:defaultValue=\"127.0.0.1\"\n            app:useSimpleSummaryProvider=\"true\" />\n\n        <EditTextPreference\n            android:key=\"byedpi_proxy_port\"\n            android:icon=\"@drawable/ic_port\"\n            android:title=\"@string/byedpi_proxy_port_setting\"\n            android:inputType=\"number\"\n            android:defaultValue=\"1080\"\n            app:useSimpleSummaryProvider=\"true\" />\n\n        <SwitchPreference\n            android:key=\"byedpi_http_connect\"\n            android:icon=\"@drawable/ic_http\"\n            android:title=\"@string/byedpi_http_connect_setting\"\n            android:defaultValue=\"false\"\n            android:summary=\"@string/byedpi_http_connect_summary\"/>\n\n    </androidx.preference.PreferenceCategory>\n\n    <androidx.preference.PreferenceCategory\n        android:title=\"@string/permission_category\">\n\n        <Preference\n            android:key=\"battery_optimization\"\n            android:icon=\"@drawable/ic_battery\"\n            android:title=\"@string/battery_optimization\"\n            android:summary=\"@string/battery_optimization_summary\">\n        </Preference>\n\n        <Preference\n            android:key=\"storage_access\"\n            android:icon=\"@drawable/ic_folder\"\n            android:title=\"@string/storage_access\"\n            android:summary=\"@string/storage_access_summary\">\n        </Preference>\n\n    </androidx.preference.PreferenceCategory>\n\n    <androidx.preference.PreferenceCategory\n        android:title=\"@string/about_category\">\n\n        <Preference\n            android:key=\"telegram_group\"\n            android:title=\"@string/telegram_link\"\n            android:icon=\"@drawable/ic_telegram\">\n            <intent\n                android:action=\"android.intent.action.VIEW\"\n                android:data=\"https://t.me/byebyedpi_group\" />\n        </Preference>\n\n        <Preference\n            android:key=\"source_code\"\n            android:title=\"@string/source_code_link\"\n            android:icon=\"@drawable/ic_github\">\n            <intent\n                android:action=\"android.intent.action.VIEW\"\n                android:data=\"https://github.com/romanvht/ByeDPIAndroid\" />\n        </Preference>\n\n        <Preference\n            android:key=\"documentation\"\n            android:icon=\"@drawable/ic_documentation\"\n            android:title=\"@string/documentation_link\">\n            <intent\n                android:action=\"android.intent.action.VIEW\"\n                android:data=\"https://github.com/BDManual/ByeByeDPI-Manual\" />\n        </Preference>\n\n        <Preference\n            android:key=\"version\"\n            android:icon=\"@drawable/ic_info\"\n            android:title=\"@string/version\"\n            app:useSimpleSummaryProvider=\"true\"\n            tools:summary=\"1.0.0\" />\n\n        <Preference\n            android:key=\"byedpi_version\"\n            android:icon=\"@drawable/ic_info\"\n            android:title=\"@string/byedpi_version\"\n            app:useSimpleSummaryProvider=\"true\"\n            android:summary=\"0.0.1\" />\n\n    </androidx.preference.PreferenceCategory>\n\n</PreferenceScreen>\n"
  },
  {
    "path": "app/src/main/res/xml/proxy_test_settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<PreferenceScreen xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\">\n\n    <EditTextPreference\n        android:key=\"byedpi_proxytest_delay\"\n        android:title=\"@string/test_delay\"\n        android:inputType=\"number\"\n        android:defaultValue=\"1\"\n        app:useSimpleSummaryProvider=\"true\"\n        app:iconSpaceReserved=\"false\" />\n\n    <EditTextPreference\n        android:key=\"byedpi_proxytest_requests\"\n        android:title=\"@string/test_requests\"\n        android:inputType=\"number\"\n        android:defaultValue=\"1\"\n        app:useSimpleSummaryProvider=\"true\"\n        app:iconSpaceReserved=\"false\" />\n\n    <EditTextPreference\n        android:key=\"byedpi_proxytest_limit\"\n        android:title=\"@string/test_requests_limit\"\n        android:inputType=\"number\"\n        android:defaultValue=\"20\"\n        app:useSimpleSummaryProvider=\"true\"\n        app:iconSpaceReserved=\"false\" />\n\n    <EditTextPreference\n        android:key=\"byedpi_proxytest_timeout\"\n        android:title=\"@string/test_timeout\"\n        android:inputType=\"number\"\n        android:defaultValue=\"5\"\n        app:useSimpleSummaryProvider=\"true\"\n        app:iconSpaceReserved=\"false\" />\n\n    <EditTextPreference\n        android:key=\"byedpi_proxytest_sni\"\n        android:title=\"@string/test_settings_sni\"\n        android:inputType=\"text\"\n        android:defaultValue=\"google.com\"\n        app:useSimpleSummaryProvider=\"true\"\n        app:iconSpaceReserved=\"false\" />\n\n    <Preference\n        android:key=\"manage_domain_lists\"\n        android:title=\"@string/domain_lists\"\n        android:summary=\"@string/domain_lists_summary\"\n        app:fragment=\"io.github.romanvht.byedpi.fragments.DomainListsFragment\"\n        app:iconSpaceReserved=\"false\" />\n\n    <SwitchPreference\n        android:key=\"byedpi_proxytest_usercommands\"\n        android:title=\"@string/test_settings_usercommands\"\n        app:iconSpaceReserved=\"false\" />\n\n    <EditTextPreference\n        android:key=\"byedpi_proxytest_commands\"\n        android:title=\"@string/test_settings_commands\"\n        android:enabled=\"false\"\n        android:inputType=\"textMultiLine\"\n        app:useSimpleSummaryProvider=\"true\"\n        app:iconSpaceReserved=\"false\" />\n\n</PreferenceScreen>\n"
  },
  {
    "path": "app/src/test/java/io/github/romanvht/byedpi/ExampleUnitTest.kt",
    "content": "package io.github.romanvht.byedpi\n\nimport org.junit.Test\n\nimport org.junit.Assert.*\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\nclass ExampleUnitTest {\n    @Test\n    fun addition_isCorrect() {\n        assertEquals(4, 2 + 2)\n    }\n}"
  },
  {
    "path": "build.gradle.kts",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\nplugins {\n    id(\"com.android.application\") version \"8.11.0\" apply false\n    id(\"org.jetbrains.kotlin.android\") version \"2.2.0\" apply false\n}\n"
  },
  {
    "path": "fastlane/metadata/android/en-US/full_description.txt",
    "content": "<p><i>ByeByeDPI</i> launches a local SOCKS5 proxy <a href='https://github.com/hufrea/byedpi' target='_blank' rel='nofollow noopener'>ByeDPI</a> to bypass DPI and redirects all traffic through it.</p>\n<p>For stable operation, configuration adjustments may be required. You can read more about various settings in the <a href='https://github.com/hufrea/byedpi/blob/main/README.md' target='_blank' rel='nofollow noopener'>ByeDPI documentation</a>.</p>\n<p>The application uses VPN mode on Android to redirect traffic but does not transmit anything to a remote server. It does not encrypt traffic or hide your IP address.</p>\n<p>\n<b>Features</b><br>\n* Support for app filtering in VPN mode (split tunneling via whitelist/blacklist)<br>\n* Auto-launch of VPN/Proxy on device startup<br>\n* Saving command-line parameter lists with switching capability<br>\n* Improved compatibility with Android TV/BOX<br>\n* Import/export of settings<br>\n* Ability to test application performance using a set of pre-configured commands (Beta)<br>\n</p>"
  },
  {
    "path": "fastlane/metadata/android/en-US/short_description.txt",
    "content": "Bypass censorship on Android"
  },
  {
    "path": "fastlane/metadata/android/ru-RU/full_description.txt",
    "content": "<p><i>ByeByeDPI</i> запускает локальный SOCKS5 прокси <a href='https://github.com/hufrea/byedpi' target='_blank' rel='nofollow noopener'>ByeDPI</a> для обхода DPI и перенаправляет весь трафик через него.</p>\n<p>Для стабильной работы может потребоваться изменить настройки. Подробнее о различных настройках можно прочитать в <a href='https://github.com/hufrea/byedpi/blob/main/README.md' target='_blank' rel='nofollow noopener'>документации ByeDPI</a>.</p>\n<p>Приложение использует VPN-режим на Android для перенаправления трафика, но не передает ничего на удаленный сервер. Оно не шифрует трафик и не скрывает ваш IP-адрес.</p>\n<p>\n<b>Возможности</b><br>\n* Поддержка фильтра приложений для режима VPN (раздельное туннелирование через whitelist/blacklist)<br>\n* Автозапуск VPN/Proxy при старте устройства<br>\n* Сохранение списков параметров командной строки с возможностью переключения<br>\n* Улучшена совместимость с Android TV/BOX<br>\n* Импорт/экспорт настроек<br>\n* Возможность протестировать работу приложения с помощью набора заранее подготовленных команд (Beta)<br>\n</p>"
  },
  {
    "path": "fastlane/metadata/android/ru-RU/short_description.txt",
    "content": "Обход цензуры на Android"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.14.3-bin.zip\nnetworkTimeout=10000\nvalidateDistributionUrl=true\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n# AndroidX package structure to make it clearer which packages are bundled with the\n# Android operating system, and which are packaged with your app's APK\n# https://developer.android.com/topic/libraries/support-library/androidx-rn\nandroid.useAndroidX=true\n# Kotlin code style for this project: \"official\" or \"obsolete\":\nkotlin.code.style=official\n# Enables namespacing of each library's R class so that its R class includes only the\n# resources declared in the library itself and none from the library's dependencies,\n# thereby reducing the size of the R class for that library\nandroid.nonTransitiveRClass=true"
  },
  {
    "path": "gradlew",
    "content": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n#\n\n##############################################################################\n#\n#   Gradle start up script for POSIX generated by Gradle.\n#\n#   Important for running:\n#\n#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is\n#       noncompliant, but you have some other compliant shell such as ksh or\n#       bash, then to run this script, type that shell name before the whole\n#       command line, like:\n#\n#           ksh Gradle\n#\n#       Busybox and similar reduced shells will NOT work, because this script\n#       requires all of these POSIX shell features:\n#         * functions;\n#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,\n#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;\n#         * compound commands having a testable exit status, especially «case»;\n#         * various built-in commands including «command», «set», and «ulimit».\n#\n#   Important for patching:\n#\n#   (2) This script targets any POSIX shell, so it avoids extensions provided\n#       by Bash, Ksh, etc; in particular arrays are avoided.\n#\n#       The \"traditional\" practice of packing multiple parameters into a\n#       space-separated string is a well documented source of bugs and security\n#       problems, so this is (mostly) avoided, by progressively accumulating\n#       options in \"$@\", and eventually passing that to Java.\n#\n#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,\n#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;\n#       see the in-line comments for details.\n#\n#       There are tweaks for specific operating systems such as AIX, CygWin,\n#       Darwin, MinGW, and NonStop.\n#\n#   (3) This script is generated from the Groovy template\n#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt\n#       within the Gradle project.\n#\n#       You can find Gradle at https://github.com/gradle/gradle/.\n#\n##############################################################################\n\n# Attempt to set APP_HOME\n\n# Resolve links: $0 may be a link\napp_path=$0\n\n# Need this for daisy-chained symlinks.\nwhile\n    APP_HOME=${app_path%\"${app_path##*/}\"}  # leaves a trailing /; empty if no leading path\n    [ -h \"$app_path\" ]\ndo\n    ls=$( ls -ld \"$app_path\" )\n    link=${ls#*' -> '}\n    case $link in             #(\n      /*)   app_path=$link ;; #(\n      *)    app_path=$APP_HOME$link ;;\n    esac\ndone\n\n# This is normally unused\n# shellcheck disable=SC2034\nAPP_BASE_NAME=${0##*/}\n# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)\nAPP_HOME=$( cd -P \"${APP_HOME:-./}\" > /dev/null && printf '%s\\n' \"$PWD\" ) || exit\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=maximum\n\nwarn () {\n    echo \"$*\"\n} >&2\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n} >&2\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"$( uname )\" in                #(\n  CYGWIN* )         cygwin=true  ;; #(\n  Darwin* )         darwin=true  ;; #(\n  MSYS* | MINGW* )  msys=true    ;; #(\n  NONSTOP* )        nonstop=true ;;\nesac\n\nCLASSPATH=\"\\\\\\\"\\\\\\\"\"\n\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=$JAVA_HOME/jre/sh/java\n    else\n        JAVACMD=$JAVA_HOME/bin/java\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=java\n    if ! command -v java >/dev/null 2>&1\n    then\n        die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nfi\n\n# Increase the maximum file descriptors if we can.\nif ! \"$cygwin\" && ! \"$darwin\" && ! \"$nonstop\" ; then\n    case $MAX_FD in #(\n      max*)\n        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        MAX_FD=$( ulimit -H -n ) ||\n            warn \"Could not query maximum file descriptor limit\"\n    esac\n    case $MAX_FD in  #(\n      '' | soft) :;; #(\n      *)\n        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        ulimit -n \"$MAX_FD\" ||\n            warn \"Could not set maximum file descriptor limit to $MAX_FD\"\n    esac\nfi\n\n# Collect all arguments for the java command, stacking in reverse order:\n#   * args from the command line\n#   * the main class name\n#   * -classpath\n#   * -D...appname settings\n#   * --module-path (only if needed)\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif \"$cygwin\" || \"$msys\" ; then\n    APP_HOME=$( cygpath --path --mixed \"$APP_HOME\" )\n    CLASSPATH=$( cygpath --path --mixed \"$CLASSPATH\" )\n\n    JAVACMD=$( cygpath --unix \"$JAVACMD\" )\n\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    for arg do\n        if\n            case $arg in                                #(\n              -*)   false ;;                            # don't mess with options #(\n              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath\n                    [ -e \"$t\" ] ;;                      #(\n              *)    false ;;\n            esac\n        then\n            arg=$( cygpath --path --ignore --mixed \"$arg\" )\n        fi\n        # Roll the args list around exactly as many times as the number of\n        # args, so each arg winds up back in the position where it started, but\n        # possibly modified.\n        #\n        # NB: a `for` loop captures its iteration list before it begins, so\n        # changing the positional parameters here affects neither the number of\n        # iterations, nor the values presented in `arg`.\n        shift                   # remove old arg\n        set -- \"$@\" \"$arg\"      # push replacement arg\n    done\nfi\n\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS='\"-Xmx64m\" \"-Xms64m\"'\n\n# Collect all arguments for the java command:\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,\n#     and any embedded shellness will be escaped.\n#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be\n#     treated as '${Hostname}' itself on the command line.\n\nset -- \\\n        \"-Dorg.gradle.appname=$APP_BASE_NAME\" \\\n        -classpath \"$CLASSPATH\" \\\n        -jar \"$APP_HOME/gradle/wrapper/gradle-wrapper.jar\" \\\n        \"$@\"\n\n# Stop when \"xargs\" is not available.\nif ! command -v xargs >/dev/null 2>&1\nthen\n    die \"xargs is not available\"\nfi\n\n# Use \"xargs\" to parse quoted args.\n#\n# With -n1 it outputs one arg per line, with the quotes and backslashes removed.\n#\n# In Bash we could simply go:\n#\n#   readarray ARGS < <( xargs -n1 <<<\"$var\" ) &&\n#   set -- \"${ARGS[@]}\" \"$@\"\n#\n# but POSIX shell has neither arrays nor command substitution, so instead we\n# post-process each arg (as a line of input to sed) to backslash-escape any\n# character that might be a shell metacharacter, then use eval to reverse\n# that process (while maintaining the separation between arguments), and wrap\n# the whole thing up as a single \"set\" statement.\n#\n# This will of course break if any of these variables contains a newline or\n# an unmatched quote.\n#\n\neval \"set -- $(\n        printf '%s\\n' \"$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\" |\n        xargs -n1 |\n        sed ' s~[^-[:alnum:]+,./:=@_]~\\\\&~g; ' |\n        tr '\\n' ' '\n    )\" '\"$@\"'\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\r\n@rem you may not use this file except in compliance with the License.\r\n@rem You may obtain a copy of the License at\r\n@rem\r\n@rem      https://www.apache.org/licenses/LICENSE-2.0\r\n@rem\r\n@rem Unless required by applicable law or agreed to in writing, software\r\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\r\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n@rem See the License for the specific language governing permissions and\r\n@rem limitations under the License.\r\n@rem\r\n@rem SPDX-License-Identifier: Apache-2.0\r\n@rem\r\n\r\n@if \"%DEBUG%\"==\"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\"==\"\" set DIRNAME=.\r\n@rem This is normally unused\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\r\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\"-Xmx64m\" \"-Xms64m\"\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif %ERRORLEVEL% equ 0 goto execute\r\n\r\necho. 1>&2\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2\r\necho. 1>&2\r\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\r\necho location of your Java installation. 1>&2\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto execute\r\n\r\necho. 1>&2\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2\r\necho. 1>&2\r\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\r\necho location of your Java installation. 1>&2\r\n\r\ngoto fail\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=\r\n\r\n\r\n@rem Execute Gradle\r\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" -jar \"%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\" %*\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif %ERRORLEVEL% equ 0 goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nset EXIT_CODE=%ERRORLEVEL%\r\nif %EXIT_CODE% equ 0 set EXIT_CODE=1\r\nif not \"\"==\"%GRADLE_EXIT_CONSOLE%\" exit %EXIT_CODE%\r\nexit /b %EXIT_CODE%\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "sbox.md",
    "content": "- [Определение устройства](#определение-устройства)\n  - [Устройства на Android 9](#устройства-на-android-9)\n  - [Устройства на Android 13](#устройства-на-android-13)\n- [Инструкции по настройке](#инструкции-по-настройке)\n  - [Инструкция для Android 13](#инструкция-для-android-13)\n    - [1. Включение режима разработчика](#1-включение-режима-разработчика)\n    - [2. Подключение через ADB AppControl](#2-подключение-через-adb-appcontrol)\n  - [Инструкция для Android 9](#инструкция-для-android-9)\n    - [1. Подготовка через Sber Studio](#1-подготовка-через-sber-studio)\n    - [2А. Через ADB TV (простой способ)](#2а-через-adb-tv-простой-способ)\n    - [2Б. Через компьютер](#2б-через-компьютер)\n- [Решение проблем](#решение-проблем)\n  - [ADB не включается:](#adb-не-включается)\n  - [Проблемы подключения:](#проблемы-подключения)\n- [Альтернативный метод для YouTube](#альтернативный-метод-для-youtube)\n  - [1. Настройка ByeByeDPI](#1-настройка-byebyedpi)\n  - [2. Настройка SmartTube](#2-настройка-smarttube)\n\n# Определение устройства\n\n## Устройства на Android 9\n\n- SberBox:\n  - SBDV-00001, SBDV-00002 (все модификации)\n  - SBDV-00004, SBDV-00004C\n- OKKO SmartBox (с прошивкой SberBox)\n- SberBoxTime\n- SberBoxTop\n- SberPortal\n- Sber TV (кроме моделей на Android 13)\n\n## Устройства на Android 13\n\n- SBDV-00004V (обновленный)\n- SBDV-00004Р (обновленный)\n- SBDV-00005\n- SBDV-00006 (SberBox 2)\n\n# Инструкции по настройке\n\n## Инструкция для Android 13\n\n> ⚠️ На этих устройствах работает только подключение через компьютер\n\n### 1. Включение режима разработчика\n\n- Откройте настройки Android\n- Перейдите: Настройки устройства → Об устройстве\n- Найдите **Сборка ОС** и нажмите на этот пункт несколько раз до появления сообщения об активации режима разработчика\n- Вернитесь назад и перейдите в **Для разработчиков**\n- Включите **Отладка по Wi-Fi**\n- Запомните показанные *IP-адрес* и *порт*\n\n### 2. Подключение через ADB AppControl\n\n- Установите [ADB AppControl](https://adbappcontrol.com/ru/#download) на компьютер\n- Введите *IP-адрес* и *порт* из настроек устройства\n- Нажмите на значок **Wi-Fi** для подключения\n- На вкладке **Консоль** выполните команды:\n\n```\n  shell pm grant io.github.romanvht.byedpi android.permission.WRITE_SECURE_SETTINGS\n  shell appops set io.github.romanvht.byedpi WRITE_SETTINGS allow\n  shell appops set io.github.romanvht.byedpi ACTIVATE_VPN allow\n```\n\n## Инструкция для Android 9\n\n### 1. Подготовка через Sber Studio\n\n- Войдите на [developers.sber.ru/studio](https://developers.sber.ru/studio/settings/devices) с вашим Сбер ID\n- Нажмите \"**+ добавить**\" и укажите:\n- Серийный номер (16 символов из настроек), Учтите: все буквы заглавные, O - это цифра 0\n- Тип устройства (для OKKO выберите \"OKKO Smart Box\")\n- Включите **функция ADB**\n\n### 2А. Через ADB TV (простой способ)\n\n- Установите [ADB TV](https://adbappcontrol.com/tv/download/?r=latest&lang=ru)\n- На вкладке **Консоль** выполните:\n\n```\n  pm grant io.github.romanvht.byedpi android.permission.WRITE_SECURE_SETTINGS\n  appops set io.github.romanvht.byedpi WRITE_SETTINGS allow\n  appops set io.github.romanvht.byedpi ACTIVATE_VPN allow\n```\n\n### 2Б. Через компьютер\n\n- Установите [ADB AppControl](https://adbappcontrol.com/ru/#download)\n- Введите *IP-адрес* устройства и *порт* 5555\n- На вкладке **Консоль** выполните:\n\n```\n  shell pm grant io.github.romanvht.byedpi android.permission.WRITE_SECURE_SETTINGS\n  shell appops set io.github.romanvht.byedpi WRITE_SETTINGS allow\n  shell appops set io.github.romanvht.byedpi ACTIVATE_VPN allow\n```\n\n# Решение проблем\n\n## ADB не включается:\n\n- Проверьте *тип устройства* и *серийный номер*\n- Убедитесь, что устройство в сети\n- Проверьте *Сбер ID*\n\n## Проблемы подключения:\n\n- Проверьте *IP-адрес* (может меняться)\n- Устройства должны быть в одной сети\n- Проверьте настройки роутера\n\n# Альтернативный метод для YouTube\n\n## 1. Настройка ByeByeDPI\n\n- В ByeByeDPI:\n  - Настройки (шестеренка справа вверху)\n    - Режим : *Proxy*\n    - Порт: *1080*\n  - На главном экране нажмите большую кнопку **Старт**\n\n## 2. Настройка SmartTube\n\n- Установите вариант **arm64_v8a** [SmartTube](https://github.com/yuliskov/SmartTube/releases/latest)\n- В настройках SmartTube:\n  - Общие → Интернет-цензура\n  - Включите \"Использовать веб-прокси\"\n    - Имя: *127.0.0.1*\n    - Порт: *1080*\n    - Тип: *SOCKS*\n  - Нажмите **Тест** и **ОК**\n"
  },
  {
    "path": "scripts/update_readmes.sh",
    "content": "#!/bin/bash\nset -e\n\ncontributors=$(<CONTRIBUTORS.md)\n\nfor readme in README*.md; do\n  if grep -q \"<!-- CONTRIBUTORS -->\" \"$readme\"; then\n    sed -i.bak \"/<!-- CONTRIBUTORS -->/{\n        r /dev/stdin\n        d\n    }\" \"$readme\" <<< \"$contributors\"\n    rm \"$readme.bak\"\n    echo \"$readme updated.\"\n  else\n    echo \"No marker in $readme, skipping.\"\n  fi\ndone\n"
  },
  {
    "path": "settings.gradle.kts",
    "content": "pluginManagement {\n    repositories {\n        google()\n        mavenCentral()\n        gradlePluginPortal()\n    }\n}\ndependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n    repositories {\n        google()\n        mavenCentral()\n    }\n}\n\nrootProject.name = \"ByeDpi\"\ninclude(\":app\")\n"
  }
]