Browse Source

adding license information to source files

svcs 1 year ago
parent
commit
a8b1243179
9 changed files with 216 additions and 67 deletions
  1. 2 2
      LICENSE
  2. 57 0
      cmd/http-wokou.go
  3. 26 0
      cmd/route.go
  4. 0 31
      cmd/server.go
  5. 26 0
      pkg/cache.go
  6. 26 0
      pkg/client.go
  7. 27 34
      pkg/controller.go
  8. 26 0
      pkg/include.go
  9. 26 0
      pkg/routing.go

+ 2 - 2
LICENSE

@@ -207,8 +207,8 @@ If you develop a new program, and you want it to be of the greatest possible use
 
 To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
 
-webripper, an extendable web proxy that allows for the modification and rapid proxying of web servers
-Copyright (C) 2024, Russell Hrubesky
+<one line to give the program's name and a brief idea of what it does.>
+Copyright (C) <year>  <name of author>
 
 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 

+ 57 - 0
cmd/http-wokou.go

@@ -0,0 +1,57 @@
+/*
+				GNU GENERAL PUBLIC LICENSE
+                 Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ http-wokou, An HTTP Proxying framework for bypassing DNS Security
+ Copyright (C) 2024 Russell Hrubesky, ChiralWorks Software LLC
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+*/
+
+package main
+
+import (
+	"fmt"
+	"log"
+
+	httpserver "git.aetherial.dev/aeth/http-proxy/pkg"
+	"github.com/gin-contrib/cors"
+	"github.com/gin-gonic/gin"
+)
+
+func main() {
+	cfg, err := httpserver.ReadConfig("./.config.json")
+	if err != nil {
+		log.Fatal("Couldnt read config: ", err)
+	}
+
+	e := gin.Default()
+	config := cors.DefaultConfig()
+	config.AllowOrigins = []string{
+		"https://semrush.com",
+		"https://static.semrush.com",
+		"https://sem.bunnytool.shop",
+	}
+	e.Use(cors.New(config))
+	rmaps := httpserver.PopulateRouteMaps(cfg.RouteMapDir)
+	fmt.Printf("%v\n", rmaps["static.semrush.com"])
+	httpserver.RegisterRoutes(e, cfg, rmaps)
+	e.RunTLS(fmt.Sprintf("%s:%v", "0.0.0.0", cfg.HttpsPort), "/etc/letsencrypt/live/void-society.online/fullchain.pem", "/etc/letsencrypt/live/void-society.online/privkey.pem")
+
+}

+ 26 - 0
cmd/route.go

