Skip to content

Commit

Permalink
chore: initial 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
fyvri committed Dec 6, 2024
0 parents commit 03ebaa7
Show file tree
Hide file tree
Showing 43 changed files with 6,377 additions and 0 deletions.
200 changes: 200 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
name: Continuous Integration

on:
schedule:
- cron: "0 * * * *"
workflow_dispatch:
inputs:
logLevel:
description: "Log level"
required: true
default: "info"
type: choice
options:
- info
- warning
- debug

env:
TZ: Asia/Jakarta
EMOJI_CHEAT_SHEETS: "👻,😻,💕,🤍,💨,🧚,🧜‍♀️,🧞,💃,🐣,🐉,🦕,🦖,🐳,🐬,🦋,🌻,🌼,🌱,🌿,🍀,🍃,🍻,🛫,🪂,🚀,🌟,✨,⚡,🔥,🎉"

jobs:
build:
name: Build and Testing
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...

prepare:
name: Prepare Branch
runs-on: ubuntu-latest
needs: [build]

steps:
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main

- name: Remove ${{ vars.ARCHIVE_BRANCH_NAME }} branch if it exists
run: |
if git ls-remote --exit-code --heads origin ${{ vars.ARCHIVE_BRANCH_NAME }}; then
echo "Branch deleted successfully"
git push https://x-access-token:${{ secrets.WORKFLOW_GITHUB_TOKEN }}@github.com/${{ github.repository }} --delete ${{ vars.ARCHIVE_BRANCH_NAME }}
else
echo "Branch does not exist"
fi
update:
name: Update Proxies
runs-on: ubuntu-latest
needs: [prepare]
permissions:
contents: write

steps:
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main

- name: Configure GIT
run: |
git config --global user.email $(git log --reverse --format='%ae' | head -n 1)
git config --global user.name $(git log --reverse --format='%an' | head -n 1)
- name: Create ${{ vars.ARCHIVE_BRANCH_NAME }} branch
run: |
git checkout -b ${{ vars.ARCHIVE_BRANCH_NAME }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"

- name: Install dependencies
run: |
go mod tidy
- name: Run Go program
env:
PROXY_RESOURCES: ${{ secrets.PROXY_RESOURCES }}
run: |
go run ./cmd/main.go
- name: Check for changes
run: |
if [ "$(git status --porcelain)" ]; then
echo "Changes detected"
echo "CHANGES_EXIST=true" >> $GITHUB_ENV
else
echo "No changes to commit"
echo "CHANGES_EXIST=false" >> $GITHUB_ENV
fi
- name: Commit files
if: env.CHANGES_EXIST == 'true'
run: |
git add storage
git commit -m "chore(bot): update proxies at $(date '+%a, %d %b %Y %H:%M:%S (GMT+07:00)' | tr '[:upper:]' '[:lower:]') $(echo $EMOJI_CHEAT_SHEETS | tr ',' '\n' | shuf -n 1)"
- name: Push changes to ${{ vars.ARCHIVE_BRANCH_NAME }} branch
if: env.CHANGES_EXIST == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.WORKFLOW_GITHUB_TOKEN }}
branch: ${{ vars.ARCHIVE_BRANCH_NAME }}
force: true

release:
name: Release
runs-on: ubuntu-latest
needs: [update]
permissions:
contents: write

steps:
- name: Checkout ${{ vars.ARCHIVE_BRANCH_NAME }} branch
uses: actions/checkout@v4
with:
ref: ${{ vars.ARCHIVE_BRANCH_NAME }}

- name: Configure GIT
run: |
git config --global user.email $(git log --reverse --format='%ae' | head -n 1)
git config --global user.name $(git log --reverse --format='%an' | head -n 1)
- name: Get last commit time on ${{ vars.ARCHIVE_BRANCH_NAME }} branch
run: |
echo "UPDATED_AT=$(date -d "$(git log -1 --format=%cd --date=iso-strict)" "+%A, %B %e, %Y at %H:%M:%S (GMT+07:00)" | awk '{$1=$1; print}')" >> $GITHUB_ENV
- name: Count proxies
run: |
echo "HTTP_PROXY_COUNT=$(grep -v '^$' ./storage/classic/http.txt | wc -l)" >> $GITHUB_ENV
echo "HTTPS_PROXY_COUNT=$(grep -v '^$' ./storage/classic/https.txt | wc -l)" >> $GITHUB_ENV
echo "SOCKS4_PROXY_COUNT=$(grep -v '^$' ./storage/classic/socks4.txt | wc -l)" >> $GITHUB_ENV
echo "SOCKS5_PROXY_COUNT=$(grep -v '^$' ./storage/classic/socks5.txt | wc -l)" >> $GITHUB_ENV
- name: Extract 10 fresh proxies
run: |
echo "HTTP_PROXIES=$(shuf -n 10 ./storage/classic/http.txt | awk '{printf "%s\\n", $0}')" >> $GITHUB_ENV
echo "HTTPS_PROXIES=$(shuf -n 10 ./storage/classic/https.txt | awk '{printf "%s\\n", $0}')" >> $GITHUB_ENV
echo "SOCKS4_PROXIES=$(shuf -n 10 ./storage/classic/socks4.txt | awk '{printf "%s\\n", $0}')" >> $GITHUB_ENV
echo "SOCKS5_PROXIES=$(shuf -n 10 ./storage/classic/socks5.txt | awk '{printf "%s\\n", $0}')" >> $GITHUB_ENV
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main

