proton URL

protonURL

المشاركة الآمنة والسرية

🎄 عدد الأعياد

نظّم لعبة سانتا السري.
لا أحد يستطيع التلصص.

أدخل الأسماء، ونجري نحن القرعة وننشئ رابط protonURL لكل مشارك. يفتح كل شخص رابطه مرة واحدة فقط، فيعرف لمن سيشتري الهدية… ثم تدمّر الرسالة نفسها.

قرعة مجانية، دون تسجيل

اسم واحد في كل سطر، من 3 إلى 30 أشخاص.
زوج واحد في كل سطر، مفصول بفاصلة. مثال: Alice, Bob
الميزانية، الموعد، المكان… ستُضاف إلى كل رابط.

🔒 تتم القرعة والتشفير في متصفحك: لا نتلقى الأسماء ولا الأزواج، بل رسائل مشفّرة فقط لا يمكننا قراءتها.

كيف تعمل

  1. 1

    أدخل الأسماء

    أضف المشاركين، وعند الحاجة الأشخاص الذين يجب ألا يقع أحدهم على الآخر (الأزواج مثلاً).

  2. 2

    نجري القرعة

    يُوضع الجميع في دائرة هدايا عشوائية، ثم يُنشأ رابط protonURL مشفّر لكل مشارك.

  3. 3

    أرسل الروابط

    يتلقى كل شخص رابطه عبر SMS أو WhatsApp أو البريد الإلكتروني. بمجرد قراءته، تُدمَّر الرسالة.

🕵️ وماذا لو حاول أحدهم التلصص؟

رابط protonURL لا يُفتح إلا مرة واحدة. إذا فتح المنظِّم (أو أي شخص آخر) رابط غيره، سيجد صاحبه الحقيقي رابطاً سبق فتحه: فينكشف الغش فوراً. يكفي حينها إجراء قرعة جديدة.

مشكلة سانتا السري التقليدي

📝

الأوراق الصغيرة

يجب أن يجتمع الجميع في المكان نفسه، ودائماً ما يسحب أحدهم اسمه بنفسه.

🙈

المنظِّم يعرف كل شيء

من يجري القرعة يرى كل الأزواج. فلا تبقى له أي مفاجأة.

📧

التطبيقات المخصصة

حسابات يجب إنشاؤها، وعناوين بريد تُجمع، وإعلانات… لمجرد سحب بضعة أسماء.

🔒 سري حقاً، حتى عن المنظِّم

  • 🙅 لا زر "كشف الكل"

    لا تُعرض الأزواج على أي أحد. يرى المنظِّم الروابط فقط، لا الأسماء المسحوبة.

  • 🤖 بلا ذكاء اصطناعي

    لا تُرسل قوائم أسمائك أبداً إلى أي خدمة ذكاء اصطناعي.

  • 🚫 بلا حساب

    لا تسجيل، ولا بريد إلكتروني مطلوب، ولا إعلانات. تُحذف الروابط غير المفتوحة بعد شهر.

«استخدمته للتو لتنظيم لعبة سانتا السري! كان مفيداً لما أردت وعمل بشكل جيد. إنه سرّ حتى بالنسبة لي، وهذا أجمل.»
— 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 ألف استدعاء شهرياً.