Git Product home page Git Product logo

sweetlisa's Introduction

SweetLisa

Center side infrastructure for RDA.

Special Usage

Subscription Flags

Flags can be added to the subscription link.

# filter out ipv4
https://sweetlisa.tuta.cc/api/ticket/<your user ticket>/sub/4

# filter out ipv6, and force to show the quotas
https://sweetlisa.tuta.cc/api/ticket/<your user ticket>/sub/6,quota

# force to disable the quotas
https://sweetlisa.tuta.cc/api/ticket/<your user ticket>/sub/noquota

Telegram Commands

In the anonymous channel, you can send following commands:

  1. /sweetlisa: show the link of management.
  2. /verify <verification code>: verify qualification.
  3. /revoke <ticket>: revoke your ticket immediately.

Setup

You can set up your own SweetLisa at your own machines.

Prepare

Domain

  1. A domain like sweetlisa.tuta.cc.
  2. Proxy your domain by the CDN (we only support Cloudflare now).
  3. Set URL Rewrite rules to your SweetLisa domain in Transform Rules in Cloudflare:
    1. (ip.geoip.country eq "CN" and http.user_agent ne "BitterJohn" and http.host eq "yourdomain"), path rewrite to block-cn, and query rewrite to empty
    2. (ip.geoip.country eq "CN" and http.user_agent ne "BitterJohn" and http.host eq "yourdomain" and not http.request.uri.path contains "/api/"), path rewrite to block-cn, and query rewrite to empty
  4. Set Page Rules to your SweetLisa domain in Cloudflare:
    1. yourdomain/block-cn-html,Forwarding URL,https://e14914c0-6759-480d-be89-66b7b7676451.github.io/blocked-page/cn.html
    2. yourdomain/block-cn,Forwarding URL,https://e14914c0-6759-480d-be89-66b7b7676451.github.io/blocked-page/cn.txt
  5. Delete all your Firewall rules of your SweetLisa domain because the firewall can log the accesses.
  6. Set the TXT record as a API Token of Cloudflare at cdn-validate.yourdomain, which should have privilege to access to the Account - Account Rulesets:Read and Page Rules:Read, Firewall Services:Read to validate your CDN Settings.

Telegram

  1. A bot token from @BotFather.
  2. An anonymous channel with your bot.

Systemd

# /etc/systemd/system/SweetLisa.service
[Unit]
Description=SweetLisa Service
After=network.target

[Service]
Type=simple
User=root
Restart=always
ExecStart=/usr/bin/SweetLisa -a 127.0.0.1:14914 --bot-token <yourtoken> --host <yourdomain> --log-level info --cn-proxy <optional>

[Install]
WantedBy=multi-user.target

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.