File size: 1,861 Bytes
57fd3ba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
from flask import Flask, Response, jsonify
from flask_cors import CORS

port = 7860
host = "0.0.0.0"

app = Flask(__name__)
CORS(app)

@app.route('/', defaults={'path': ''})
@app.route('/<path:path>', methods=['GET', 'POST'])
def catch_all(path):
    # HTML content
    html = '''<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Under maintenance</title>
    <style>
      body {
        background-color: #f5f5f5;
        color: #333;
        font-family: Arial, sans-serif;
        line-height: 1.5;
        padding: 1em;
        max-width: 800px;
        margin: 0 auto
      }

      h1,
      h2,
      h3,
      h4,
      h5,
      h6 {
        font-weight: bold;
        margin-top: 1.5em
      }
    </style>
  </head>
  <body>
    <h1>A note from us</h1>
	<hr>
    <p>Hello, discord users and redditors. An inside man from the janitorai discord told me that you were using my proxy.</p>
	<p>Stop using these proxies. Most, if not all of the proxies you use are made by 4chan users.</p><p>The code that all of these reverse proxies run were made by an anonymous user on 4chan.</p>
	<p>You are all nothing but worthless leeches.</p>
	<p>We do not like you. Stop using these proxies. Make your own.</p>
    <hr>
	<p>
		Want to talk? Add me on Discord.<br>
		<strong>Discord Username: "lainchan.org"</strong>
	</p>
  </body>
</html>'''
    # html = '''HuggingFace is, once again, currently experiencing a DDoS attack. Please check back within 24 hours. Due to being banned from the JanitorAI server under false pretenses, I am unable to properly communicate with you all. Apologies for the inconvenience. Discord tag: Moxxie#4385'''
    # return html
    return Response(html, status=403)

if __name__ == '__main__':
    app.run(host=host, port=port)