28 lines
640 B
Python
28 lines
640 B
Python
"""
|
|
validate.py -- Flask app re-export of the shared validation module.
|
|
|
|
~/router/validation.py is volume-mounted to /app/validation.py by
|
|
docker-compose, making it directly importable. Action scripts import
|
|
this module (validate.*) so they are insulated from the shared file's
|
|
location and name.
|
|
"""
|
|
from validation import (
|
|
VALID_PROTOCOLS,
|
|
VALID_BLOCKLIST_FORMATS,
|
|
ip,
|
|
ip_or_cidr,
|
|
port,
|
|
banned_ip,
|
|
)
|
|
|
|
VALID_DDNS_PROVIDERS = ('noip', 'cloudflare', 'duckdns')
|
|
|
|
__all__ = [
|
|
'VALID_PROTOCOLS',
|
|
'VALID_BLOCKLIST_FORMATS',
|
|
'VALID_DDNS_PROVIDERS',
|
|
'ip',
|
|
'ip_or_cidr',
|
|
'port',
|
|
'banned_ip',
|
|
]
|