项目作者: ffreemt

项目描述 :
Extend dns expiry date on noip.com
高级语言: Python
项目地址: git://github.com/ffreemt/extend-noip.git
创建时间: 2021-02-20T11:01:48Z
项目社区:https://github.com/ffreemt/extend-noip

开源协议:MIT License

下载


extend-noip

Code style: blackLicense: MITPyPI version

Extend dns expiry date on noip.com

Automate extending dns/domain expiry date on noip.com

中文读我.md

  • Fork this repo https://github.com/ffreemt/extend-noip
  • Set the resultant repo Secrets

    |Name | Value |
    |— | — |
    |NOIP_USERNAME:| your_noip_username|
    |NOIP_PASSWORD:| your_noip_password |

  • [Optionally] Change crontab in line 6 of .github/workflows/on-push-schedule-extend-noip.yml(link) to your like. (This online crontab editor may come handy https://crontab.guru/#00/9__*)

Installtion

  1. pip install extend-noip

or clone https://github.com/ffreemt/extend-noip and install from the repo.

Usage

Supply noip username and password from the command line:

  1. python -m extend-noip -u your_noip_username -p password

or use directly the extend-noip script:

  1. extend-noip -u your_noip_username -p password

Use environment variables NOIP_USERNAME and NOIP_PASSWORD

  • Set username/password from the command line:
    1. set NOIP_USERNAME=your_noip_username # export in Linux or iOS
    2. set NOIP_PASSWORD=password
  • Or set username/password in .env, e.g.,
    ```bash

    .env

    NOIP_USERNAME=your_noip_username
    NOIP_USERNAME=password

Run extend-noip or python -m extend_noip:

  1. extend-noip

or

  1. python -m extend_noip

Check information only

  1. extend-noip -i

or

  1. python -m extend_noip -i

Print debug info

  1. extend-noip -d

or

  1. python -m extend_noip -d

Brief Help

  1. extend-noip --helpshort

or

  1. python -m extend_noip --helpshort

Turn off Headless Mode (Show the browser in action)

You can configure NOIP_HEADFUL, NOIP_DEBUG and NOIP_PROXY in the .env file in the working directory or any of its parent directoreis. For example,

  1. # .env
  2. NOIP_HEADFUL=1
  3. NOIP_DEBUG=true
  4. # NOIP_PROXY

Automation via Github Actions

It’s straightforward to setup extend-noip to run via Github Actions, best with an infrequent crontab.

  • Fork this repo
  • Setup Actions secrets via Settings/Add repository secrets:
Name Value
NOIP_USERNAME: your_noip_username
NOIP_PASSWORD: your_noip_password

For example, in .github/workflows/schedule-extend-noip.yml

  1. name: schedule-extend-noip
  2. on:
  3. push:
  4. schedule:
  5. - cron: '10,40 3 */9 * *'
  6. ...
  7. setup, e.g. pip install -r requirements.txt or
  8. poetry install --no-dev
  9. ...
  10. - name: Testrun
  11. env:
  12. NOIP_USERNAME: ${{ secrets.NOIP_USERNAME }}
  13. NOIP_PASSWORD: ${{ secrets.NOIP_PASSWORD }}
  14. run: |
  15. python -m extend_noip -d -i