├── .changeset ├── README.md └── config.json ├── .github └── workflows │ ├── ci.yml │ └── release.yml ├── .gitignore ├── .prettierignore ├── .prettierrc ├── CHANGELOG.md ├── Dockerfile ├── LICENSE ├── README.md ├── config ├── bridges.conf └── torrc ├── docker-bake.hcl ├── docker-compose.yml ├── entrypoint.sh ├── internal ├── dns.sh ├── index.sh ├── screen.sh └── tor.sh ├── kubernetes.yml ├── package.json ├── pnpm-lock.yaml └── scripts └── health /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": false, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "public", 8 | "baseBranch": "canary", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [], 11 | "privatePackages": { 12 | "version": true, 13 | "tag": true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - canary 7 | pull_request: 8 | 9 | concurrency: 10 | group: "${{ github.workflow }}-${{ github.event.number || github.sha }}" 11 | cancel-in-progress: true 12 | 13 | env: 14 | BUILD_PLATFORMS: linux/amd64,linux/arm64 15 | DOCKERHUB_SLUG: shahradel/torproxy 16 | GHCR_SLUG: ghcr.io/shahradelahi/torproxy 17 | TAG: dev 18 | 19 | permissions: 20 | contents: read 21 | packages: write 22 | 23 | jobs: 24 | lint: 25 | runs-on: ubuntu-latest 26 | steps: 27 | - uses: actions/checkout@v4 28 | - uses: pnpm/action-setup@v2 29 | with: 30 | version: 9 31 | - uses: actions/setup-node@v4 32 | with: 33 | node-version: 20 34 | cache: "pnpm" 35 | 36 | - run: pnpm install --frozen-lockfile 37 | - run: pnpm format:check 38 | 39 | image: 40 | if: github.repository == 'shahradelahi/docker-torproxy' 41 | runs-on: ubuntu-latest 42 | steps: 43 | - uses: actions/checkout@v4 44 | - uses: docker/setup-buildx-action@v3 45 | 46 | - name: Login to DockerHub 47 | if: github.event_name != 'pull_request' 48 | uses: docker/login-action@v3 49 | with: 50 | username: ${{ secrets.DOCKER_USERNAME }} 51 | password: ${{ secrets.DOCKER_PASSWORD }} 52 | 53 | - name: Login to GitHub Container Registry 54 | if: github.event_name != 'pull_request' 55 | uses: docker/login-action@v3 56 | with: 57 | registry: ghcr.io 58 | username: ${{ github.repository_owner }} 59 | password: ${{ secrets.GITHUB_TOKEN }} 60 | 61 | - name: Build & Publish 62 | uses: docker/build-push-action@v6 63 | with: 64 | cache-from: type=gha 65 | cache-to: type=gha,mode=max 66 | context: . 67 | file: ./Dockerfile 68 | push: ${{ github.event_name != 'pull_request' }} 69 | platforms: "${{ env.BUILD_PLATFORMS }}" 70 | tags: "${{ env.GHCR_SLUG }}:${{ env.TAG }},${{ env.DOCKERHUB_SLUG }}:${{ env.TAG }}" 71 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release Package 2 | 3 | on: 4 | push: 5 | branches: 6 | - canary 7 | 8 | concurrency: "${{ github.workflow }}-${{ github.ref }}" 9 | 10 | env: 11 | DOCKERHUB_SLUG: shahradel/torproxy 12 | GHCR_SLUG: ghcr.io/shahradelahi/torproxy 13 | 14 | jobs: 15 | release: 16 | if: github.repository == 'shahradelahi/docker-torproxy' 17 | runs-on: ubuntu-latest 18 | outputs: 19 | published: ${{ steps.changesets.outputs.published }} 20 | publishedPackages: ${{ steps.changesets.outputs.publishedPackages }} 21 | steps: 22 | - uses: actions/checkout@v4 23 | - uses: pnpm/action-setup@v2 24 | with: 25 | version: 9 26 | - uses: actions/setup-node@v4 27 | with: 28 | node-version: 18 29 | cache: "pnpm" 30 | 31 | - name: Install Dependencies 32 | run: pnpm install 33 | 34 | - name: Create Release Pull Request or Publish 35 | id: changesets 36 | uses: changesets/action@v1 37 | with: 38 | commit: "chore(release): version package" 39 | title: "chore(release): version package" 40 | publish: pnpm ci:publish 41 | env: 42 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 43 | 44 | build: 45 | name: Build & Publish 46 | runs-on: ubuntu-latest 47 | needs: release 48 | if: needs.release.outputs.published == 'true' 49 | strategy: 50 | fail-fast: true 51 | matrix: 52 | package: ${{ fromJson(needs.release.outputs.publishedPackages) }} 53 | steps: 54 | - uses: actions/checkout@v4 55 | - uses: docker/setup-buildx-action@v3 56 | - uses: docker/setup-qemu-action@v3 57 | 58 | - name: Login to DockerHub 59 | uses: docker/login-action@v3 60 | with: 61 | username: ${{ secrets.DOCKER_USERNAME }} 62 | password: ${{ secrets.DOCKER_PASSWORD }} 63 | 64 | - name: Login to GitHub Container Registry 65 | uses: docker/login-action@v3 66 | with: 67 | registry: ghcr.io 68 | username: ${{ github.repository_owner }} 69 | password: ${{ secrets.GITHUB_TOKEN }} 70 | 71 | - name: Docker meta 72 | id: meta 73 | uses: docker/metadata-action@v5 74 | with: 75 | images: | 76 | ${{ env.DOCKERHUB_SLUG }} 77 | ${{ env.GHCR_SLUG }} 78 | tags: | 79 | type=semver,pattern={{version}},value=${{ matrix.package.version }} 80 | 81 | - name: Build and push 82 | uses: docker/bake-action@v5 83 | with: 84 | files: | 85 | ./docker-bake.hcl 86 | ${{ steps.meta.outputs.bake-file }} 87 | targets: image-all 88 | push: true 89 | 90 | - name: Check manifest 91 | run: | 92 | docker buildx imagetools inspect ${{ env.DOCKERHUB_SLUG }}:${{ steps.meta.outputs.version }} 93 | docker buildx imagetools inspect ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }} 94 | 95 | - name: Inspect image 96 | run: | 97 | docker pull ${{ env.DOCKERHUB_SLUG }}:${{ steps.meta.outputs.version }} 98 | docker image inspect ${{ env.DOCKERHUB_SLUG }}:${{ steps.meta.outputs.version }} 99 | docker pull ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }} 100 | docker image inspect ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }} 101 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .ignore 3 | node_modules 4 | .env 5 | .env.* 6 | !.env.example 7 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | .env.* 4 | !.env.example 5 | .changeset 6 | 7 | # Ignore files for PNPM, NPM and YARN 8 | pnpm-lock.yaml 9 | package-lock.json 10 | yarn.lock 11 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/prettierrc", 3 | "useTabs": false, 4 | "semi": true, 5 | "printWidth": 100, 6 | "overrides": [ 7 | { 8 | "files": "*.md", 9 | "options": { 10 | "parser": "markdown", 11 | "printWidth": 79 12 | } 13 | }, 14 | { 15 | "files": "Dockerfile", 16 | "options": { 17 | "spaceRedirects": false 18 | } 19 | } 20 | ], 21 | "plugins": ["prettier-plugin-sh"] 22 | } 23 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # docker-torproxy 2 | 3 | ## 1.0.3 4 | 5 | ### Patch Changes 6 | 7 | - 55ecd32: fix: hashing control port password 8 | - c243b19: fix: escape environment variables in sed command 9 | 10 | ## 1.0.2 11 | 12 | ### Patch Changes 13 | 14 | - 0011868: Fixed a few minor issues and updated dependencies 15 | 16 | ## 1.0.1 17 | 18 | ### Patch Changes 19 | 20 | - f1ebb03: fix: file permissions and default tor user 21 | 22 | ## 1.0.0 23 | 24 | ### Major Changes 25 | 26 | - 68c9209: feat: using `Lyrebird`, `Meek`, and `Snowflake` pluggable transports 27 | 28 | ### Minor Changes 29 | 30 | - 68c9209: feat: create DNS server on port 53 that goes through Tor network 31 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ARG ALPINE_VERSION=3.19 2 | ARG GOST_VERSION=3.0.0-rc10 3 | ARG LYREBIRD_VERSION=0.3.0 4 | ARG MEEK_VERSION=0.38.0 5 | ARG SNOWFLAKE_VERSION=2.9.2 6 | 7 | FROM --platform=${BUILDPLATFORM} gogost/gost:${GOST_VERSION} AS gost 8 | FROM --platform=${BUILDPLATFORM} alpine:${ALPINE_VERSION} AS alpine 9 | ENV TZ=UTC 10 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ >/etc/timezone 11 | RUN apk update \ 12 | && apk upgrade \ 13 | && rm -rf /var/cache/apk/* 14 | 15 | FROM --platform=${BUILDPLATFORM} golang:alpine AS pluggables 16 | ARG LYREBIRD_VERSION 17 | ARG MEEK_VERSION 18 | ARG SNOWFLAKE_VERSION 19 | RUN apk update \ 20 | && apk upgrade \ 21 | && apk add -U --no-cache \ 22 | git \ 23 | bash \ 24 | make \ 25 | && rm -rf /var/cache/apk/* 26 | SHELL ["/bin/bash", "-c"] 27 | RUN </etc/crontabs/root 96 | 97 | HEALTHCHECK --interval=60s --timeout=5s --start-period=20s --retries=3 \ 98 | CMD health | grep -q 'OK' 99 | VOLUME ["/etc/torrc.d", "/var/lib/tor"] 100 | ENTRYPOINT ["/entrypoint.sh"] 101 | CMD ["-L", "socks://:1080", "-L", "http://:8080"] 102 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker TorProxy 2 | 3 | > A stable version of Tor for with tools for creating a proxy server. 4 | 5 | --- 6 | 7 | - [Features](#features) 8 | - [Build locally](#build-locally) 9 | - [Image](#image) 10 | - [Environment variables](#environment-variables) 11 | - [Ports](#ports) 12 | - [Usage](#usage) 13 | - [Docker Compose](#docker-compose) 14 | - [Kubernetes](#kubernetes) 15 | - [Command line](#command-line) 16 | - [Testing](#testing) 17 | - [Upgrade](#upgrade) 18 | - [Tor Control Port](#tor-control-port) 19 | - [Contributing](#contributing) 20 | - [License](#license) 21 | 22 | ## Features 23 | 24 | - Support for a variety of proxy servers (`Socks5`, `HTTP`, `Shadowsocks` and more) 25 | - Preinstalled the popular `Lyrebird`, `Meek`, and `Snowflake` pluggable transports 26 | - Default use of Tor DNS resolver 27 | - Multi-platform image 28 | 29 | ## Build locally 30 | 31 | Build time can time up to 10 minutes, depending on your system. 32 | 33 | ```shell 34 | git clone https://github.com/shahradelahi/docker-torproxy 35 | cd docker-torproxy 36 | 37 | # Build image and output to docker (default) 38 | docker buildx bake 39 | 40 | # Build multi-platform image 41 | docker buildx bake image-all 42 | ``` 43 | 44 | ## Image 45 | 46 | | Registry | Image | 47 | | ------------------------------------------------------------------------------------------------------ | ------------------------------- | 48 | | [Docker Hub](https://hub.docker.com/r/shahradel/torproxy/) | `shahradel/torproxy` | 49 | | [GitHub Container Registry](https://github.com/users/shahradelahi/packages/container/package/torproxy) | `ghcr.io/shahradelahi/torproxy` | 50 | 51 | Following platforms for this image are available: 52 | 53 | ``` 54 | $ docker run --rm mplatform/mquery shahradel/torproxy:latest 55 | Image: shahradel/torproxy:latest 56 | * Manifest List: Yes 57 | * Supported platforms: 58 | - linux/amd64 59 | - linux/arm/v6 60 | - linux/arm/v7 61 | - linux/arm64 62 | - linux/386 63 | - linux/s390x 64 | ``` 65 | 66 | ## Ports 67 | 68 | This section depend on your configuration but for the most part, the default ports are: 69 | 70 | - `53`: Tor DNS 71 | - `1080`: `Socks5` proxy 72 | - `8080`: `HTTP` proxy 73 | 74 | ## Environment variables 75 | 76 | To configure the Tor config file you can mount the configs to `/etc/tor/torrc.d` directory or prefix the environment 77 | variables with `TOR_`. For example, if you can set SocksPort option you have to add `TOR_SOCKS_PORT=1080` to the 78 | environment variables. 79 | 80 | | Option | Description | 81 | | -------------------- | ------------------------------------------------------------------ | 82 | | `TOR_CONTROL_PASSWD` | Automatically will be hashed and used as password of control port. | 83 | | `TOR_*` | For configuring the Tor config file. | 84 | 85 | > 💡 For more information about Tor config file see [Offical Tor Manual](https://2019.www.torproject.org/docs/tor-manual.html.en). 86 | 87 | ## Usage 88 | 89 | ### Docker Compose 90 | 91 | Docker compose is the recommended way to run this image. You can use the following 92 | [docker compose template](docker-compose.yml), then run the container: 93 | 94 | ```bash 95 | docker compose up -d 96 | docker compose logs -f 97 | ``` 98 | 99 | ### Kubernetes 100 | 101 | To install on a Kubernetes cluster, you can use the following [kubernetes deployment template](kubernetes.yml), then create the deployment: 102 | 103 | ```bash 104 | kubectl apply -f kubernetes.yml 105 | ``` 106 | 107 | ### Command line 108 | 109 | By default, the image is started with two password-less `socks5` and `http` proxies and image can be run by a minimal 110 | command: 111 | 112 | ```bash 113 | $ docker run -d --name torproxy \ 114 | -p 1080:1080 -p 8080:8080 \ 115 | shahradel/torproxy 116 | ``` 117 | 118 | To configure the proxy servers you can add flags to the command: 119 | 120 | ```bash 121 | $ docker run -d --name torproxy \ 122 | -p 1080:1080 -p 8080:8080 -p 8338:8338 \ 123 | shahradel/torproxy \ 124 | -L "http://:8080" \ 125 | -L "socks5://:@:1080" \ 126 | -L "ss://AES-256-CFB::@:8338" 127 | ``` 128 | 129 | ### Testing 130 | 131 | ```bash 132 | # Socks5 133 | curl -x socks5://localhost:1080 https://check.torproject.org/api/ip 134 | 135 | # HTTP 136 | curl -x http://localhost:8080 https://check.torproject.org/api/ip 137 | ``` 138 | 139 | ## Upgrade 140 | 141 | Recreate the container whenever I push an update: 142 | 143 | ```bash 144 | docker compose pull 145 | docker compose up -d 146 | ``` 147 | 148 | ## Tor Control Port 149 | 150 | By default, the control port is not exposed and for security reasons, it can be enabled by setting 151 | the `TOR_CONTROL_PORT` and `TOR_HASHED_CONTROL_PASSWORD` environment variables. 152 | 153 | ```bash 154 | $ docker run -d --name torproxy \ 155 | -p 9060:9060 \ 156 | -e TOR_CONTROL_PORT=9060 \ 157 | -e TOR_CONTROL_PASSWD="super-secure-password" \ 158 | shahradel/torproxy 159 | ``` 160 | 161 | Now tor control port is available on port `9060` and you can use tools such as [nyx](https://nyx.torproject.org/) to 162 | monitor the tor instance. 163 | 164 | ```bash 165 | $ docker exec -it torproxy nyx -i 9060 166 | ``` 167 | 168 | ## Contributing 169 | 170 | Want to contribute? Awesome! To show your support is to star the project, or to raise issues 171 | on [GitHub](https://github.com/shahradelahi/docker-torproxy). 172 | 173 | Thanks again for your support, it is much appreciated! 🙏 174 | 175 | ## License 176 | 177 | [GPL-3.0](/LICENSE) © [Shahrad Elahi](https://github.com/shahradelahi) 178 | -------------------------------------------------------------------------------- /config/bridges.conf: -------------------------------------------------------------------------------- 1 | Bridge obfs4 192.95.36.142:443 CDF2E852BF539B82BD10E27E9115A31734E378C2 cert=qUVQ0srL1JI/vO6V6m/24anYXiJD3QP2HgzUKQtQ7GRqqUvs7P+tG43RtAqdhLOALP7DJQ iat-mode=1 2 | Bridge obfs4 209.148.46.65:443 74FAD13168806246602538555B5521A0383A1875 cert=ssH+9rP8dG2NLDN2XuFw63hIO/9MNNinLmxQDpVa+7kTOa9/m+tGWT1SmSYpQ9uTBGa6Hw iat-mode=0 3 | Bridge obfs4 193.11.166.194:27020 86AC7B8D430DAC4117E9F42C9EAED18133863AAF cert=0LDeJH4JzMDtkJJrFphJCiPqKx7loozKN7VNfuukMGfHO0Z8OGdzHVkhVAOfo1mUdv9cMg iat-mode=0 4 | Bridge obfs4 146.57.248.225:22 10A6CD36A537FCE513A322361547444B393989F0 cert=K1gDtDAIcUfeLqbstggjIw2rtgIKqdIhUlHp82XRqNSq/mtAjp1BIC9vHKJ2FAEpGssTPw iat-mode=0 5 | Bridge obfs4 85.31.186.26:443 91A6354697E6B02A386312F68D82CF86824D3606 cert=PBwr+S8JTVZo6MPdHnkTwXJPILWADLqfMGoVvhZClMq/Urndyd42BwX9YFJHZnBB3H0XCw iat-mode=0 6 | Bridge obfs4 193.11.166.194:27025 1AE2C08904527FEA90C4C4F8C1083EA59FBC6FAF cert=ItvYZzW5tn6v3G4UnQa6Qz04Npro6e81AP70YujmK/KXwDFPTs3aHXcHp4n8Vt6w/bv8cA iat-mode=0 7 | Bridge obfs4 51.222.13.177:80 5EDAC3B810E12B01F6FD8050D2FD3E277B289A08 cert=2uplIpLQ0q9+0qMFrK5pkaYRDOe460LL9WHBvatgkuRr/SL31wBOEupaMMJ6koRE6Ld0ew iat-mode=0 8 | Bridge obfs4 104.248.160.91:2222 A325B20EFB810998C288AC1A0FD6A436A9FEB315 cert=S58sPEqveRCFfV9zkWBaqAyM5hX3eHKZ62kNdbGGfvcYPY2K93KDIkeCpTcfDgYk08rNcQ iat-mode=0 9 | Bridge obfs4 85.31.186.98:443 011F2599C0E9B27EE74B353155E244813763C3E5 cert=ayq0XzCwhpdysn5o0EyDUbmSOx3X/oTEbzDMvczHOdBJKlvIdHHLJGkZARtT4dcBFArPPg iat-mode=0 10 | Bridge obfs4 37.218.245.14:38224 D9A82D2F9C2F65A18407B1D2B764F130847F8B5D cert=bjRaMrr1BRiAW8IE9U5z27fQaYgOhX1UCmOpg2pFpoMvo6ZgQMzLsaTzzQNTlm7hNcb+Sg iat-mode=0 11 | Bridge obfs4 31.18.117.18:9899 13BD8D1786AB84231D2630840142E81B0DDDAD19 cert=E31AG94vkhaX3Wc8X3Q/jy93q9bAXnzJsAAYY4yOgt7aTmtnfDf8/DJxyx37CTKYOaEJGw iat-mode=0 12 | Bridge obfs4 86.88.234.28:50001 DE6145637D189CEBF7B052DFC111A511B2BE8072 cert=FXAneGUETzpaw5oxNqO1Wi3EWLBSgbeIN0Z8GVFxromPutq6JkduMpzzvbQpyfYcGYjyJw iat-mode=0 13 | Bridge obfs4 65.108.214.170:23909 8ABD0C0130A37EB3F686F883BCE6D5E59F66C228 cert=mJZdHhaAk6VzaOjQA1UWGkVbDbGqLRuNSuBSk0evlfKRKVzb2EmNio2N0ja+JG1to8KWYw iat-mode=0 14 | Bridge obfs4 92.243.27.238:46311 2E5DC5F2632535630E87883262F967DA376700E2 cert=1BAr2DKmCPxel2DTMXKyOQgoxHM2q6SqJ0tDrZdlyCCrBXhJhsGCICWWZpBEuVB6bdMVWA iat-mode=0 15 | 16 | -------------------------------------------------------------------------------- /config/torrc: -------------------------------------------------------------------------------- 1 | ## Configuration file for a typical Tor user 2 | ## Last updated 28 February 2019 for Tor 0.3.5.1-alpha. 3 | ## (may or may not work for much older or much newer versions of Tor.) 4 | ## 5 | ## Lines that begin with "## " try to explain what's going on. Lines 6 | ## that begin with just "#" are disabled commands: you can enable them 7 | ## by removing the "#" symbol. 8 | ## 9 | ## See 'man tor', or https://www.torproject.org/docs/tor-manual.html, 10 | ## for more options you can use in this file. 11 | ## 12 | ## Tor will look for this file in various places based on your platform: 13 | ## https://support.torproject.org/tbb/tbb-editing-torrc/ 14 | 15 | ## Tor opens a SOCKS proxy on port 9050 by default -- even if you don't 16 | ## configure one below. Set "SOCKSPort 0" if you plan to run Tor only 17 | ## as a relay, and not make any local application connections yourself. 18 | #SOCKSPort 9050 # Default: Bind to localhost:9050 for local connections. 19 | #SOCKSPort 192.168.0.1:9100 # Bind to this address:port too. 20 | 21 | ## Entry policies to allow/deny SOCKS requests based on IP address. 22 | ## First entry that matches wins. If no SOCKSPolicy is set, we accept 23 | ## all (and only) requests that reach a SOCKSPort. Untrusted users who 24 | ## can access your SOCKSPort may be able to learn about the connections 25 | ## you make. 26 | #SOCKSPolicy accept 192.168.0.0/16 27 | #SOCKSPolicy accept6 FC00::/7 28 | #SOCKSPolicy reject * 29 | 30 | ## Logs go to stdout at level "notice" unless redirected by something 31 | ## else, like one of the below lines. You can have as many Log lines as 32 | ## you want. 33 | ## 34 | ## We advise using "notice" in most cases, since anything more verbose 35 | ## may provide sensitive information to an attacker who obtains the logs. 36 | ## 37 | ## Send all messages of level 'notice' or higher to @LOCALSTATEDIR@/log/tor/notices.log 38 | #Log notice file @LOCALSTATEDIR@/log/tor/notices.log 39 | ## Send every possible message to @LOCALSTATEDIR@/log/tor/debug.log 40 | #Log debug file @LOCALSTATEDIR@/log/tor/debug.log 41 | ## Use the system log instead of Tor's logfiles 42 | #Log notice syslog 43 | ## To send all messages to stderr: 44 | #Log debug stderr 45 | 46 | ## Uncomment this to start the process in the background... or use 47 | ## --runasdaemon 1 on the command line. This is ignored on Windows; 48 | ## see the FAQ entry if you want Tor to run as an NT service. 49 | #RunAsDaemon 1 50 | 51 | ## The directory for keeping all the keys/etc. By default, we store 52 | ## things in $HOME/.tor on Unix, and in Application Data\tor on Windows. 53 | #DataDirectory @LOCALSTATEDIR@/lib/tor 54 | 55 | ## The port on which Tor will listen for local connections from Tor 56 | ## controller applications, as documented in control-spec.txt. 57 | #ControlPort 9051 58 | ## If you enable the controlport, be sure to enable one of these 59 | ## authentication methods, to prevent attackers from accessing it. 60 | #HashedControlPassword 16:872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C 61 | #CookieAuthentication 1 62 | 63 | ############### This section is just for location-hidden services ### 64 | 65 | ## Once you have configured a hidden service, you can look at the 66 | ## contents of the file ".../hidden_service/hostname" for the address 67 | ## to tell people. 68 | ## 69 | ## HiddenServicePort x y:z says to redirect requests on port x to the 70 | ## address y:z. 71 | 72 | #HiddenServiceDir @LOCALSTATEDIR@/lib/tor/hidden_service/ 73 | #HiddenServicePort 80 127.0.0.1:80 74 | 75 | #HiddenServiceDir @LOCALSTATEDIR@/lib/tor/other_hidden_service/ 76 | #HiddenServicePort 80 127.0.0.1:80 77 | #HiddenServicePort 22 127.0.0.1:22 78 | 79 | ################ This section is just for relays ##################### 80 | # 81 | ## See https://community.torproject.org/relay for details. 82 | 83 | ## Required: what port to advertise for incoming Tor connections. 84 | #ORPort 9001 85 | ## If you want to listen on a port other than the one advertised in 86 | ## ORPort (e.g. to advertise 443 but bind to 9090), you can do it as 87 | ## follows. You'll need to do ipchains or other port forwarding 88 | ## yourself to make this work. 89 | #ORPort 443 NoListen 90 | #ORPort 127.0.0.1:9090 NoAdvertise 91 | ## If you want to listen on IPv6 your numeric address must be explicitly 92 | ## between square brackets as follows. You must also listen on IPv4. 93 | #ORPort [2001:DB8::1]:9050 94 | 95 | ## The IP address or full DNS name for incoming connections to your 96 | ## relay. Leave commented out and Tor will guess. 97 | #Address noname.example.com 98 | 99 | ## If you have multiple network interfaces, you can specify one for 100 | ## outgoing traffic to use. 101 | ## OutboundBindAddressExit will be used for all exit traffic, while 102 | ## OutboundBindAddressOR will be used for all OR and Dir connections 103 | ## (DNS connections ignore OutboundBindAddress). 104 | ## If you do not wish to differentiate, use OutboundBindAddress to 105 | ## specify the same address for both in a single line. 106 | #OutboundBindAddressExit 10.0.0.4 107 | #OutboundBindAddressOR 10.0.0.5 108 | 109 | ## A handle for your relay, so people don't have to refer to it by key. 110 | ## Nicknames must be between 1 and 19 characters inclusive, and must 111 | ## contain only the characters [a-zA-Z0-9]. 112 | ## If not set, "Unnamed" will be used. 113 | #Nickname ididnteditheconfig 114 | 115 | ## Define these to limit how much relayed traffic you will allow. Your 116 | ## own traffic is still unthrottled. Note that RelayBandwidthRate must 117 | ## be at least 75 kilobytes per second. 118 | ## Note that units for these config options are bytes (per second), not 119 | ## bits (per second), and that prefixes are binary prefixes, i.e. 2^10, 120 | ## 2^20, etc. 121 | #RelayBandwidthRate 100 KBytes # Throttle traffic to 100KB/s (800Kbps) 122 | #RelayBandwidthBurst 200 KBytes # But allow bursts up to 200KB (1600Kb) 123 | 124 | ## Use these to restrict the maximum traffic per day, week, or month. 125 | ## Note that this threshold applies separately to sent and received bytes, 126 | ## not to their sum: setting "40 GB" may allow up to 80 GB total before 127 | ## hibernating. 128 | ## 129 | ## Set a maximum of 40 gigabytes each way per period. 130 | #AccountingMax 40 GBytes 131 | ## Each period starts daily at midnight (AccountingMax is per day) 132 | #AccountingStart day 00:00 133 | ## Each period starts on the 3rd of the month at 15:00 (AccountingMax 134 | ## is per month) 135 | #AccountingStart month 3 15:00 136 | 137 | ## Administrative contact information for this relay or bridge. This line 138 | ## can be used to contact you if your relay or bridge is misconfigured or 139 | ## something else goes wrong. Note that we archive and publish all 140 | ## descriptors containing these lines and that Google indexes them, so 141 | ## spammers might also collect them. You may want to obscure the fact that 142 | ## it's an email address and/or generate a new address for this purpose. 143 | ## 144 | ## If you are running multiple relays, you MUST set this option. 145 | ## 146 | #ContactInfo Random Person 147 | ## You might also include your PGP or GPG fingerprint if you have one: 148 | #ContactInfo 0xFFFFFFFF Random Person 149 | 150 | ## Uncomment this to mirror directory information for others. Please do 151 | ## if you have enough bandwidth. 152 | #DirPort 9030 # what port to advertise for directory connections 153 | ## If you want to listen on a port other than the one advertised in 154 | ## DirPort (e.g. to advertise 80 but bind to 9091), you can do it as 155 | ## follows. below too. You'll need to do ipchains or other port 156 | ## forwarding yourself to make this work. 157 | #DirPort 80 NoListen 158 | #DirPort 127.0.0.1:9091 NoAdvertise 159 | ## Uncomment to return an arbitrary blob of html on your DirPort. Now you 160 | ## can explain what Tor is if anybody wonders why your IP address is 161 | ## contacting them. See contrib/tor-exit-notice.html in Tor's source 162 | ## distribution for a sample. 163 | #DirPortFrontPage @CONFDIR@/tor-exit-notice.html 164 | 165 | ## Uncomment this if you run more than one Tor relay, and add the identity 166 | ## key fingerprint of each Tor relay you control, even if they're on 167 | ## different networks. You declare it here so Tor clients can avoid 168 | ## using more than one of your relays in a single circuit. See 169 | ## https://support.torproject.org/relay-operators/multiple-relays/ 170 | ## However, you should never include a bridge's fingerprint here, as it would 171 | ## break its concealability and potentially reveal its IP/TCP address. 172 | ## 173 | ## If you are running multiple relays, you MUST set this option. 174 | ## 175 | ## Note: do not use MyFamily on bridge relays. 176 | #MyFamily $keyid,$keyid,... 177 | 178 | ## Uncomment this if you want your relay to be an exit, with the default 179 | ## exit policy (or whatever exit policy you set below). 180 | ## (If ReducedExitPolicy, ExitPolicy, or IPv6Exit are set, relays are exits. 181 | ## If none of these options are set, relays are non-exits.) 182 | #ExitRelay 1 183 | 184 | ## Uncomment this if you want your relay to allow IPv6 exit traffic. 185 | ## (Relays do not allow any exit traffic by default.) 186 | #IPv6Exit 1 187 | 188 | ## Uncomment this if you want your relay to be an exit, with a reduced set 189 | ## of exit ports. 190 | #ReducedExitPolicy 1 191 | 192 | ## Uncomment these lines if you want your relay to be an exit, with the 193 | ## specified set of exit IPs and ports. 194 | ## 195 | ## A comma-separated list of exit policies. They're considered first 196 | ## to last, and the first match wins. 197 | ## 198 | ## If you want to allow the same ports on IPv4 and IPv6, write your rules 199 | ## using accept/reject *. If you want to allow different ports on IPv4 and 200 | ## IPv6, write your IPv6 rules using accept6/reject6 *6, and your IPv4 rules 201 | ## using accept/reject *4. 202 | ## 203 | ## If you want to _replace_ the default exit policy, end this with either a 204 | ## reject *:* or an accept *:*. Otherwise, you're _augmenting_ (prepending to) 205 | ## the default exit policy. Leave commented to just use the default, which is 206 | ## described in the man page or at 207 | ## https://support.torproject.org/relay-operators 208 | ## 209 | ## Look at https://support.torproject.org/abuse/exit-relay-expectations/ 210 | ## for issues you might encounter if you use the default exit policy. 211 | ## 212 | ## If certain IPs and ports are blocked externally, e.g. by your firewall, 213 | ## you should update your exit policy to reflect this -- otherwise Tor 214 | ## users will be told that those destinations are down. 215 | ## 216 | ## For security, by default Tor rejects connections to private (local) 217 | ## networks, including to the configured primary public IPv4 and IPv6 addresses, 218 | ## and any public IPv4 and IPv6 addresses on any interface on the relay. 219 | ## See the man page entry for ExitPolicyRejectPrivate if you want to allow 220 | ## "exit enclaving". 221 | ## 222 | #ExitPolicy accept *:6660-6667,reject *:* # allow irc ports on IPv4 and IPv6 but no more 223 | #ExitPolicy accept *:119 # accept nntp ports on IPv4 and IPv6 as well as default exit policy 224 | #ExitPolicy accept *4:119 # accept nntp ports on IPv4 only as well as default exit policy 225 | #ExitPolicy accept6 *6:119 # accept nntp ports on IPv6 only as well as default exit policy 226 | #ExitPolicy reject *:* # no exits allowed 227 | 228 | ## Bridge relays (or "bridges") are Tor relays that aren't listed in the 229 | ## main directory. Since there is no complete public list of them, even an 230 | ## ISP that filters connections to all the known Tor relays probably 231 | ## won't be able to block all the bridges. Also, websites won't treat you 232 | ## differently because they won't know you're running Tor. If you can 233 | ## be a real relay, please do; but if not, be a bridge! 234 | ## 235 | ## Warning: when running your Tor as a bridge, make sure than MyFamily is 236 | ## NOT configured. 237 | #BridgeRelay 1 238 | ## By default, Tor will advertise your bridge to users through various 239 | ## mechanisms like https://bridges.torproject.org/. If you want to run 240 | ## a private bridge, for example because you'll give out your bridge 241 | ## address manually to your friends, uncomment this line: 242 | #BridgeDistribution none 243 | 244 | ## Configuration options can be imported from files or folders using the %include 245 | ## option with the value being a path. This path can have wildcards. Wildcards are 246 | ## expanded first, using lexical order. Then, for each matching file or folder, the following 247 | ## rules are followed: if the path is a file, the options from the file will be parsed as if 248 | ## they were written where the %include option is. If the path is a folder, all files on that 249 | ## folder will be parsed following lexical order. Files starting with a dot are ignored. Files 250 | ## on subfolders are ignored. 251 | ## The %include option can be used recursively. 252 | #%include /etc/torrc.d/*.conf -------------------------------------------------------------------------------- /docker-bake.hcl: -------------------------------------------------------------------------------- 1 | variable "DEFAULT_TAG" { 2 | default = "torproxy:local" 3 | } 4 | 5 | // Special target: https://github.com/docker/metadata-action#bake-definition 6 | target "docker-metadata-action" { 7 | tags = ["${DEFAULT_TAG}"] 8 | } 9 | 10 | // Default target if none specified 11 | group "default" { 12 | targets = ["image-local"] 13 | } 14 | 15 | target "image" { 16 | inherits = ["docker-metadata-action"] 17 | } 18 | 19 | target "image-local" { 20 | inherits = ["image"] 21 | output = ["type=docker"] 22 | } 23 | 24 | target "image-all" { 25 | inherits = ["image"] 26 | platforms = [ 27 | "linux/amd64", 28 | "linux/arm/v6", 29 | "linux/arm/v7", 30 | "linux/arm64", 31 | "linux/386", 32 | "linux/s390x" 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | cfw-proxy: 3 | image: ghcr.io/shahradelahi/torproxy 4 | container_name: torproxy 5 | restart: unless-stopped 6 | volumes: 7 | - persist-data:/var/lib/tor 8 | ports: 9 | - "1080:1080" 10 | - "8080:8080" 11 | - "8338:8338" 12 | # - "53:53/udp" 13 | # - "53:53/tcp" 14 | command: 15 | - -L="http://:8080" 16 | - -L="socks5://username:secure-password@:1080" 17 | - -L="ss://aes-256-cfb:secure-password@:8338" 18 | 19 | volumes: 20 | persist-data: 21 | driver: local 22 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | [ -n "$DEBUG" ] && set -x 5 | 6 | source /etc/torproxy/internal/index.sh 7 | setup_logrotate 8 | 9 | if [ "${1}" = 'nyx' ]; then 10 | shift 11 | exec nyx "$@" 12 | fi 13 | 14 | screen -wipe &> /dev/null || true 15 | 16 | if [ ! -f "$TOR_CONFIG" ]; then 17 | generate_tor_config 18 | else 19 | log NOTICE "Using existing tor config file at $TOR_CONFIG" 20 | fi 21 | load_tor_env 22 | setup_dns 23 | 24 | sleep 1 25 | echo -e "\n======================== Versions ========================" 26 | echo -e "Alpine: \c" && cat /etc/alpine-release 27 | echo -e "Tor: \c" && tor --version | head -n 1 | awk '{print $3}' | sed 's/.$//' 28 | echo -e "Lyrebird: \c" && lyrebird -version 29 | echo -e "Meek: \c" && echo -e "${MEEK_VERSION:-N/A}" 30 | echo -e "Snowflake: \c" && snowflake-client -version &> ver && head -n 1 ver | awk '{print $2}' && rm ver 31 | echo -e "Gost: \c" && gost -V | cut -d' ' -f2 32 | echo -e "Nyx: \c" && nyx --version | head -n 1 | awk '{print $3}' 33 | echo -e "\n======================= Tor Config =======================" 34 | grep -v "^#" "$TOR_CONFIG" | grep -v "^$" 35 | echo -e "==========================================================\n" 36 | sleep 1 37 | 38 | exec bash -c "(trap 'kill 0' SIGINT EXIT; (tor -f $TOR_CONFIG) & (gost -F=socks5://127.0.0.1:$(current_socks_port) $*) &> /var/log/gogost/gogost.log)" 39 | -------------------------------------------------------------------------------- /internal/dns.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DNSMASQ_CONFIG=/etc/dnsmasq.d/tor-dns.conf 4 | 5 | setup_dns() { 6 | local _TOR_DNS_PORT="$(get_torrc_option "DNSPort")" 7 | if [ -z "$_TOR_DNS_PORT" ]; then 8 | log ERROR "DNSPort is not set in ${TOR_CONFIG}" 9 | exit 1 10 | fi 11 | 12 | if echo "$_TOR_DNS_PORT" | grep -q ":"; then 13 | _TOR_DNS_PORT="$(echo "$_TOR_DNS_PORT" | awk -F: '{print $2}')" 14 | fi 15 | 16 | # DNS must be a number 17 | if ! [[ "$_TOR_DNS_PORT" =~ ^[0-9]+$ ]]; then 18 | log ERROR "DNSPort options is malformed." 19 | exit 1 20 | fi 21 | 22 | log NOTICE "Setting up Dnsmasq to use Tor DNS on port ${_TOR_DNS_PORT}" 23 | 24 | _IFACE="$(ip route show default | awk '/default/ {print $5}')" 25 | 26 | tee /etc/resolv.conf &> /dev/null << EOF 27 | # Generated by TorProxy; DO NOT EDIT 28 | nameserver 127.0.0.1 29 | option allow-domains *.onion 30 | search . 31 | EOF 32 | 33 | tee "$DNSMASQ_CONFIG" &> /dev/null << EOF 34 | pid-file=/var/run/dnsmasq.pid 35 | interface=${_IFACE} 36 | user=dnsmasq 37 | group=dnsmasq 38 | bind-dynamic 39 | no-resolv 40 | no-poll 41 | no-negcache 42 | bogus-priv 43 | domain-needed 44 | cache-size=1500 45 | min-port=4096 46 | server=127.0.0.1#${_TOR_DNS_PORT} 47 | server=::1#${_TOR_DNS_PORT} 48 | log-facility=/var/log/dnsmasq/dnsmasq.log 49 | EOF 50 | mkdir -p /var/log/dnsmasq 51 | uown dnsmasq /var/log/dnsmasq 52 | dnsmasq 53 | } 54 | -------------------------------------------------------------------------------- /internal/index.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source /etc/torproxy/internal/screen.sh 4 | source /etc/torproxy/internal/tor.sh 5 | source /etc/torproxy/internal/dns.sh 6 | 7 | function uppercase() { 8 | echo "$1" | tr '[:lower:]' '[:upper:]' 9 | } 10 | 11 | # convert screaming snake case to camel case 12 | function to_camel_case() { 13 | echo "${1}" | awk -F_ '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) tolower(substr($i,2));}1' OFS="" 14 | } 15 | 16 | function sed_escape() { 17 | echo "$1" | sed -e 's/[\/&]/\\&/g' 18 | } 19 | 20 | function uown() { 21 | _UID="$(id -u "$1")" 22 | chown -R "$_UID":"$_UID" "$2" 23 | } 24 | 25 | function log() { 26 | # Feb 20 16:48:35 UTC [notice] message 27 | echo -e "$(date +"%b %d %H:%M:%S %Z") [$(uppercase "$1")] $2" 28 | } 29 | 30 | function setup_logrotate() { 31 | tee "/etc/logrotate.d/rotator" &> /dev/null << EOF 32 | /var/log/dnsmasq/dnsmasq.log 33 | /var/log/gogost/*.log { 34 | size 1M 35 | rotate 3 36 | missingok 37 | notifempty 38 | create 0640 root adm 39 | copytruncate 40 | } 41 | EOF 42 | crond 43 | } 44 | -------------------------------------------------------------------------------- /internal/screen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | kill_screen() { 4 | local _screenName="$1" 5 | if screen -list | grep -qE "\.$_screenName\t"; then 6 | log NOTICE "Killing screen session $_screenName" 7 | screen -S "$(screen -ls | grep -E "\.$_screenName\t" | awk '{print $1}')" -X quit 8 | fi 9 | } 10 | -------------------------------------------------------------------------------- /internal/tor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TOR_CONFIG_DIR="${TOR_CONFIG_DIR:-/etc/tor}" 4 | TOR_CONFIG="${TOR_CONFIG_DIR}/torrc" 5 | 6 | generate_tor_config() { 7 | tee "$TOR_CONFIG" &> /dev/null << EOF 8 | ####### AUTO-GENERATED FILE, DO NOT EDIT ####### 9 | 10 | VirtualAddrNetwork ${TOR_VIRTUAL_ADDR_NETWORK:-10.192.0.0/10} 11 | #AutomapHostsOnResolve 1 12 | AutomapHostsOnResolve ${TOR_AUTOMAP_HOSTS_ON_RESOLVE:-1} 13 | 14 | #SOCKSPort 9050 # Default: Bind to localhost:9050 for local connections. 15 | #SOCKSPort 192.168.0.1:9100 # Bind to this address:port too. 16 | SOCKSPort ${TOR_SOCKS_PORT:-59050} 17 | 18 | #SOCKSPolicy accept 192.168.0.0/16 19 | #SOCKSPolicy accept6 FC00::/7 20 | #SOCKSPolicy reject * 21 | ${TOR_SOCKS_POLICY:+SOCKSPolicy $TOR_SOCKS_POLICY} 22 | 23 | #HTTPTunnelPort 80 24 | HTTPTunnelPort ${TOR_HTTP_TUNNEL_PORT:-58118} 25 | 26 | #DNSPort 53 27 | DNSPort ${TOR_DNS_PORT:-53530} 28 | 29 | #TransPort 9040 30 | TransPort ${TOR_TRANS_PORT:-58119} 31 | 32 | #Log notice file @LOCALSTATEDIR@/log/tor/notices.log 33 | #Log debug file @LOCALSTATEDIR@/log/tor/debug.log 34 | #Log notice syslog 35 | #Log debug stderr 36 | ${TOR_LOG_LEVEL:+Log $TOR_LOG_LEVEL} 37 | 38 | #RunAsDaemon 1 39 | ${TOR_RUN_AS_DAEMON:+RunAsDaemon $TOR_RUN_AS_DAEMON} 40 | 41 | User tor 42 | 43 | #DataDirectory @LOCALSTATEDIR@/lib/tor 44 | DataDirectory ${TOR_DATA_DIRECTORY:-/var/lib/tor} 45 | 46 | #ControlPort 9051 47 | ${TOR_CONTROL_PORT:+ControlPort $TOR_CONTROL_PORT} 48 | #HashedControlPassword 16:872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C 49 | ${TOR_HASHED_CONTROL_PASSWORD:+HashedControlPassword $TOR_HASHED_CONTROL_PASSWORD} 50 | ${TOR_CONTROL_PASSWD:+HashedControlPassword $(tor --hash-password "$TOR_CONTROL_PASSWD" | grep '^16:')} 51 | #CookieAuthentication 1 52 | ${TOR_COOKIE_AUTHENTICATION:+CookieAuthentication $TOR_COOKIE_AUTHENTICATION} 53 | 54 | ${TOR_USE_BRIDGE:+UseBridges $TOR_USE_BRIDGE} 55 | ClientTransportPlugin meek_lite,obfs2,obfs3,obfs4,scramblesuit exec /usr/local/bin/lyrebird 56 | ClientTransportPlugin meek exec /usr/local/bin/meek-client 57 | ClientTransportPlugin snowflake exec /usr/local/bin/snowflake-client 58 | 59 | #Socks5Proxy 127.0.0.1:1080 60 | ${TOR_SOCKS5_PROXY:+Socks5Proxy $TOR_SOCKS5_PROXY} 61 | ${TOR_SOCKS5_USERNAME:+Socks5Username $TOR_SOCKS5_USERNAME} 62 | ${TOR_SOCKS5_PASSWORD:+Socks5Password $TOR_SOCKS5_PASSWORD} 63 | 64 | ######### Location-hidden Services ########## 65 | 66 | #HiddenServiceDir @LOCALSTATEDIR@/lib/tor/hidden_service/ 67 | #HiddenServiceDir @LOCALSTATEDIR@/lib/tor/other_hidden_service/ 68 | ${TOR_HIDDEN_SERVICE_DIR:+HiddenServiceDir $TOR_HIDDEN_SERVICE_DIR} 69 | #HiddenServicePort 80 127.0.0.1:80 70 | #HiddenServicePort 80 127.0.0.1:80 71 | #HiddenServicePort 22 127.0.0.1:22 72 | ${TOR_HIDDEN_SERVICE_PORT:+HiddenServicePort $TOR_HIDDEN_SERVICE_PORT} 73 | 74 | ################ Relays ##################### 75 | 76 | #ORPort 9001 77 | #ORPort 443 NoListen 78 | #ORPort 127.0.0.1:9090 NoAdvertise 79 | #ORPort [2001:DB8::1]:9050 80 | ${TOR_OR_PORT:+ORPort $TOR_OR_PORT} 81 | 82 | #Address noname.example.com 83 | ${TOR_ADDRESS:+Address $TOR_ADDRESS} 84 | 85 | #OutboundBindAddressExit 10.0.0.4 86 | ${TOR_OUTBOUND_BIND_ADDRESS_EXIT:+OutboundBindAddressExit $TOR_OUTBOUND_BIND_ADDRESS_EXIT} 87 | #OutboundBindAddressOR 10.0.0.5 88 | ${TOR_OUTBOUND_BIND_ADDRESS_OR:+OutboundBindAddressOR $TOR_OUTBOUND_BIND_ADDRESS_OR} 89 | 90 | #Nickname ididnteditheconfig 91 | ${TOR_NICKNAME:+Nickname $TOR_NICKNAME} 92 | 93 | #RelayBandwidthRate 100 KBytes # Throttle traffic to 100KB/s (800Kbps) 94 | ${TOR_RELAY_BANDWIDTH_RATE:+RelayBandwidthRate $TOR_RELAY_BANDWIDTH_RATE} 95 | #RelayBandwidthBurst 200 KBytes # But allow bursts up to 200KB (1600Kb) 96 | ${TOR_RELAY_BANDWIDTH_BURST:+RelayBandwidthBurst $TOR_RELAY_BANDWIDTH_BURST} 97 | 98 | #AccountingStart month 3 15:00 99 | ${TOR_ACCOUNTING_START:+AccountingStart $TOR_ACCOUNTING_START} 100 | 101 | #ContactInfo Random Person 102 | #ContactInfo 0xFFFFFFFF Random Person 103 | ${TOR_CONTACT_INFO:+ContactInfo $TOR_CONTACT_INFO} 104 | 105 | #DirPort 9030 # what port to advertise for directory connections 106 | #DirPort 80 NoListen 107 | #DirPort 127.0.0.1:9091 NoAdvertise 108 | ${TOR_DIR_PORT:+DirPort $TOR_DIR_PORT} 109 | #DirPortFrontPage @CONFDIR@/tor-exit-notice.html 110 | ${TOR_DIR_PORT_FRONT_PAGE:+DirPortFrontPage $TOR_DIR_PORT_FRONT_PAGE} 111 | 112 | #MyFamily keyid,keyid,... 113 | ${TOR_MY_FAMILY:+MyFamily $TOR_MY_FAMILY} 114 | 115 | #ExitRelay 1 116 | ${TOR_EXIT_RELAY:+ExitRelay $TOR_EXIT_RELAY} 117 | 118 | #IPv6Exit 1 119 | ${TOR_IPV6_EXIT:+IPv6Exit $TOR_IPV6_EXIT} 120 | 121 | #ReducedExitPolicy 1 122 | ${TOR_REDUCED_EXIT_POLICY:+ReducedExitPolicy $TOR_REDUCED_EXIT_POLICY} 123 | 124 | #ExitPolicy accept *:6660-6667,reject *:* # allow irc ports on IPv4 and IPv6 but no more 125 | #ExitPolicy accept *:119 # accept nntp ports on IPv4 and IPv6 as well as default exit policy 126 | #ExitPolicy accept *4:119 # accept nntp ports on IPv4 only as well as default exit policy 127 | #ExitPolicy accept6 *6:119 # accept nntp ports on IPv6 only as well as default exit policy 128 | #ExitPolicy reject *:* # no exits allowed 129 | ${TOR_EXIT_POLICY:+ExitPolicy $TOR_EXIT_POLICY} 130 | 131 | #BridgeRelay 1 132 | ${TOR_BRIDGE_RELAY:+BridgeRelay $TOR_BRIDGE_RELAY} 133 | #BridgeDistribution none 134 | ${TOR_BRIDGE_DISTRIBUTION:+BridgeDistribution $TOR_BRIDGE_DISTRIBUTION} 135 | 136 | ############### Other options ############### 137 | 138 | %include /etc/tor/torrc.d/*.conf 139 | 140 | ########## END AUTO-GENERATED FILE ########## 141 | EOF 142 | } 143 | 144 | CUSTOM_TOR_OPTIONS=( 145 | "TOR_CONTROL_PASSWD" 146 | ) 147 | 148 | cleanse_tor_config() { 149 | # Remove comment line with single Hash 150 | sed -i '/^#\([^#]\)/d' "${TOR_CONFIG}" 151 | 152 | # Remove options with no value. (KEY[:space:]{...VALUE}) 153 | sed -i '/^[^ ]* $/d' "${TOR_CONFIG}" 154 | 155 | # Remove duplicate lines 156 | sed -i '/^$/N;/\n.*\n/d' "${TOR_CONFIG}" 157 | 158 | # Remove double empty lines 159 | sed -i '/^$/N;/^\n$/D' "${TOR_CONFIG}" 160 | } 161 | 162 | fix_tor_permissions() { 163 | local DATA_DIR="${TOR_DATA_DIR:-/var/lib/tor}" 164 | if [ ! -d "$DATA_DIR" ]; then 165 | mkdir -p "$DATA_DIR" 166 | fi 167 | uown tor "$DATA_DIR" 168 | chmod 700 "$DATA_DIR" 169 | } 170 | 171 | # gets any environment variables that start with TOR_ and adds them to the config file 172 | load_tor_env() { 173 | local added_count=1 174 | local updated_count=1 175 | local RAW_OPTION_NAME 176 | for RAW_OPTION_NAME in $(env | grep -o "^TOR_[^=]*"); do 177 | 178 | # Skip TorProxy custom options 179 | if [[ " ${CUSTOM_TOR_OPTIONS[*]} " == *" ${RAW_OPTION_NAME} "* ]]; then 180 | continue 181 | fi 182 | 183 | local RAW_OPTION_VALUE="${!RAW_OPTION_NAME}" 184 | 185 | if [ -n "$RAW_OPTION_VALUE" ]; then 186 | local OPTION_NAME="$(to_camel_case "${RAW_OPTION_NAME#TOR_}")" 187 | local OPTION_VALUE="$(sed_escape "$RAW_OPTION_VALUE")" 188 | 189 | # Check if there is a corresponding option in the config file, and update it 190 | if grep -i -q "^$OPTION_NAME" "$TOR_CONFIG"; then 191 | sed -i "s/^$OPTION_NAME.*/$OPTION_NAME $OPTION_VALUE/" "$TOR_CONFIG" 192 | updated_count=$((updated_count + 2)) 193 | else 194 | sed -i "s/^############### Other options ###############$/&\n\n$OPTION_NAME $OPTION_VALUE/" "$TOR_CONFIG" 195 | added_count=$((added_count + 2)) 196 | fi 197 | fi 198 | done 199 | 200 | # Add a blank line at the end of the file 201 | echo "" >> "$TOR_CONFIG" 202 | 203 | if [ "$added_count" -gt 1 ] || [ "$updated_count" -gt 0 ]; then 204 | log NOTICE "Added $added_count and updated $updated_count options from environment variables." 205 | fi 206 | 207 | cleanse_tor_config 208 | fix_tor_permissions 209 | } 210 | 211 | get_torrc_option() { 212 | grep -i "^$1" "$TOR_CONFIG" | awk '{print $2}' 213 | } 214 | 215 | current_socks_port() { 216 | get_torrc_option "SocksPort" 217 | } 218 | -------------------------------------------------------------------------------- /kubernetes.yml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: torproxy 5 | labels: 6 | app: torproxy 7 | spec: 8 | replicas: 1 9 | revisionHistoryLimit: 3 10 | selector: 11 | matchLabels: 12 | app: torproxy 13 | strategy: 14 | type: Recreate 15 | template: 16 | metadata: 17 | labels: 18 | app: torproxy 19 | name: torproxy 20 | spec: 21 | dnsPolicy: ClusterFirst 22 | restartPolicy: Always 23 | volumes: 24 | - name: obfs4-bridges 25 | secret: 26 | secretName: obfs4-bridges 27 | - name: tor-data 28 | persistentVolumeClaim: 29 | claimName: tor-data 30 | containers: 31 | - name: torproxy 32 | image: shahradel/torproxy:latest 33 | imagePullPolicy: IfNotPresent 34 | resources: 35 | limits: 36 | cpu: 100m 37 | ephemeral-storage: 500M 38 | memory: 200M 39 | requests: 40 | cpu: 100m 41 | ephemeral-storage: 500M 42 | memory: 200M 43 | terminationMessagePath: /dev/termination-log 44 | terminationMessagePolicy: File 45 | volumeMounts: 46 | - name: obfs4-bridges 47 | mountPath: /etc/tor/torrc.d/ 48 | - name: tor-data 49 | mountPath: /var/lib/tor/ 50 | # Configure the Proxy servers with below properties 51 | env: 52 | - name: PROXY_USERNAME 53 | value: awesome-username 54 | - name: PROXY_PASSWORD 55 | value: super-secure-password 56 | ports: 57 | - containerPort: 8080 58 | protocol: TCP 59 | name: http-8080 60 | - containerPort: 1080 61 | protocol: TCP 62 | name: socks-1080 63 | - containerPort: 8338 64 | protocol: TCP 65 | name: ss-8338 66 | args: 67 | - -L=socks5://${PROXY_USERNAME}:${PROXY_PASSWORD}@:1080 68 | - -L=http://${PROXY_USERNAME}:${PROXY_PASSWORD}@:8080 69 | - -L=ss://aes-256-cfb:${PROXY_PASSWORD}@:8338 70 | 71 | --- 72 | apiVersion: v1 73 | kind: Service 74 | metadata: 75 | labels: 76 | app: torproxy 77 | name: torproxy 78 | spec: 79 | type: LoadBalancer 80 | ports: 81 | - name: http-8080 82 | protocol: TCP 83 | targetPort: 8080 84 | port: 8080 85 | - name: socks-1080 86 | protocol: TCP 87 | targetPort: 1080 88 | port: 1080 89 | - name: ss-8338 90 | protocol: TCP 91 | targetPort: 8338 92 | port: 8338 93 | selector: 94 | app: torproxy 95 | 96 | --- 97 | apiVersion: v1 98 | kind: PersistentVolumeClaim 99 | metadata: 100 | name: tor-data 101 | spec: 102 | accessModes: 103 | - ReadWriteMany 104 | resources: 105 | requests: 106 | storage: 1G 107 | 108 | --- 109 | kind: Secret 110 | apiVersion: v1 111 | metadata: 112 | name: obfs4-bridges 113 | stringData: 114 | bridge.conf: | 115 | Bridge obfs4 212.227.193.159:8082 94F987600D8539445A78908035A331608C88D0E2 cert=JopFFuvSS2cewOdvb2emOQdfMYNgjVXS6LoVc47VjMWaBRz7xCHGiHqRo5EOzcXZJd2+Cg iat-mode=0 116 | Bridge obfs4 217.182.78.247:52123 BBB647FCF920EEB00325E7AFB5C6E05855426852 cert=B4/Zigc/9+HsX6MP0bBY6nDFFQJSxMpMlYsvk7at+UF5btB5WVYj3qgswf8zUA6A98JnWQ iat-mode=0 117 | Bridge obfs4 185.177.207.205:11205 084113B9A27A8087C26236EF67A16784DF58D7F0 cert=pzuLxMv5n+7nRqX2czUQGh8JZBCMEVUHlkciocGRpX2IsPlTqd1YyXFQxRwfsYEFuuBdBQ iat-mode=2 118 | Bridge obfs4 51.75.74.245:8356 18C27C9850967FD4BF4188963C1AEBEC40807823 cert=y6cQEx4d/25KALeqJA+2uB+6rmzoD9KZ0FrQGNwxb10yVj3mDjHtOneqcqhRT+BADhCTYg iat-mode=0 119 | Bridge obfs4 91.134.100.128:51106 ABB9F62BEC331EE5DE7B3C3BEA014F8910E0C6BD cert=bC5k/PWVu06cSPhSm6mrQDBevReEpdtpokmDibpK0MBxRaVnn0S3O6YvEi4BDUeasn71bA iat-mode=0 120 | Bridge obfs4 51.83.252.216:45918 C2B7E51665111C9BE43894E90B9A65DD8A25490D cert=oQgHCdMhvfF44gwHJssSHXltUE4r8gddEQeZ4iy17XHZMP+ql2QTG9LziiEqNfNCqFDBSw iat-mode=0 121 | Bridge obfs4 192.168.2.150:42222 3F41ADE40DB21BFEF5A5A1E3143DBBBC2F4841C6 cert=FbbsWd6s2o6QTNZ6fxNMkrd/03Smd6pFeW6UsIDjhtRjhR1eg9F0+6RKWmJtr1FgEEz5EQ iat-mode=0 122 | Bridge obfs4 130.255.76.46:9098 9B72F502756CDDD28966931B2C1296259DD57780 cert=xNYGvoaiALC4RCCDmkZfYApBHXK+IUBWfqc62QgPVrJo7qer3YUAv1tSYl1ozHEdId4Kfw iat-mode=0 123 | Bridge obfs4 141.94.65.145:14171 73B283F37163152D9AFF6606B3EEEF8CB0539B36 cert=wgt235lQJi7azLQAnRPra3IQdKbLS4E1AL2eb+ZP9mMRvLjuCfaOmOp2FT3Cb1M+5I15YA iat-mode=0 124 | Bridge obfs4 51.91.208.71:18580 8C83B132A5A69207A76CF6154C58CB46145E5C9E cert=VhKc5m50cF00QCPZGzArQY4Z7pNSn8WcirNmX8XeVq4xh0BNhfMx+k4qWaJMnUKOmEdcWA iat-mode=0 125 | Bridge obfs4 94.209.98.133:36912 AC77472297C4040CCDD8F9E191D9A39F2ED53499 cert=DVsoSQNdfIg8FmYpjdaNC2pw5t3E+9XsHxSQOOMimEtn2sYImiWjUCsNdQLrCe5cmcfFUg iat-mode=0 126 | Bridge obfs4 103.29.64.211:443 1B8DA674BCB03A89B0054DBFEDBDE7EBB7F543AB cert=vJ8Gb7BuIKTxAFy8XaAw7WCiYaXgv3OZ6G1m2OJ7H85+eTpj0IQTsR89eym7DfoYAYAaXQ iat-mode=0 127 | Bridge obfs4 57.128.57.241:55727 9968AAE01F299A14EFD3B462AABB79253DD35A4B cert=pP9k93e4/IpakyXXe9sYH53m1gcP9MS78pShP4gqkIOZ5NDMhD+Sk789bkUkepf+gxXDag iat-mode=0 128 | Bridge obfs4 128.140.85.53:13229 5C233EF71C1843BDB4E89B3A39E870EF2E743EBF cert=HoG7kD0QxgY/zUFkKL2ggVY8hS3uy8ZFIUEWoRs7n0QQ2gH3xV2MeLwfNN8GjAebZeK1BA iat-mode=0 129 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docker-torproxy", 3 | "version": "1.0.3", 4 | "private": true, 5 | "scripts": { 6 | "dev": "docker compose -f docker-compose.yml -f docker-compose.dev.yml up --force-recreate", 7 | "build": "docker buildx build -t ghcr.io/shahradelahi/torproxy .", 8 | "start": "docker compose -f docker-compose.yml up --force-recreate", 9 | "format": "prettier --write .", 10 | "format:check": "prettier --check .", 11 | "ci:publish": "pnpm build && changeset publish" 12 | }, 13 | "keywords": [ 14 | "docker", 15 | "tor", 16 | "proxy", 17 | "socks5", 18 | "http", 19 | "shadowsocks" 20 | ], 21 | "author": "Shahrad Elahi (https://github.com/shahradelahi)", 22 | "license": "GPL-3.0", 23 | "packageManager": "pnpm@9.15.3", 24 | "dependencies": { 25 | "@changesets/cli": "^2.27.11", 26 | "prettier": "^3.4.2", 27 | "prettier-plugin-sh": "^0.14.0" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: '9.0' 2 | 3 | settings: 4 | autoInstallPeers: true 5 | excludeLinksFromLockfile: false 6 | 7 | importers: 8 | 9 | .: 10 | dependencies: 11 | '@changesets/cli': 12 | specifier: ^2.27.11 13 | version: 2.27.11 14 | prettier: 15 | specifier: ^3.4.2 16 | version: 3.4.2 17 | prettier-plugin-sh: 18 | specifier: ^0.14.0 19 | version: 0.14.0(prettier@3.4.2) 20 | 21 | packages: 22 | 23 | '@babel/runtime@7.26.0': 24 | resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} 25 | engines: {node: '>=6.9.0'} 26 | 27 | '@changesets/apply-release-plan@7.0.7': 28 | resolution: {integrity: sha512-qnPOcmmmnD0MfMg9DjU1/onORFyRpDXkMMl2IJg9mECY6RnxL3wN0TCCc92b2sXt1jt8DgjAUUsZYGUGTdYIXA==} 29 | 30 | '@changesets/assemble-release-plan@6.0.5': 31 | resolution: {integrity: sha512-IgvBWLNKZd6k4t72MBTBK3nkygi0j3t3zdC1zrfusYo0KpdsvnDjrMM9vPnTCLCMlfNs55jRL4gIMybxa64FCQ==} 32 | 33 | '@changesets/changelog-git@0.2.0': 34 | resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==} 35 | 36 | '@changesets/cli@2.27.11': 37 | resolution: {integrity: sha512-1QislpE+nvJgSZZo9+Lj3Lno5pKBgN46dAV8IVxKJy9wX8AOrs9nn5pYVZuDpoxWJJCALmbfOsHkyxujgetQSg==} 38 | hasBin: true 39 | 40 | '@changesets/config@3.0.5': 41 | resolution: {integrity: sha512-QyXLSSd10GquX7hY0Mt4yQFMEeqnO5z/XLpbIr4PAkNNoQNKwDyiSrx4yd749WddusH1v3OSiA0NRAYmH/APpQ==} 42 | 43 | '@changesets/errors@0.2.0': 44 | resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} 45 | 46 | '@changesets/get-dependents-graph@2.1.2': 47 | resolution: {integrity: sha512-sgcHRkiBY9i4zWYBwlVyAjEM9sAzs4wYVwJUdnbDLnVG3QwAaia1Mk5P8M7kraTOZN+vBET7n8KyB0YXCbFRLQ==} 48 | 49 | '@changesets/get-release-plan@4.0.6': 50 | resolution: {integrity: sha512-FHRwBkY7Eili04Y5YMOZb0ezQzKikTka4wL753vfUA5COSebt7KThqiuCN9BewE4/qFGgF/5t3AuzXx1/UAY4w==} 51 | 52 | '@changesets/get-version-range-type@0.4.0': 53 | resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} 54 | 55 | '@changesets/git@3.0.2': 56 | resolution: {integrity: sha512-r1/Kju9Y8OxRRdvna+nxpQIsMsRQn9dhhAZt94FLDeu0Hij2hnOozW8iqnHBgvu+KdnJppCveQwK4odwfw/aWQ==} 57 | 58 | '@changesets/logger@0.1.1': 59 | resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==} 60 | 61 | '@changesets/parse@0.4.0': 62 | resolution: {integrity: sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==} 63 | 64 | '@changesets/pre@2.0.1': 65 | resolution: {integrity: sha512-vvBJ/If4jKM4tPz9JdY2kGOgWmCowUYOi5Ycv8dyLnEE8FgpYYUo1mgJZxcdtGGP3aG8rAQulGLyyXGSLkIMTQ==} 66 | 67 | '@changesets/read@0.6.2': 68 | resolution: {integrity: sha512-wjfQpJvryY3zD61p8jR87mJdyx2FIhEcdXhKUqkja87toMrP/3jtg/Yg29upN+N4Ckf525/uvV7a4tzBlpk6gg==} 69 | 70 | '@changesets/should-skip-package@0.1.1': 71 | resolution: {integrity: sha512-H9LjLbF6mMHLtJIc/eHR9Na+MifJ3VxtgP/Y+XLn4BF7tDTEN1HNYtH6QMcjP1uxp9sjaFYmW8xqloaCi/ckTg==} 72 | 73 | '@changesets/types@4.1.0': 74 | resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} 75 | 76 | '@changesets/types@6.0.0': 77 | resolution: {integrity: sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==} 78 | 79 | '@changesets/write@0.3.2': 80 | resolution: {integrity: sha512-kDxDrPNpUgsjDbWBvUo27PzKX4gqeKOlhibaOXDJA6kuBisGqNHv/HwGJrAu8U/dSf8ZEFIeHIPtvSlZI1kULw==} 81 | 82 | '@manypkg/find-root@1.1.0': 83 | resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} 84 | 85 | '@manypkg/get-packages@1.1.3': 86 | resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} 87 | 88 | '@nodelib/fs.scandir@2.1.5': 89 | resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} 90 | engines: {node: '>= 8'} 91 | 92 | '@nodelib/fs.stat@2.0.5': 93 | resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} 94 | engines: {node: '>= 8'} 95 | 96 | '@nodelib/fs.walk@1.2.8': 97 | resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} 98 | engines: {node: '>= 8'} 99 | 100 | '@types/node@12.20.55': 101 | resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} 102 | 103 | ansi-colors@4.1.3: 104 | resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} 105 | engines: {node: '>=6'} 106 | 107 | ansi-regex@5.0.1: 108 | resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} 109 | engines: {node: '>=8'} 110 | 111 | argparse@1.0.10: 112 | resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} 113 | 114 | array-union@2.1.0: 115 | resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} 116 | engines: {node: '>=8'} 117 | 118 | better-path-resolve@1.0.0: 119 | resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} 120 | engines: {node: '>=4'} 121 | 122 | braces@3.0.3: 123 | resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} 124 | engines: {node: '>=8'} 125 | 126 | chardet@0.7.0: 127 | resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} 128 | 129 | ci-info@3.9.0: 130 | resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} 131 | engines: {node: '>=8'} 132 | 133 | cross-spawn@7.0.6: 134 | resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} 135 | engines: {node: '>= 8'} 136 | 137 | detect-indent@6.1.0: 138 | resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} 139 | engines: {node: '>=8'} 140 | 141 | dir-glob@3.0.1: 142 | resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} 143 | engines: {node: '>=8'} 144 | 145 | enquirer@2.4.1: 146 | resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} 147 | engines: {node: '>=8.6'} 148 | 149 | esprima@4.0.1: 150 | resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} 151 | engines: {node: '>=4'} 152 | hasBin: true 153 | 154 | extendable-error@0.1.7: 155 | resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} 156 | 157 | external-editor@3.1.0: 158 | resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} 159 | engines: {node: '>=4'} 160 | 161 | fast-glob@3.3.3: 162 | resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} 163 | engines: {node: '>=8.6.0'} 164 | 165 | fastq@1.18.0: 166 | resolution: {integrity: sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==} 167 | 168 | fill-range@7.1.1: 169 | resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} 170 | engines: {node: '>=8'} 171 | 172 | find-up@4.1.0: 173 | resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} 174 | engines: {node: '>=8'} 175 | 176 | fs-extra@7.0.1: 177 | resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} 178 | engines: {node: '>=6 <7 || >=8'} 179 | 180 | fs-extra@8.1.0: 181 | resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} 182 | engines: {node: '>=6 <7 || >=8'} 183 | 184 | glob-parent@5.1.2: 185 | resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} 186 | engines: {node: '>= 6'} 187 | 188 | globby@11.1.0: 189 | resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} 190 | engines: {node: '>=10'} 191 | 192 | graceful-fs@4.2.11: 193 | resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} 194 | 195 | human-id@1.0.2: 196 | resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} 197 | 198 | iconv-lite@0.4.24: 199 | resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} 200 | engines: {node: '>=0.10.0'} 201 | 202 | ignore@5.3.2: 203 | resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} 204 | engines: {node: '>= 4'} 205 | 206 | is-extglob@2.1.1: 207 | resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} 208 | engines: {node: '>=0.10.0'} 209 | 210 | is-glob@4.0.3: 211 | resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} 212 | engines: {node: '>=0.10.0'} 213 | 214 | is-number@7.0.0: 215 | resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} 216 | engines: {node: '>=0.12.0'} 217 | 218 | is-subdir@1.2.0: 219 | resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} 220 | engines: {node: '>=4'} 221 | 222 | is-windows@1.0.2: 223 | resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} 224 | engines: {node: '>=0.10.0'} 225 | 226 | isexe@2.0.0: 227 | resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} 228 | 229 | js-yaml@3.14.1: 230 | resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} 231 | hasBin: true 232 | 233 | jsonfile@4.0.0: 234 | resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} 235 | 236 | locate-path@5.0.0: 237 | resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} 238 | engines: {node: '>=8'} 239 | 240 | lodash.startcase@4.4.0: 241 | resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} 242 | 243 | merge2@1.4.1: 244 | resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} 245 | engines: {node: '>= 8'} 246 | 247 | micromatch@4.0.8: 248 | resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} 249 | engines: {node: '>=8.6'} 250 | 251 | mri@1.2.0: 252 | resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} 253 | engines: {node: '>=4'} 254 | 255 | mvdan-sh@0.10.1: 256 | resolution: {integrity: sha512-kMbrH0EObaKmK3nVRKUIIya1dpASHIEusM13S4V1ViHFuxuNxCo+arxoa6j/dbV22YBGjl7UKJm9QQKJ2Crzhg==} 257 | 258 | os-tmpdir@1.0.2: 259 | resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} 260 | engines: {node: '>=0.10.0'} 261 | 262 | outdent@0.5.0: 263 | resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} 264 | 265 | p-filter@2.1.0: 266 | resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} 267 | engines: {node: '>=8'} 268 | 269 | p-limit@2.3.0: 270 | resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} 271 | engines: {node: '>=6'} 272 | 273 | p-locate@4.1.0: 274 | resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} 275 | engines: {node: '>=8'} 276 | 277 | p-map@2.1.0: 278 | resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} 279 | engines: {node: '>=6'} 280 | 281 | p-try@2.2.0: 282 | resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} 283 | engines: {node: '>=6'} 284 | 285 | package-manager-detector@0.2.8: 286 | resolution: {integrity: sha512-ts9KSdroZisdvKMWVAVCXiKqnqNfXz4+IbrBG8/BWx/TR5le+jfenvoBuIZ6UWM9nz47W7AbD9qYfAwfWMIwzA==} 287 | 288 | path-exists@4.0.0: 289 | resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} 290 | engines: {node: '>=8'} 291 | 292 | path-key@3.1.1: 293 | resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} 294 | engines: {node: '>=8'} 295 | 296 | path-type@4.0.0: 297 | resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} 298 | engines: {node: '>=8'} 299 | 300 | picocolors@1.1.1: 301 | resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} 302 | 303 | picomatch@2.3.1: 304 | resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} 305 | engines: {node: '>=8.6'} 306 | 307 | pify@4.0.1: 308 | resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} 309 | engines: {node: '>=6'} 310 | 311 | prettier-plugin-sh@0.14.0: 312 | resolution: {integrity: sha512-hfXulj5+zEl/ulrO5kMuuTPKmXvOg0bnLHY1hKFNN/N+/903iZbNp8NyZBTsgI8dtkSgFfAEIQq0IQTyP1ZVFQ==} 313 | engines: {node: '>=16.0.0'} 314 | peerDependencies: 315 | prettier: ^3.0.3 316 | 317 | prettier@2.8.8: 318 | resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} 319 | engines: {node: '>=10.13.0'} 320 | hasBin: true 321 | 322 | prettier@3.4.2: 323 | resolution: {integrity: sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==} 324 | engines: {node: '>=14'} 325 | hasBin: true 326 | 327 | queue-microtask@1.2.3: 328 | resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} 329 | 330 | read-yaml-file@1.1.0: 331 | resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} 332 | engines: {node: '>=6'} 333 | 334 | regenerator-runtime@0.14.1: 335 | resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} 336 | 337 | resolve-from@5.0.0: 338 | resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} 339 | engines: {node: '>=8'} 340 | 341 | reusify@1.0.4: 342 | resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} 343 | engines: {iojs: '>=1.0.0', node: '>=0.10.0'} 344 | 345 | run-parallel@1.2.0: 346 | resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} 347 | 348 | safer-buffer@2.1.2: 349 | resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} 350 | 351 | semver@7.6.3: 352 | resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} 353 | engines: {node: '>=10'} 354 | hasBin: true 355 | 356 | sh-syntax@0.4.2: 357 | resolution: {integrity: sha512-/l2UZ5fhGZLVZa16XQM9/Vq/hezGGbdHeVEA01uWjOL1+7Ek/gt6FquW0iKKws4a9AYPYvlz6RyVvjh3JxOteg==} 358 | engines: {node: '>=16.0.0'} 359 | 360 | shebang-command@2.0.0: 361 | resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} 362 | engines: {node: '>=8'} 363 | 364 | shebang-regex@3.0.0: 365 | resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} 366 | engines: {node: '>=8'} 367 | 368 | signal-exit@4.1.0: 369 | resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} 370 | engines: {node: '>=14'} 371 | 372 | slash@3.0.0: 373 | resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} 374 | engines: {node: '>=8'} 375 | 376 | spawndamnit@3.0.1: 377 | resolution: {integrity: sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==} 378 | 379 | sprintf-js@1.0.3: 380 | resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} 381 | 382 | strip-ansi@6.0.1: 383 | resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} 384 | engines: {node: '>=8'} 385 | 386 | strip-bom@3.0.0: 387 | resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} 388 | engines: {node: '>=4'} 389 | 390 | term-size@2.2.1: 391 | resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} 392 | engines: {node: '>=8'} 393 | 394 | tmp@0.0.33: 395 | resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} 396 | engines: {node: '>=0.6.0'} 397 | 398 | to-regex-range@5.0.1: 399 | resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} 400 | engines: {node: '>=8.0'} 401 | 402 | tslib@2.8.1: 403 | resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} 404 | 405 | universalify@0.1.2: 406 | resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} 407 | engines: {node: '>= 4.0.0'} 408 | 409 | which@2.0.2: 410 | resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} 411 | engines: {node: '>= 8'} 412 | hasBin: true 413 | 414 | snapshots: 415 | 416 | '@babel/runtime@7.26.0': 417 | dependencies: 418 | regenerator-runtime: 0.14.1 419 | 420 | '@changesets/apply-release-plan@7.0.7': 421 | dependencies: 422 | '@changesets/config': 3.0.5 423 | '@changesets/get-version-range-type': 0.4.0 424 | '@changesets/git': 3.0.2 425 | '@changesets/should-skip-package': 0.1.1 426 | '@changesets/types': 6.0.0 427 | '@manypkg/get-packages': 1.1.3 428 | detect-indent: 6.1.0 429 | fs-extra: 7.0.1 430 | lodash.startcase: 4.4.0 431 | outdent: 0.5.0 432 | prettier: 2.8.8 433 | resolve-from: 5.0.0 434 | semver: 7.6.3 435 | 436 | '@changesets/assemble-release-plan@6.0.5': 437 | dependencies: 438 | '@changesets/errors': 0.2.0 439 | '@changesets/get-dependents-graph': 2.1.2 440 | '@changesets/should-skip-package': 0.1.1 441 | '@changesets/types': 6.0.0 442 | '@manypkg/get-packages': 1.1.3 443 | semver: 7.6.3 444 | 445 | '@changesets/changelog-git@0.2.0': 446 | dependencies: 447 | '@changesets/types': 6.0.0 448 | 449 | '@changesets/cli@2.27.11': 450 | dependencies: 451 | '@changesets/apply-release-plan': 7.0.7 452 | '@changesets/assemble-release-plan': 6.0.5 453 | '@changesets/changelog-git': 0.2.0 454 | '@changesets/config': 3.0.5 455 | '@changesets/errors': 0.2.0 456 | '@changesets/get-dependents-graph': 2.1.2 457 | '@changesets/get-release-plan': 4.0.6 458 | '@changesets/git': 3.0.2 459 | '@changesets/logger': 0.1.1 460 | '@changesets/pre': 2.0.1 461 | '@changesets/read': 0.6.2 462 | '@changesets/should-skip-package': 0.1.1 463 | '@changesets/types': 6.0.0 464 | '@changesets/write': 0.3.2 465 | '@manypkg/get-packages': 1.1.3 466 | ansi-colors: 4.1.3 467 | ci-info: 3.9.0 468 | enquirer: 2.4.1 469 | external-editor: 3.1.0 470 | fs-extra: 7.0.1 471 | mri: 1.2.0 472 | p-limit: 2.3.0 473 | package-manager-detector: 0.2.8 474 | picocolors: 1.1.1 475 | resolve-from: 5.0.0 476 | semver: 7.6.3 477 | spawndamnit: 3.0.1 478 | term-size: 2.2.1 479 | 480 | '@changesets/config@3.0.5': 481 | dependencies: 482 | '@changesets/errors': 0.2.0 483 | '@changesets/get-dependents-graph': 2.1.2 484 | '@changesets/logger': 0.1.1 485 | '@changesets/types': 6.0.0 486 | '@manypkg/get-packages': 1.1.3 487 | fs-extra: 7.0.1 488 | micromatch: 4.0.8 489 | 490 | '@changesets/errors@0.2.0': 491 | dependencies: 492 | extendable-error: 0.1.7 493 | 494 | '@changesets/get-dependents-graph@2.1.2': 495 | dependencies: 496 | '@changesets/types': 6.0.0 497 | '@manypkg/get-packages': 1.1.3 498 | picocolors: 1.1.1 499 | semver: 7.6.3 500 | 501 | '@changesets/get-release-plan@4.0.6': 502 | dependencies: 503 | '@changesets/assemble-release-plan': 6.0.5 504 | '@changesets/config': 3.0.5 505 | '@changesets/pre': 2.0.1 506 | '@changesets/read': 0.6.2 507 | '@changesets/types': 6.0.0 508 | '@manypkg/get-packages': 1.1.3 509 | 510 | '@changesets/get-version-range-type@0.4.0': {} 511 | 512 | '@changesets/git@3.0.2': 513 | dependencies: 514 | '@changesets/errors': 0.2.0 515 | '@manypkg/get-packages': 1.1.3 516 | is-subdir: 1.2.0 517 | micromatch: 4.0.8 518 | spawndamnit: 3.0.1 519 | 520 | '@changesets/logger@0.1.1': 521 | dependencies: 522 | picocolors: 1.1.1 523 | 524 | '@changesets/parse@0.4.0': 525 | dependencies: 526 | '@changesets/types': 6.0.0 527 | js-yaml: 3.14.1 528 | 529 | '@changesets/pre@2.0.1': 530 | dependencies: 531 | '@changesets/errors': 0.2.0 532 | '@changesets/types': 6.0.0 533 | '@manypkg/get-packages': 1.1.3 534 | fs-extra: 7.0.1 535 | 536 | '@changesets/read@0.6.2': 537 | dependencies: 538 | '@changesets/git': 3.0.2 539 | '@changesets/logger': 0.1.1 540 | '@changesets/parse': 0.4.0 541 | '@changesets/types': 6.0.0 542 | fs-extra: 7.0.1 543 | p-filter: 2.1.0 544 | picocolors: 1.1.1 545 | 546 | '@changesets/should-skip-package@0.1.1': 547 | dependencies: 548 | '@changesets/types': 6.0.0 549 | '@manypkg/get-packages': 1.1.3 550 | 551 | '@changesets/types@4.1.0': {} 552 | 553 | '@changesets/types@6.0.0': {} 554 | 555 | '@changesets/write@0.3.2': 556 | dependencies: 557 | '@changesets/types': 6.0.0 558 | fs-extra: 7.0.1 559 | human-id: 1.0.2 560 | prettier: 2.8.8 561 | 562 | '@manypkg/find-root@1.1.0': 563 | dependencies: 564 | '@babel/runtime': 7.26.0 565 | '@types/node': 12.20.55 566 | find-up: 4.1.0 567 | fs-extra: 8.1.0 568 | 569 | '@manypkg/get-packages@1.1.3': 570 | dependencies: 571 | '@babel/runtime': 7.26.0 572 | '@changesets/types': 4.1.0 573 | '@manypkg/find-root': 1.1.0 574 | fs-extra: 8.1.0 575 | globby: 11.1.0 576 | read-yaml-file: 1.1.0 577 | 578 | '@nodelib/fs.scandir@2.1.5': 579 | dependencies: 580 | '@nodelib/fs.stat': 2.0.5 581 | run-parallel: 1.2.0 582 | 583 | '@nodelib/fs.stat@2.0.5': {} 584 | 585 | '@nodelib/fs.walk@1.2.8': 586 | dependencies: 587 | '@nodelib/fs.scandir': 2.1.5 588 | fastq: 1.18.0 589 | 590 | '@types/node@12.20.55': {} 591 | 592 | ansi-colors@4.1.3: {} 593 | 594 | ansi-regex@5.0.1: {} 595 | 596 | argparse@1.0.10: 597 | dependencies: 598 | sprintf-js: 1.0.3 599 | 600 | array-union@2.1.0: {} 601 | 602 | better-path-resolve@1.0.0: 603 | dependencies: 604 | is-windows: 1.0.2 605 | 606 | braces@3.0.3: 607 | dependencies: 608 | fill-range: 7.1.1 609 | 610 | chardet@0.7.0: {} 611 | 612 | ci-info@3.9.0: {} 613 | 614 | cross-spawn@7.0.6: 615 | dependencies: 616 | path-key: 3.1.1 617 | shebang-command: 2.0.0 618 | which: 2.0.2 619 | 620 | detect-indent@6.1.0: {} 621 | 622 | dir-glob@3.0.1: 623 | dependencies: 624 | path-type: 4.0.0 625 | 626 | enquirer@2.4.1: 627 | dependencies: 628 | ansi-colors: 4.1.3 629 | strip-ansi: 6.0.1 630 | 631 | esprima@4.0.1: {} 632 | 633 | extendable-error@0.1.7: {} 634 | 635 | external-editor@3.1.0: 636 | dependencies: 637 | chardet: 0.7.0 638 | iconv-lite: 0.4.24 639 | tmp: 0.0.33 640 | 641 | fast-glob@3.3.3: 642 | dependencies: 643 | '@nodelib/fs.stat': 2.0.5 644 | '@nodelib/fs.walk': 1.2.8 645 | glob-parent: 5.1.2 646 | merge2: 1.4.1 647 | micromatch: 4.0.8 648 | 649 | fastq@1.18.0: 650 | dependencies: 651 | reusify: 1.0.4 652 | 653 | fill-range@7.1.1: 654 | dependencies: 655 | to-regex-range: 5.0.1 656 | 657 | find-up@4.1.0: 658 | dependencies: 659 | locate-path: 5.0.0 660 | path-exists: 4.0.0 661 | 662 | fs-extra@7.0.1: 663 | dependencies: 664 | graceful-fs: 4.2.11 665 | jsonfile: 4.0.0 666 | universalify: 0.1.2 667 | 668 | fs-extra@8.1.0: 669 | dependencies: 670 | graceful-fs: 4.2.11 671 | jsonfile: 4.0.0 672 | universalify: 0.1.2 673 | 674 | glob-parent@5.1.2: 675 | dependencies: 676 | is-glob: 4.0.3 677 | 678 | globby@11.1.0: 679 | dependencies: 680 | array-union: 2.1.0 681 | dir-glob: 3.0.1 682 | fast-glob: 3.3.3 683 | ignore: 5.3.2 684 | merge2: 1.4.1 685 | slash: 3.0.0 686 | 687 | graceful-fs@4.2.11: {} 688 | 689 | human-id@1.0.2: {} 690 | 691 | iconv-lite@0.4.24: 692 | dependencies: 693 | safer-buffer: 2.1.2 694 | 695 | ignore@5.3.2: {} 696 | 697 | is-extglob@2.1.1: {} 698 | 699 | is-glob@4.0.3: 700 | dependencies: 701 | is-extglob: 2.1.1 702 | 703 | is-number@7.0.0: {} 704 | 705 | is-subdir@1.2.0: 706 | dependencies: 707 | better-path-resolve: 1.0.0 708 | 709 | is-windows@1.0.2: {} 710 | 711 | isexe@2.0.0: {} 712 | 713 | js-yaml@3.14.1: 714 | dependencies: 715 | argparse: 1.0.10 716 | esprima: 4.0.1 717 | 718 | jsonfile@4.0.0: 719 | optionalDependencies: 720 | graceful-fs: 4.2.11 721 | 722 | locate-path@5.0.0: 723 | dependencies: 724 | p-locate: 4.1.0 725 | 726 | lodash.startcase@4.4.0: {} 727 | 728 | merge2@1.4.1: {} 729 | 730 | micromatch@4.0.8: 731 | dependencies: 732 | braces: 3.0.3 733 | picomatch: 2.3.1 734 | 735 | mri@1.2.0: {} 736 | 737 | mvdan-sh@0.10.1: {} 738 | 739 | os-tmpdir@1.0.2: {} 740 | 741 | outdent@0.5.0: {} 742 | 743 | p-filter@2.1.0: 744 | dependencies: 745 | p-map: 2.1.0 746 | 747 | p-limit@2.3.0: 748 | dependencies: 749 | p-try: 2.2.0 750 | 751 | p-locate@4.1.0: 752 | dependencies: 753 | p-limit: 2.3.0 754 | 755 | p-map@2.1.0: {} 756 | 757 | p-try@2.2.0: {} 758 | 759 | package-manager-detector@0.2.8: {} 760 | 761 | path-exists@4.0.0: {} 762 | 763 | path-key@3.1.1: {} 764 | 765 | path-type@4.0.0: {} 766 | 767 | picocolors@1.1.1: {} 768 | 769 | picomatch@2.3.1: {} 770 | 771 | pify@4.0.1: {} 772 | 773 | prettier-plugin-sh@0.14.0(prettier@3.4.2): 774 | dependencies: 775 | mvdan-sh: 0.10.1 776 | prettier: 3.4.2 777 | sh-syntax: 0.4.2 778 | 779 | prettier@2.8.8: {} 780 | 781 | prettier@3.4.2: {} 782 | 783 | queue-microtask@1.2.3: {} 784 | 785 | read-yaml-file@1.1.0: 786 | dependencies: 787 | graceful-fs: 4.2.11 788 | js-yaml: 3.14.1 789 | pify: 4.0.1 790 | strip-bom: 3.0.0 791 | 792 | regenerator-runtime@0.14.1: {} 793 | 794 | resolve-from@5.0.0: {} 795 | 796 | reusify@1.0.4: {} 797 | 798 | run-parallel@1.2.0: 799 | dependencies: 800 | queue-microtask: 1.2.3 801 | 802 | safer-buffer@2.1.2: {} 803 | 804 | semver@7.6.3: {} 805 | 806 | sh-syntax@0.4.2: 807 | dependencies: 808 | tslib: 2.8.1 809 | 810 | shebang-command@2.0.0: 811 | dependencies: 812 | shebang-regex: 3.0.0 813 | 814 | shebang-regex@3.0.0: {} 815 | 816 | signal-exit@4.1.0: {} 817 | 818 | slash@3.0.0: {} 819 | 820 | spawndamnit@3.0.1: 821 | dependencies: 822 | cross-spawn: 7.0.6 823 | signal-exit: 4.1.0 824 | 825 | sprintf-js@1.0.3: {} 826 | 827 | strip-ansi@6.0.1: 828 | dependencies: 829 | ansi-regex: 5.0.1 830 | 831 | strip-bom@3.0.0: {} 832 | 833 | term-size@2.2.1: {} 834 | 835 | tmp@0.0.33: 836 | dependencies: 837 | os-tmpdir: 1.0.2 838 | 839 | to-regex-range@5.0.1: 840 | dependencies: 841 | is-number: 7.0.0 842 | 843 | tslib@2.8.1: {} 844 | 845 | universalify@0.1.2: {} 846 | 847 | which@2.0.2: 848 | dependencies: 849 | isexe: 2.0.0 850 | -------------------------------------------------------------------------------- /scripts/health: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | source /etc/torproxy/internal/index.sh 6 | 7 | curl \ 8 | -s \ 9 | -x "socks5://127.0.0.1:$(current_socks_port)" \ 10 | https://check.torproject.org/api/ip | grep -q 'true' && echo "OK" || echo "FAIL" 11 | --------------------------------------------------------------------------------