- name: Update documentation
run: |
sed \
-e "s/{{UPDATED_AT}}/${UPDATED_AT}/" \
-e "s/{{HTTP_PROXY_COUNT}}/${HTTP_PROXY_COUNT}/" \
-e "s/{{HTTPS_PROXY_COUNT}}/${HTTPS_PROXY_COUNT}/" \
-e "s/{{SOCKS4_PROXY_COUNT}}/${SOCKS4_PROXY_COUNT}/" \
-e "s/{{SOCKS5_PROXY_COUNT}}/${SOCKS5_PROXY_COUNT}/" \
-e "s/{{HTTP_PROXIES}}/${HTTP_PROXIES}/" \
-e "s/{{HTTPS_PROXIES}}/${HTTPS_PROXIES}/" \
-e "s/{{SOCKS4_PROXIES}}/${SOCKS4_PROXIES}/" \
-e "s/{{SOCKS5_PROXIES}}/${SOCKS5_PROXIES}/" \
./docs/README.template.md > ./README.md
- name: Check for changes
run: |
if [ "$(git status --porcelain)" ]; then
echo "Changes detected"
echo "CHANGES_EXIST=true" >> $GITHUB_ENV
else
echo "No changes to commit"
echo "CHANGES_EXIST=false" >> $GITHUB_ENV
fi
- name: Commit changes
if: env.CHANGES_EXIST == 'true'
run: |
git add README.md
git commit -m "docs: release fresh proxy list $(echo $EMOJI_CHEAT_SHEETS | tr ',' '\n' | shuf -n 1)"
- name: Push changes
if: env.CHANGES_EXIST == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.WORKFLOW_GITHUB_TOKEN }}
branch: main
force: true
25 changes: 25 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Static Analysis

on:
push:
pull_request:

jobs:
build:
name: Build and Testing
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.idea
/.vscode
.env
*temp.*
19 changes: 19 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
The MIT License (MIT)

Copyright (c) Azis Alvriyanto <azisalvriyanto@membasuh.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons
to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
142 changes: 142 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
[donate::shield]: https://img.shields.io/badge/Donate-Saweria-orange.svg
[donate::url]: https://saweria.co/azisalvriyanto
[contributors::shield]: https://img.shields.io/github/contributors/fyvri/fresh-proxy-list?style=flat
[contributors::url]: https://github.com/fyvri/fresh-proxy-list/graphs/contributors
[license::shield]: https://img.shields.io/badge/License-MIT-4b9081?style=flat
[license::url]: https://github.com/fyvri/fresh-proxy-list/blob/HEAD/LICENSE.md
[watchers::shield]: https://img.shields.io/github/watchers/fyvri/fresh-proxy-list?style=flat&logo=github&label=Watchers
[watchers::url]: https://github.com/fyvri/fresh-proxy-list/watchers
[stars::shield]: https://img.shields.io/github/stars/fyvri/fresh-proxy-list?style=flat&logo=github&label=Stars
[stars::url]: https://github.com/fyvri/fresh-proxy-list/stargazers
[forks::shield]: https://img.shields.io/github/forks/fyvri/fresh-proxy-list?style=flat&logo=github&label=Forks
[forks::url]: https://github.com/fyvri/fresh-proxy-list/network/members
[continuous-integration::shield]: https://github.com/fyvri/fresh-proxy-list/actions/workflows/continuous-integration.yml/badge.svg
[continuous-integration::url]: https://github.com/fyvri/fresh-proxy-list/actions/workflows/continuous-integration.yml
[static-analysis::shield]: https://github.com/fyvri/fresh-proxy-list/actions/workflows/static-analysis.yml/badge.svg
[static-analysis::url]: https://github.com/fyvri/fresh-proxy-list/actions/workflows/static-analysis.yml
[last-commit::shield]: https://img.shields.io/github/last-commit/fyvri/fresh-proxy-list?style=flat&logo=github&label=last+update
[last-commit::url]: https://github.com/fyvri/fresh-proxy-list/activity?ref=archive
[commit-activity::shield]: https://img.shields.io/github/commit-activity/w/fyvri/fresh-proxy-list?style=flat&logo=github
[commit-activity::url]: https://github.com/fyvri/fresh-proxy-list/commits/archive
[discussions::shield]: https://img.shields.io/github/discussions/fyvri/fresh-proxy-list?style=flat&logo=github
[discussions::url]: https://github.com/fyvri/fresh-proxy-list/discussions
[issues::shield]: https://img.shields.io/github/issues/fyvri/fresh-proxy-list?style=flat&logo=github
[issues::url]: https://github.com/fyvri/fresh-proxy-list/issues