@@ -1,3 +1,29 @@
+/*
+				GNU GENERAL PUBLIC LICENSE
+                 Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ http-wokou, An HTTP Proxying framework for bypassing DNS Security
+ Copyright (C) 2024 Russell Hrubesky, ChiralWorks Software LLC
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+*/
+
 package main
 
 import (

+ 0 - 31
cmd/server.go

@@ -1,31 +0,0 @@
-package main
-
-import (
-	"fmt"
-	"log"
-
-	httpserver "git.aetherial.dev/aeth/http-proxy/pkg"
-	"github.com/gin-contrib/cors"
-	"github.com/gin-gonic/gin"
-)
-
-func main() {
-	cfg, err := httpserver.ReadConfig("./.config.json")
-	if err != nil {
-		log.Fatal("Couldnt read config: ", err)
-	}
-
-	e := gin.Default()
-	config := cors.DefaultConfig()
-	config.AllowOrigins = []string{
-		"https://semrush.com",
-		"https://static.semrush.com",
-		"https://sem.bunnytool.shop",
-	}
-	e.Use(cors.New(config))
-	rmaps := httpserver.PopulateRouteMaps(cfg.RouteMapDir)
-	fmt.Printf("%v\n", rmaps["static.semrush.com"])
-	httpserver.RegisterRoutes(e, cfg, rmaps)
-	e.RunTLS(fmt.Sprintf("%s:%v", "0.0.0.0", cfg.HttpsPort), "/etc/letsencrypt/live/void-society.online/fullchain.pem", "/etc/letsencrypt/live/void-society.online/privkey.pem")
-
-}

+ 26 - 0
pkg/cache.go

@@ -1,3 +1,29 @@
+/*
+				GNU GENERAL PUBLIC LICENSE
+                 Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ http-wokou, An HTTP Proxying framework for bypassing DNS Security
+ Copyright (C) 2024 Russell Hrubesky, ChiralWorks Software LLC
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+*/
+
 package httpserver
 
 import (

+ 26 - 0
pkg/client.go

@@ -1,3 +1,29 @@
+/*
+				GNU GENERAL PUBLIC LICENSE
+                 Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ http-wokou, An HTTP Proxying framework for bypassing DNS Security
+ Copyright (C) 2024 Russell Hrubesky, ChiralWorks Software LLC
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+*/
+
 package httpserver
 
 import (

+ 27 - 34
pkg/controller.go

@@ -1,3 +1,29 @@
+/*
+				GNU GENERAL PUBLIC LICENSE
+                 Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ http-wokou, An HTTP Proxying framework for bypassing DNS Security
+ Copyright (C) 2024 Russell Hrubesky, ChiralWorks Software LLC
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+*/
+
 package httpserver
 
 import (
@@ -13,39 +39,6 @@ import (
 	"golang.org/x/net/publicsuffix"
 )
 
-// TODO: does tihs need to be a configuration thing? How would i handle doing rewrite rules?
-// TODO: make these routes cached on the proxy, so that when a client requests them, they arent being tunneled through to the actual site
-var staticRoutes = map[string]struct{}{
-	"/siteaudit/i18n":                     struct{}{},
-	"/siteaudit/index":                    struct{}{},
-	"/siteaudit/review":                   struct{}{},
-	"/seo-dashboard/release":              struct{}{},
-	"/competitive-list-widget":            struct{}{},
-	"/backlink-audit/landing":             struct{}{},
-	"/link-building-tool/landing":         struct{}{},
-	"/keyword-overview":                   struct{}{},
-	"/keyword-gap":                        struct{}{},
-	"/oti/prod/organic_traffic_insights":  struct{}{},
-	"/oti/prod/organic-traffic-insights":  struct{}{},
-	"/ajst":                               struct{}{},
-	"/listing-management/landings":        struct{}{},
-	"/listing-management/landing-reviews": struct{}{},
-	"/messaging/apps/":                    struct{}{},
-	"/domain-overview":                    struct{}{},
-	"/traffic-analytics":                  struct{}{},
-	"/organic-research":                   struct{}{},
-	"/keyword-magic/kmt_":                 struct{}{},
-	"/keyword-manager-assets":             struct{}{},
-	"/position-tracking/landing":          struct{}{},
-}
-
-var apiRoutes = map[string]struct{}{
-	"/siteaudit/api/campaigns/seolist": struct{}{},
-	"/siteaudit/api/system-status":     struct{}{},
-	"/siteaudit/api/limits":            struct{}{},
-	"/projects/api/limits":             struct{}{},
-}
-
 // Implementing a 'set'
 var NonmutableHeaders = map[string]struct{}{
 	"Cookie":          struct{}{},
@@ -97,7 +90,7 @@ This handler will be responsible for proxying out the GET requests that the serv
 func (c *Controller) Get(ctx *gin.Context) {
 	incomingPath := ctx.Param("ProxiedPath")
 	routeSplit := strings.Split(incomingPath, "/")
-	if len(routeSplit) > 2 {
+	if len(routeSplit) > 1 {
 		baseRoute := strings.Join(routeSplit[:len(routeSplit)-1], "/")
 
 		_, ok := c.RouteMaps[c.Config.AltAllowedDomain].RouteSet[baseRoute]

+ 26 - 0
pkg/include.go

@@ -1,3 +1,29 @@
+/*
+				GNU GENERAL PUBLIC LICENSE
+                 Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ http-wokou, An HTTP Proxying framework for bypassing DNS Security
+ Copyright (C) 2024 Russell Hrubesky, ChiralWorks Software LLC
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+*/
+
 package httpserver
 
 import (

+ 26 - 0
pkg/routing.go

@@ -1,3 +1,29 @@
+/*
+				GNU GENERAL PUBLIC LICENSE
+                 Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ http-wokou, An HTTP Proxying framework for bypassing DNS Security
+ Copyright (C) 2024 Russell Hrubesky, ChiralWorks Software LLC
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+*/
+
 package httpserver
 
 import (