Bypass Cloudflare for GitHub Action Pro - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
sn0wdr1am
V2EX    分享创造

Bypass Cloudflare for GitHub Action Pro

  •  
  •   sn0wdr1am 309 天前 1478 次点击
    这是一个创建于 309 天前的主题,其中的信息可能已经有所发展或是发生改变。

    Bypass Cloudflare for GitHub Action Pro

    Repo: https://github.com/snowdreamtech/bypass-cloudflare-for-github-action

    Marketplace: https://github.com/marketplace/actions/bypass-cloudflare-for-github-action-pro

    Never receive 403 Forbidden from Cloudflare again.

    Inspired by xiaotianxt/bypass-cloudflare-for-github-action

    GitHub Super-Linter CI Check dist/ CodeQL Coverage

    Requests from GitHub Action servers to a Cloudflare proxied host may be blocked by Cloudflare's Web Application Firewall(WAF) or Bot Fight Mode. This action automatically adds the public IP of the GitHub Action runner to Cloudflare's firewall Custom rules or Lists

    Features

    • Automatically retrieves the public IP of the GitHub Action runner.
    • Adds the runner's IP to Cloudflare's firewall custom rules.
    • Adds the runner's IP to Cloudflare's account list.
    • Cleans up by removing the IP from Cloudflare's firewall custom rules after the job is complete.
    • Cleans up by removing the IP from Cloudflare's account list after the job is complete.

    Inputs

    Input Description Required Default
    mode single/list/github false github
    cf_zone_id Cloudflare Zone ID true /
    cf_api_token Cloudflare API Token true /
    cf_account_id Cloudflare Account ID true /
    github_api_token Github API Token true /
    single_rule_description Rule Description For Mode Single false Bypass Cloudflare for GitHub Action (Single)
    list_rule_description Rule Description For Mode List false Bypass Cloudflare for GitHub Action (List)
    list_name List name false github_actions_runners
    clean Caution: It will remove your zone ruleset rule and your list false false

    Outputs

    Output Description
    time Time when finished.

    Usage

    To use this action, create a workflow in your repository's .github/workflows directory. Below is an example workflow file:

    name: Bypass Cloudflare for Github Action Pro on: [push] jobs: bypass-cloudflare-for-github-action-pro: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/[email protected] - name: Bypass Cloudflare for Github Action Pro uses: snowdreamtech/[email protected] with: mode: 'github' cf_account_id: ${{ secrets.CF_ACCOUNT_ID }} cf_api_token: ${{ secrets.CF_API_TOKEN }} cf_zone_id: ${{ secrets.CF_ZONE_ID }} github_api_token: ${{ secrets.GITHUB_TOKEN }} - name: Send request to Cloudflare-protected server run: curl https://example.com/api 

    Important Note

    This action requires a Cloudflare API Token, not the Global API Key. To create an API token:

    1. Log in to the Cloudflare dashboard.
    2. Go to "My Profile" > "API Tokens".
    3. Click "Create Token".
    4. Create a custom token with the following permissions:
      • Account > Account Filter > Edit
      • Zone > Zone WAF > Edit
      • Zone > Zone Settings > Edit
      • Zone > Zone > Edit
    5. Set the token to access the specific account you're working with.
    6. Set the token to access the specific zone you're working with.
    7. Create the token and save it securely.

    Remember to add your Cloudflare Account ID, Cloudflare Zone ID and the new API Token to your GitHub repository secrets as CF_ACCOUNT_ID, CF_ZONE_ID and CF_API_TOKEN respectively.

    About the GITHUB_TOKEN secret

    At the start of each workflow job, GitHub automatically creates a unique GITHUB_TOKEN secret to use in your workflow. You can use the GITHUB_TOKEN to authenticate in the workflow job.

    Before each job begins, GitHub fetches an installation access token for the job. The GITHUB_TOKEN expires when a job finishes or after a maximum of 24 hours.

    Limits

    The global rate limit for the Cloudflare API is 1200 requests per five minute period per user, and applies cumulatively regardless of whether the request is made via the dashboard, API key, or AI token.

    If you exceed this limit, all API calls for the next five minutes will be blocked, receiving a HTTP 429 - Too Many Requests response.

    目前尚无回复
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2871 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 23ms UTC 14:23 PVG 22:23 LAX 07:23 JFK 10:23
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86