Browse Source

commit warcrimes

master
Roxy 12 months ago
commit
5835becb62
  1. 4
      README.md
  2. 38
      furry-sex.rb
  3. 61
      nginx-config.conf

4
README.md

@ -0,0 +1,4 @@
# e621 Full Proxy
## What the fuck is this ?
Basically a script that was made by Yessiest that I've adapted to be a full proxy for e621 so you can access it at school so you can stay alive while being there 3====D

38
furry-sex.rb

@ -0,0 +1,38 @@
#!/usr/bin/env ruby
require "webrick"
require "net/http"
require "uri"
$replacements = {
"e621.net" => "e621.fuwwy.ch", # Replace this with your domain/subdomain obviously
">e621<" => ">e621.fuwwy.ch<", # This basically just changes the title shown on the main page
"https:" => "http:" # only needed if your nginx backend doesnt have ssl yet
}
class MyProxy < WEBrick::HTTPServlet::AbstractServlet
HOST = "e621.net" # set host to proxy duh
def do_GET(request, response)
uri = request.unparsed_uri
http = Net::HTTP.new(HOST, 443)
http.use_ssl = true
resp = http.request(Net::HTTP::Get.new(uri, {"User-Agent" => "amongus happy meal guys this is crazy i ordered an amogus happy meal at 3am hugy wugy came and sucked my dick this is so scary"}))
# please change this user agent to something unique otherwise e621 will block your request and you might get IP banned
body = resp.body
response.content_type = resp["content-type"]
$replacements.each { |k,v|
body = body.gsub(k,v)
}
response.body = body
end
end
server = WEBrick::HTTPServer.new(:Port => ENV["PORT"] || 8000) # define port on which the proxy runs ... so this would be localhost:8000
server.mount "/", MyProxy
trap("INT"){ server.shutdown }
server.start

61
nginx-config.conf

@ -0,0 +1,61 @@
resolver 8.8.8.8;
#set dns resolver
server {
listen 80;
server_name e621.fuwwy.ch; #change this to your server name
location / {
proxy_pass https://e621.net:443;
proxy_set_header Host e621.net;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_ssl_server_name on; #i dont know why this is needed
proxy_ssl_verify off; #but it wont work without it
sub_filter 'e621.net' 'e621.fuwwy.ch'; #simple rewriter that usually works but not for e6
sub_filter_once off;
sub_filter_types *;
}
location /favicon.ico {
return 204;
access_log off;
log_not_found off;
}
location /robots.txt {
return 200 "User-agent: *\nDisallow: /";
access_log off;
log_not_found off;
}
}
server {
listen 80;
server_name static1.e621.fuwwy.ch; #same here
location / {
proxy_pass https://static1.e621.net:443;
proxy_set_header Host static1.e621.net;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_ssl_server_name on;
proxy_ssl_verify off;
sub_filter 'e621.net' 'e621.fuwwy.ch';
sub_filter_once off;
sub_filter_types *;
}
location /favicon.ico {
return 204;
access_log off;
log_not_found off;
}
location /robots.txt {
return 200 "User-agent: *\nDisallow: /";
access_log off;
log_not_found off;
}
}
Loading…
Cancel
Save