diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index c7078ec1e2..0000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,81 +0,0 @@ ---- -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -name: "CodeQL" - -on: # yamllint disable-line rule:truthy - push: - branches: [develop, master] - pull_request: - branches: [develop, master] - paths: - - '**/*.py' - - '**/*.js' - - '**/*.ts' - schedule: - - cron: '0 14 * * 1' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - # Override automatic language detection by changing the below list - # Supported options are - # ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - language: ['python', 'javascript'] - # Learn more... - # https://docs.github.com/en/github - # /finding-security-vulnerabilities-and-errors-in-your-code - # /configuring-code-scanning#overriding-automatic-language-detection - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a - # config file. By default, queries listed here will override any - # specified in a config file. Prefix the list here with "+" to use - # these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually - # (see below) - # - name: Autobuild - # uses: github/codeql-action/autobuild@v1 - - # โ„น๏ธ Command-line programs to run using the OS shell. - # ๐Ÿ“š https://git.io/JvXDl - - # โœ๏ธ If the Autobuild fails above, remove it and uncomment the following - # three lines and modify them (or add more) to build your code if your - # project uses a compiled language - - # - run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 -... diff --git a/.github/workflows/test-brew.yml b/.github/workflows/test-brew.yml deleted file mode 100644 index db898f8320..0000000000 --- a/.github/workflows/test-brew.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: brew - -on: # yamllint disable-line rule:truthy - push: - branches: - - master - - develop - pull_request: - paths: - - 'proxy/**' - - 'tests/**' - - 'examples/**' - - 'requirements*' - - 'setup.cfg' - - 'check.py' - - 'MANIFEST.in' - - '.github/workflows/test-brew.yml' - - 'helper/homebrew/**' - -jobs: - build: - runs-on: ${{ matrix.os }}-latest - name: ๐Ÿ${{ matrix.python }} @ ${{ matrix.os }} - strategy: - matrix: - os: [macOS] - python: ['3.10'] - max-parallel: 1 - fail-fast: false - steps: - - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - name: Brew - run: | - brew install ./helper/homebrew/develop/proxy.rb - - name: Verify - run: | - proxy -h -... diff --git a/.github/workflows/test-dashboard.yml b/.github/workflows/test-dashboard.yml deleted file mode 100644 index 201d91d30d..0000000000 --- a/.github/workflows/test-dashboard.yml +++ /dev/null @@ -1,40 +0,0 @@ ---- -name: dashboard - -on: # yamllint disable-line rule:truthy - push: - branches: - - master - - develop - pull_request: - paths: - - 'dashboard/**' - - '.github/workflows/test-dashboard.yml' - -jobs: - build: - runs-on: ${{ matrix.os }}-latest - name: Node ${{ matrix.node }} @ ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu, windows, macOS] - node: ['10.x', '11.x', '12.x'] - max-parallel: 4 - fail-fast: false - steps: - - uses: actions/checkout@v2 - - name: Setup Node - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node }} - - name: Install Dependencies - run: | - cd dashboard - npm install - cd .. - - name: Build Dashboard - run: | - cd dashboard - npm run build - cd .. -... diff --git a/.github/workflows/test-docker.yml b/.github/workflows/test-docker.yml deleted file mode 100644 index 915cec6ab3..0000000000 --- a/.github/workflows/test-docker.yml +++ /dev/null @@ -1,47 +0,0 @@ ---- -name: docker - -on: # yamllint disable-line rule:truthy - push: - branches: - - master - - develop - pull_request: - paths: - - 'proxy/**' - - 'tests/**' - - 'examples/**' - - 'requirements*' - - 'setup.cfg' - - 'check.py' - - 'MANIFEST.in' - - '.github/workflows/test-docker.yml' - - 'Dockerfile' - -jobs: - build: - runs-on: ${{ matrix.os }}-latest - name: ๐Ÿ${{ matrix.python }} @ ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu] - python: ['3.10'] - max-parallel: 1 - fail-fast: false - steps: - - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install -r requirements-release.txt - pip install -r requirements-testing.txt - pip install -r requirements-tunnel.txt - - name: Build - run: | - make container -... diff --git a/.github/workflows/test-library.yml b/.github/workflows/test-library.yml index 3482ed467c..181a4adcb9 100644 --- a/.github/workflows/test-library.yml +++ b/.github/workflows/test-library.yml @@ -7,16 +7,6 @@ on: # yamllint disable-line rule:truthy - master - develop pull_request: - paths: - - 'proxy/**' - - 'tests/**' - - 'examples/**' - - 'requirements*' - - 'setup.cfg' - - 'check.py' - - 'MANIFEST.in' - - '.github/workflows/test-library.yml' - - '.*' workflow_dispatch: inputs: release-version: @@ -53,7 +43,7 @@ concurrency: jobs: pre-setup: - name: Pre-set global build settings + name: โš™๏ธ Pre-set global build settings runs-on: ubuntu-latest defaults: run: @@ -206,7 +196,7 @@ jobs: }}-py3-none-any.whl') build: - name: build dists ${{ needs.pre-setup.outputs.git-tag }} + name: ๐Ÿ‘ท dists ${{ needs.pre-setup.outputs.git-tag }} needs: - pre-setup # transitive, for accessing settings @@ -320,7 +310,7 @@ jobs: retention-days: 30 # Defaults to 90 lint: - name: ${{ matrix.toxenv }} + name: ๐Ÿงน ${{ matrix.toxenv }} needs: - build - pre-setup # transitive, for accessing settings @@ -420,7 +410,7 @@ jobs: --skip-pkg-install test: - name: ๐Ÿ${{ matrix.python }} @ ${{ matrix.os }} + name: ๐Ÿงช ๐Ÿ${{ matrix.python }} @ ${{ matrix.os }} needs: - build - pre-setup # transitive, for accessing settings @@ -428,6 +418,7 @@ jobs: runs-on: ${{ matrix.os }}-latest strategy: fail-fast: false + # max-parallel: 4 matrix: os: - macOS @@ -442,7 +433,6 @@ jobs: - 3.9 - 3.8 - 3.7 - max-parallel: 4 continue-on-error: >- ${{ @@ -533,10 +523,156 @@ jobs: flags: pytest, GHA, Python ${{ matrix.python }}, ${{ runner.os }} verbose: true + analyze: + runs-on: ubuntu-latest + name: ๐Ÿ›ก๏ธ Analyze + # schedule: + # - cron: '0 14 * * 1' + strategy: + fail-fast: false + matrix: + # Override automatic language detection by changing the below list + # Supported options are + # ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] + language: ['python', 'javascript'] + # Learn more... + # https://docs.github.com/en/github + # /finding-security-vulnerabilities-and-errors-in-your-code + # /configuring-code-scanning#overriding-automatic-language-detection + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 + + # If this run was triggered by a pull request event, then checkout + # the head of the pull request instead of the merge commit. + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a + # config file. By default, queries listed here will override any + # specified in a config file. Prefix the list here with "+" to use + # these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually + # (see below) + # - name: Autobuild + # uses: github/codeql-action/autobuild@v1 + + # โ„น๏ธ Command-line programs to run using the OS shell. + # ๐Ÿ“š https://git.io/JvXDl + + # โœ๏ธ If the Autobuild fails above, remove it and uncomment the following + # three lines and modify them (or add more) to build your code if your + # project uses a compiled language + + # - run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 + + brew: + runs-on: ${{ matrix.os }}-latest + name: ๐Ÿบ ๐Ÿ${{ matrix.python }} @ ${{ matrix.os }} + strategy: + matrix: + os: [macOS] + python: ['3.10'] + # max-parallel: 1 + fail-fast: false + steps: + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Brew + run: | + brew install ./helper/homebrew/develop/proxy.rb + - name: Verify + run: | + proxy -h + + dashboard: + runs-on: ${{ matrix.os }}-latest + name: ๐Ÿ“Š Node ${{ matrix.node }} @ ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu, windows, macOS] + node: ['10.x', '11.x', '12.x'] + max-parallel: 4 + fail-fast: false + steps: + - uses: actions/checkout@v2 + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node }} + - name: Install Dependencies + run: | + cd dashboard + npm install + cd .. + - name: Build Dashboard + run: | + cd dashboard + npm run build + cd .. + + docker: + # To build our docker container, we must wait for check, + # so that we can use the same distribution available. + # + # TL;DR -- Docker must be packaged with package from + # test.pypi.org or from pypi.org. + # needs: + # - publish-pypi + runs-on: ${{ matrix.os }}-latest + name: ๐Ÿณ ๐Ÿ${{ matrix.python }} @ ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu] + python: ['3.10'] + max-parallel: 1 + fail-fast: false + steps: + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -r requirements-release.txt + pip install -r requirements-testing.txt + pip install -r requirements-tunnel.txt + - name: Build + run: | + make container + check: # This job does nothing and is only used for the branch protection needs: - - lint + - analyze - test + - lint + - docker + - dashboard + - brew runs-on: ubuntu-latest @@ -574,7 +710,6 @@ jobs: with: password: ${{ secrets.PYPI_TOKEN }} - publish-testpypi: name: Publish ๐Ÿ๐Ÿ“ฆ to TestPyPI needs: @@ -598,13 +733,12 @@ jobs: name: python-package-distributions path: dist/ - name: >- - Publish ๐Ÿ๐Ÿ“ฆ v${{ needs.pre-setup.outputs.git-tag }}to TestPyPI + Publish ๐Ÿ๐Ÿ“ฆ v${{ needs.pre-setup.outputs.git-tag }} to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.TESTPYPI_API_TOKEN }} repository_url: https://test.pypi.org/legacy/ - post-release-repo-update: name: >- Publish post-release Git tag diff --git a/.vscode/settings.json b/.vscode/settings.json index 3cf36eb564..ccbc392b4c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,27 @@ { + "editor.rulers": [100], "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.formatOnSave": true, "editor.formatOnSaveMode": "modifications", + "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll": true }, - "editor.rulers": [100], + "[yaml]": { + "editor.insertSpaces": true, + "editor.tabSize": 2, + "editor.autoIndent": "advanced", + "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" + }, + "[typescript]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" + }, + "typescript.format.semicolons": "remove", + "typescript.preferences.quoteStyle": "single", + "[python]": { + "editor.wordBasedSuggestions": true, + "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" + }, "python.testing.unittestEnabled": false, "python.testing.autoTestDiscoverOnSaveEnabled": true, "python.testing.pytestEnabled": true, @@ -26,7 +42,5 @@ "python.linting.flake8Enabled": true, "python.linting.mypyEnabled": true, "python.formatting.provider": "autopep8", - "typescript.format.semicolons": "remove", - "typescript.preferences.quoteStyle": "single", "autoDocstring.docstringFormat": "sphinx" } diff --git a/README.md b/README.md index 59d68392ca..c9bd90ce60 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,5 @@ [![Proxy.Py](https://raw.githubusercontent.com/abhinavsingh/proxy.py/develop/ProxyPy.png)](https://github.com/abhinavsingh/proxy.py) -

-โšก Fast โ€ข ๐Ÿชถ Lightweight โ€ข 0๏ธโƒฃ Dependency โ€ข ๐Ÿ”Œ Pluggable โ€ข ๐Ÿ˜ˆ TLS interception โ€ข ๐Ÿ”’ DNS-over-HTTPS โ€ข ๐Ÿ”ฅ Poor Man's VPN โ€ข โช Reverse & โฉ Forward โ€ข ๐Ÿ‘ฎ๐Ÿฟ "Proxy Server" framework โ€ข ๐ŸŒ "Web Server" framework โ€ข โžต โžถ โžท โž  "PubSub" framework โ€ข ๐Ÿ‘ท "Work" acceptor & executor framework -

- [//]: # (DO-NOT-REMOVE-docs-badges-START) [![PyPi Monthly](https://img.shields.io/pypi/dm/proxy.py?style=for-the-badge&color=darkgreen)](https://pypi.org/project/proxy.py/)