proton URL

protonURL

安全且保密的共享

🎄 节日特辑

组织您的神秘圣诞老人活动。
谁也偷看不了。

输入名字,我们来抽签,并为每位参与者生成一个 protonURL 链接。每个人只能打开一次自己的链接,看到要给谁送礼物……随后消息自动销毁。

免费抽签,无需注册

每行一个名字,3 到 30 人。
每行一对,用逗号分隔。例如:Alice, Bob
预算、日期、地点……会附加到每个链接中。

🔒 抽签和加密都在您的浏览器中完成:我们收不到任何名字或配对,只会收到我们无法读取的加密消息。

使用方法

  1. 1

    输入名字

    添加参与者,如有需要,再添加不能互相抽到的人(例如情侣)。

  2. 2

    我们来抽签

    所有人被随机排进一个送礼圈,然后为每位参与者生成一个加密的 protonURL 链接。

  3. 3

    发送链接

    每个人通过短信、WhatsApp 或邮件收到自己的链接。读取后,消息即被销毁。

🕵️ 如果有人想偷看呢?

protonURL 链接只能打开一次。如果组织者(或任何人)打开了别人的链接,真正的接收者会发现链接已被打开过:作弊立刻暴露。重新抽一次就好。

传统神秘圣诞老人的麻烦

📝

纸条抽签

必须所有人聚在一起,而且总有人抽到自己。

🙈

组织者什么都知道

负责抽签的人能看到所有配对,对他来说毫无惊喜。

📧

专用应用

要注册账号、留邮箱、看广告……只为抽几个名字。

🔒 真正保密,连组织者也不知道

  • 🙅 没有“全部揭晓”按钮

    配对结果不会显示给任何人。组织者只看到链接,看不到抽中的名字。

  • 🤖 不使用 AI

    您的名单绝不会发送给任何人工智能服务。

  • 🚫 无需账号

    无需注册,无需邮箱,没有广告。未打开的链接会在一个月后删除。

“我刚用它组织了一次神秘圣诞老人活动!正是我需要的,效果很好。连我自己都不知道结果,这样更有意思。”
— Mat,我们 API 的首批用户之一

🔍 写给谨慎的您

不想把抽签交给我们?

在您自己的电脑上运行。脚本简短易读:抽签在您的电脑上进行,而不是在我们的服务器上。protonURL 随后只负责存储每条加密消息,和其他任何链接一样。

  1. 获取免费 API 密钥(每月 20 次调用,无需信用卡)。
  2. 下载脚本,填入您的密钥、参与者和留言。
  3. 运行 python3 secret-santa.py:每位参与者得到一个链接。
#!/usr/bin/env python3
"""
Secret Santa with protonURL — https://protonurl.com/secret-santa.html

Draws names and creates one self-destructing link per participant.
Nobody, not even the organiser, knows who got whom: each person opens
their own link once, and the message is destroyed right after.

Requirements: Python 3.8+, no extra package.
Usage: edit the settings below, then run `python3 secret-santa.py`
"""

import json
import random
import sys
import urllib.error
import urllib.request

# ── Settings ────────────────────────────────────────────────────────────────

API_KEY = "YOUR_API_KEY"  # Free key (20 calls/month): https://protonurl.com/free-trial.html

PARTICIPANTS = ["Alice", "Bob", "Charlie", "Diana", "Eve"]

# Optional: people who must not draw each other (couples, roommates…)
EXCLUSIONS = [
    ("Alice", "Bob"),
]

MESSAGE = (
    "🎅 Hi {giver}!\n\n"
    "You are {receiver}'s Secret Santa! 🎁\n"
    "You're the one buying them a gift.\n\n"
    "Keep it secret 🤫 This message has now self-destructed: "
    "write the name down or take a screenshot, you won't be able to read it again.\n\n"
    "🎄 Run your own Secret Santa: https://protonurl.com/secret-santa.html"
)

DURATION_HOURS = 744  # Unopened links expire after 1 month. Allowed: 1, 72, 168, 744, 4464, 8760

# ── Script ──────────────────────────────────────────────────────────────────

API_URL = "https://api.protonurl.com"
ALLOWED_DURATIONS = (1, 72, 168, 744, 4464, 8760)


def api_call(method, path, payload=None):
    request = urllib.request.Request(
        API_URL + path,
        data=json.dumps(payload).encode() if payload is not None else None,
        method=method,
        headers={
            "Authorization": "Bearer " + API_KEY,
            "Content-Type": "application/json",
        },
    )
    try:
        with urllib.request.urlopen(request, timeout=30) as response:
            return json.load(response)
    except urllib.error.HTTPError as error:
        sys.exit(f"API error {error.code}: {error.read().decode(errors='replace')}")


def draw(people, exclusions, attempts=10_000):
    """Shuffle everyone into a single gift circle, so nobody draws themselves."""
    rng = random.SystemRandom()
    forbidden = {frozenset(pair) for pair in exclusions}
    for _ in range(attempts):
        circle = people[:]
        rng.shuffle(circle)
        pairs = [(circle[i], circle[(i + 1) % len(circle)]) for i in range(len(circle))]
        if not any(frozenset(pair) in forbidden for pair in pairs):
            return pairs
    sys.exit("No valid draw found: there are too many exclusions.")


def main():
    if API_KEY == "YOUR_API_KEY":
        sys.exit("Set your API key first: https://protonurl.com/free-trial.html")
    if len(PARTICIPANTS) < 3:
        sys.exit("You need at least 3 participants.")
    if len(set(PARTICIPANTS)) != len(PARTICIPANTS):
        sys.exit("Each participant name must be unique.")
    if type(DURATION_HOURS) is not int or DURATION_HOURS not in ALLOWED_DURATIONS:
        sys.exit(f"DURATION_HOURS must be one of {ALLOWED_DURATIONS}.")

    # Check the quota first, so the draw never stops halfway (this check uses 1 call)
    remaining = api_call("GET", "/quota").get("remaining")
    if remaining is not None and remaining < len(PARTICIPANTS):
        sys.exit(f"Only {remaining} API calls left this month, "
                 f"{len(PARTICIPANTS)} needed: https://protonurl.com/pricing.html")

    pairs = draw(PARTICIPANTS, EXCLUSIONS)

    print("Send each person their own link (and only theirs!):\n")
    for giver, receiver in sorted(pairs):
        link = api_call("POST", "/create", {
            "text": MESSAGE.format(giver=giver, receiver=receiver),
            "duration": DURATION_HOURS,
        })["url"]
        print(f"  {giver:<20} {link}")

    print("\nEach link works only once. If someone says theirs was already opened,")
    print("somebody peeked: just run the script again for a fresh draw.")


if __name__ == "__main__":
    main()

使用免费密钥,一次抽签最多可有 19 位参与者(脚本开始前会用一次调用检查您的额度)。人数更多时,API Pro 套餐每月包含 1,000 次调用。