mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-07-23 11:58:02 +00:00
.github
app
core
extras
auth
command.go
http.go
http_test.go
http_test.py
password.go
password_test.go
userpass.go
userpass_test.go
obfs
outbounds
trafficlogger
go.mod
go.sum
.gitignore
PROTOCOL.md
README.md
go.work
go.work.sum
hyperbole.py
platforms.txt
25 lines
547 B
Python
25 lines
547 B
Python
from flask import Flask, request, jsonify
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
|
@app.route("/auth", methods=["POST"])
|
|
def auth():
|
|
data = request.json
|
|
|
|
if data is None:
|
|
return jsonify({"ok": False, "id": ""}), 400
|
|
|
|
addr = data.get("addr", "")
|
|
auth = data.get("auth", "")
|
|
tx = data.get("tx", 0)
|
|
|
|
if addr == "123.123.123.123:5566" and auth == "wahaha" and tx == 12345:
|
|
return jsonify({"ok": True, "id": "some_unique_id"})
|
|
else:
|
|
return jsonify({"ok": False, "id": ""})
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app.run()
|