<div id="readme-top" align="center">

<h1> Fresh Proxy List</h1>

[![Donate][donate::shield]][donate::url]
[![License][license::shield]][license::url]
[![Static Analysis][static-analysis::shield]][static-analysis::url]
[![Continuous Integration][continuous-integration::shield]][continuous-integration::url]
</br>
[![Last Commit][last-commit::shield]][last-commit::url]
[![Commit Activity][commit-activity::shield]][commit-activity::url]
[![Discussions][discussions::shield]][discussions::url]
[![Issues][issues::shield]][issues::url]

An automatically ⏰ updated list of free `HTTP`, `HTTPS`, `SOCKS4`, and `SOCKS5` proxies, available in multiple formats including `TXT`, `CSV`, `JSON`, `XML`, and `YAML`. The list is refreshed ⚡ **hourly** to provide the most accurate 🎯 and up-to-date information. The current data snapshot was 🚀 last updated on `Friday, December 6, 2024`, ensuring that users have access to the latest and most reliable proxies 🍃 available.

<picture>
<img alt="HTTP" src="https://img.shields.io/badge/HTTP-0-4b9081?style=social&logo=adminer" />
</picture>
&nbsp;
<picture>
<img alt="HTTPS" src="https://img.shields.io/badge/HTTPS-0-4b9081?style=social&logo=adminer" />
</picture>
&nbsp;
<picture>
<img alt="SOCKS4" src="https://img.shields.io/badge/SOCKS4-0-4b9081?style=social&logo=adminer" />
</picture>
&nbsp;
<picture>
<img alt="SOCKS5" src="https://img.shields.io/badge/SOCKS5-0-4b9081?style=social&logo=adminer" />
</picture>

</div>

## 📃 About

This repository contains a free list of `HTTP/S` and `SOCKS4/5` proxies.

- [x] 24/7 hourly updates (Committing since December 2024)
- [x] Supported list formats: `TXT`, `CSV`, `JSON`, `XML`, and `YAML`
- [x] No authentication is required when connecting any of these proxies

> [!TIP]
> Be sure to read this documentation.
<p align="right">[ <a href="#readme-top">back to top</a> ]</p>

## 🔗 Proxy List Links

Duplicated proxies are removed — the only exception is if an IP has a different port open.

1. Classic View (IP:Port only)

| Category | Links by File Type |
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| All | [`TXT`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/all.txt), [`CSV`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/all.csv), [`JSON`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/all.json), [`XML`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/all.xml), [`YAML`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/all.yaml) |
| HTTP | [`TXT`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/http.txt), [`CSV`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/http.csv), [`JSON`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/http.json), [`XML`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/http.xml), [`YAML`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/http.yaml) |
| HTTPS | [`TXT`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/https.txt), [`CSV`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/https.csv), [`JSON`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/https.json), [`XML`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/https.xml), [`YAML`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/https.yaml) |
| SOCKS4 | [`TXT`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/socks4.txt), [`CSV`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/socks4.csv), [`JSON`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/socks4.json), [`XML`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/socks4.xml), [`YAML`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/socks4.yaml) |
| SOCKS5 | [`TXT`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/socks5.txt), [`CSV`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/socks5.csv), [`JSON`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/socks5.json), [`XML`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/socks5.xml), [`YAML`](https://raw.githubusercontent.com/fyvri/fresh-proxy-list/archive/storage/classic/socks5.yaml) |

2. Advanced View (With full information)

_Coming soon_

<p align="right">[ <a href="#readme-top">back to top</a> ]</p>

## 🎁 Example Results

HTTP

```txt
```

HTTPS

```txt
```

SOCKS4

```txt
```

SOCKS5

```txt
```

<p align="right">[ <a href="#readme-top">back to top</a> ]</p>

## 👥 Contributing

If you have any ideas, [open an issue](https://github.com/fyvri/fresh-proxy-list/issues/new) and tell me what you think.

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

> [!IMPORTANT]
> If you have a suggestion that would make this better, please fork the repo and create a pull request. Don't forget to give the project a star 🌟! I can't stop saying thank you!
>
> 1. Fork this project
> 2. Create your feature branch (`git checkout -b feature/awesome-feature`)
> 3. Commit your changes (`git commit -m "feat: add awesome feature"`)
> 4. Push to the branch (`git push origin feature/awesome-feature`)
> 5. Open a pull request
<p align="right">[ <a href="#readme-top">back to top</a> ]</p>

## 📜 License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

<p align="right">[ <a href="#readme-top">back to top</a> ]</p>
Loading

0 comments on commit 03ebaa7

Please sign in to comment.