Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/auto-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
Expand All @@ -42,7 +42,9 @@ jobs:
./xray version

- name: Run V2Ray Tester (CLI Mode)
id: run_tester
timeout-minutes: 25
continue-on-error: true
run: |
python main.py --cli --max-configs 500
env:
Expand All @@ -52,6 +54,7 @@ jobs:
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}

- name: Generate Statistics
if: always()
env:
PYTHONIOENCODING: utf-8
run: |
Expand Down Expand Up @@ -86,6 +89,7 @@ jobs:
"

- name: Update badge data
if: always()
env:
PYTHONIOENCODING: utf-8
run: |
Expand All @@ -112,6 +116,7 @@ jobs:
"

- name: Commit and push if changed
if: always()
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/telegram-publisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
Expand Down
4 changes: 4 additions & 0 deletions core/cli_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ async def _process_source(self, url: str):
# Assuming ConfigDiscoverer has this method based on Worker usage
configs = await self.config_discoverer.fetch_configs_from_source(url, session=self.session)
count = 0
max_configs = self.app_state.max_configs
for uri in configs:
# Enforce max_configs limit
if max_configs > 0 and self.config_queue.qsize() >= max_configs:
break
if uri not in self.unique_uris and self.test_runner.security_validator.validate_uri(uri):
self.unique_uris.add(uri)
await self.config_queue.put(uri)
Expand Down