From 0bfd83f64ae516daf7fcc8adf07eb36e14a9c8e2 Mon Sep 17 00:00:00 2001 From: Damian Bednarczyk Date: Tue, 5 Dec 2023 21:27:47 -0600 Subject: [PATCH 1/2] update deps --- go.mod | 41 +++++++++++++++++++---------------------- go.sum | 14 ++++++-------- 2 files changed, 25 insertions(+), 30 deletions(-) diff --git a/go.mod b/go.mod index 362cc46..52de4ce 100644 --- a/go.mod +++ b/go.mod @@ -7,56 +7,53 @@ require ( github.com/bogdanfinn/fhttp v0.5.24 github.com/bogdanfinn/tls-client v1.6.1 github.com/go-shiori/dom v0.0.0-20230515143342-73569d674e1c - github.com/gofiber/fiber/v2 v2.50.0 + github.com/gofiber/fiber/v2 v2.51.0 github.com/markusmobius/go-trafilatura v1.5.1 github.com/stretchr/testify v1.8.4 + golang.org/x/net v0.19.0 + golang.org/x/term v0.15.0 gopkg.in/yaml.v3 v3.0.1 ) require ( github.com/abadojack/whatlanggo v1.0.1 // indirect + github.com/andybalholm/brotli v1.0.6 // indirect github.com/andybalholm/cascadia v1.3.2 // indirect github.com/bogdanfinn/utls v1.5.16 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/elliotchance/pie/v2 v2.8.0 // indirect github.com/forPelevin/gomoji v1.1.8 // indirect github.com/go-shiori/go-readability v0.0.0-20231029095239-6b97d5aba789 // indirect github.com/gofiber/template v1.8.2 // indirect + github.com/gofiber/template/html/v2 v2.0.5 github.com/gofiber/utils v1.1.0 // indirect github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f // indirect + github.com/google/uuid v1.4.0 // indirect github.com/hablullah/go-hijri v1.0.2 // indirect github.com/hablullah/go-juliandays v1.0.0 // indirect github.com/jalaali/go-jalaali v0.0.0-20210801064154-80525e88d958 // indirect + github.com/klauspost/compress v1.17.4 // indirect github.com/magefile/mage v1.15.0 // indirect github.com/markusmobius/go-dateparser v1.2.1 // indirect github.com/markusmobius/go-domdistiller v0.0.0-20230515154422-71af71939ff3 // indirect github.com/markusmobius/go-htmldate v1.2.2 // indirect - github.com/rs/zerolog v1.31.0 // indirect - github.com/sirupsen/logrus v1.9.3 // indirect - github.com/tam7t/hpkp v0.0.0-20160821193359-2b70b4024ed5 // indirect - github.com/tetratelabs/wazero v1.5.0 // indirect - github.com/wasilibs/go-re2 v1.4.1 // indirect - github.com/yosssi/gohtml v0.0.0-20201013000340-ee4748c638f4 // indirect - golang.org/x/crypto v0.16.0 // indirect - golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect - golang.org/x/text v0.14.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect -) - -require ( - github.com/andybalholm/brotli v1.0.6 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/gofiber/template/html/v2 v2.0.5 - github.com/google/uuid v1.4.0 // indirect - github.com/klauspost/compress v1.17.3 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect + github.com/rs/zerolog v1.31.0 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/tam7t/hpkp v0.0.0-20160821193359-2b70b4024ed5 // indirect + github.com/tetratelabs/wazero v1.5.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect - github.com/valyala/fasthttp v1.50.0 // indirect + github.com/valyala/fasthttp v1.51.0 // indirect github.com/valyala/tcplisten v1.0.0 // indirect - golang.org/x/net v0.19.0 + github.com/wasilibs/go-re2 v1.4.1 // indirect + github.com/yosssi/gohtml v0.0.0-20201013000340-ee4748c638f4 // indirect + golang.org/x/crypto v0.16.0 // indirect + golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.15.0 + golang.org/x/text v0.14.0 // indirect + ) diff --git a/go.sum b/go.sum index 79414c9..df0254a 100644 --- a/go.sum +++ b/go.sum @@ -25,8 +25,8 @@ github.com/go-shiori/dom v0.0.0-20230515143342-73569d674e1c/go.mod h1:oVDCh3qjJM github.com/go-shiori/go-readability v0.0.0-20231029095239-6b97d5aba789 h1:G6wSuUyCoLB9jrUokipsmFuRi8aJozt3phw/g9Sl4Xs= github.com/go-shiori/go-readability v0.0.0-20231029095239-6b97d5aba789/go.mod h1:2DpZlTJO/ycxp/vsc/C11oUyveStOgIXB88SYV1lncI= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofiber/fiber/v2 v2.50.0 h1:ia0JaB+uw3GpNSCR5nvC5dsaxXjRU5OEu36aytx+zGw= -github.com/gofiber/fiber/v2 v2.50.0/go.mod h1:21eytvay9Is7S6z+OgPi7c7n4++tnClWmhpimVHMimw= +github.com/gofiber/fiber/v2 v2.51.0 h1:JNACcZy5e2tGApWB2QrRpenTWn0fq0hkFm6k0C86gKQ= +github.com/gofiber/fiber/v2 v2.51.0/go.mod h1:xaQRZQJGqnKOQnbQw+ltvku3/h8QxvNi8o6JiJ7Ll0U= github.com/gofiber/template v1.8.2 h1:PIv9s/7Uq6m+Fm2MDNd20pAFFKt5wWs7ZBd8iV9pWwk= github.com/gofiber/template v1.8.2/go.mod h1:bs/2n0pSNPOkRa5VJ8zTIvedcI/lEYxzV3+YPXdBvq8= github.com/gofiber/template/html/v2 v2.0.5 h1:BKLJ6Qr940NjntbGmpO3zVa4nFNGDCi/IfUiDB9OC20= @@ -43,8 +43,8 @@ github.com/hablullah/go-juliandays v1.0.0 h1:A8YM7wIj16SzlKT0SRJc9CD29iiaUzpBLzh github.com/hablullah/go-juliandays v1.0.0/go.mod h1:0JOYq4oFOuDja+oospuc61YoX+uNEn7Z6uHYTbBzdGc= github.com/jalaali/go-jalaali v0.0.0-20210801064154-80525e88d958 h1:qxLoi6CAcXVzjfvu+KXIXJOAsQB62LXjsfbOaErsVzE= github.com/jalaali/go-jalaali v0.0.0-20210801064154-80525e88d958/go.mod h1:Wqfu7mjUHj9WDzSSPI5KfBclTTEnLveRUFr/ujWnTgE= -github.com/klauspost/compress v1.17.3 h1:qkRjuerhUU1EmXLYGkSH6EZL+vPSxIrYjLNAK4slzwA= -github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg= @@ -90,8 +90,8 @@ github.com/tetratelabs/wazero v1.5.0 h1:Yz3fZHivfDiZFUXnWMPUoiW7s8tC1sjdBtlJn08q github.com/tetratelabs/wazero v1.5.0/go.mod h1:0U0G41+ochRKoPKCJlh0jMg1CHkyfK8kDqiirMmKY8A= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.50.0 h1:H7fweIlBm0rXLs2q0XbalvJ6r0CUPFWK3/bB4N13e9M= -github.com/valyala/fasthttp v1.50.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA= +github.com/valyala/fasthttp v1.51.0 h1:8b30A5JlZ6C7AS81RsWjYMQmrZG6feChmgAolCl1SqA= +github.com/valyala/fasthttp v1.51.0/go.mod h1:oI2XroL+lI7vdXyYoQk03bXBThfFl2cVdIA3Xl7cH8g= github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= github.com/wasilibs/go-re2 v1.4.1 h1:E5+9O1M8UoGeqLB2A9omeoaWImqpuYDs9cKwvTJq/Oo= @@ -153,8 +153,6 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 20984438f95bcb2c9421ba2540b3bd413c2c9612 Mon Sep 17 00:00:00 2001 From: Damian Bednarczyk Date: Tue, 5 Dec 2023 21:28:11 -0600 Subject: [PATCH 2/2] move all non *.go files to vendor directory --- proxychain/responsemodifiers/block_element_removal.go | 2 +- proxychain/responsemodifiers/generate_readable_outline.go | 2 +- proxychain/responsemodifiers/patch_dynamic_resource_urls.go | 2 +- proxychain/responsemodifiers/patch_google_analytics.go | 2 +- .../responsemodifiers/{ => vendor}/block_element_removal.js | 0 .../{ => vendor}/generate_readable_outline.html | 0 .../{ => vendor}/patch_dynamic_resource_urls.js | 0 .../responsemodifiers/{ => vendor}/patch_google_analytics.js | 0 8 files changed, 4 insertions(+), 4 deletions(-) rename proxychain/responsemodifiers/{ => vendor}/block_element_removal.js (100%) rename proxychain/responsemodifiers/{ => vendor}/generate_readable_outline.html (100%) rename proxychain/responsemodifiers/{ => vendor}/patch_dynamic_resource_urls.js (100%) rename proxychain/responsemodifiers/{ => vendor}/patch_google_analytics.js (100%) diff --git a/proxychain/responsemodifiers/block_element_removal.go b/proxychain/responsemodifiers/block_element_removal.go index bf1646b..d3521d0 100644 --- a/proxychain/responsemodifiers/block_element_removal.go +++ b/proxychain/responsemodifiers/block_element_removal.go @@ -8,7 +8,7 @@ import ( "ladder/proxychain/responsemodifiers/rewriters" ) -//go:embed block_element_removal.js +//go:embed vendor/block_element_removal.js var blockElementRemoval string // BlockElementRemoval prevents paywall javascript from removing a diff --git a/proxychain/responsemodifiers/generate_readable_outline.go b/proxychain/responsemodifiers/generate_readable_outline.go index c1fa326..f635797 100644 --- a/proxychain/responsemodifiers/generate_readable_outline.go +++ b/proxychain/responsemodifiers/generate_readable_outline.go @@ -19,7 +19,7 @@ import ( "github.com/markusmobius/go-trafilatura" ) -//go:embed generate_readable_outline.html +//go:embed vendor/generate_readable_outline.html var templateFS embed.FS // GenerateReadableOutline creates an reader-friendly distilled representation of the article. diff --git a/proxychain/responsemodifiers/patch_dynamic_resource_urls.go b/proxychain/responsemodifiers/patch_dynamic_resource_urls.go index cf5b689..53d30d8 100644 --- a/proxychain/responsemodifiers/patch_dynamic_resource_urls.go +++ b/proxychain/responsemodifiers/patch_dynamic_resource_urls.go @@ -9,7 +9,7 @@ import ( "ladder/proxychain/responsemodifiers/rewriters" ) -//go:embed patch_dynamic_resource_urls.js +//go:embed vendor/patch_dynamic_resource_urls.js var patchDynamicResourceURLsScript string // PatchDynamicResourceURLs patches the javascript runtime to rewrite URLs client-side. diff --git a/proxychain/responsemodifiers/patch_google_analytics.go b/proxychain/responsemodifiers/patch_google_analytics.go index 51e8639..4427ea5 100644 --- a/proxychain/responsemodifiers/patch_google_analytics.go +++ b/proxychain/responsemodifiers/patch_google_analytics.go @@ -8,7 +8,7 @@ import ( "ladder/proxychain" ) -//go:embed patch_google_analytics.js +//go:embed vendor/patch_google_analytics.js var gaPatch string // PatchGoogleAnalytics replaces any request to google analytics with a no-op stub function. diff --git a/proxychain/responsemodifiers/block_element_removal.js b/proxychain/responsemodifiers/vendor/block_element_removal.js similarity index 100% rename from proxychain/responsemodifiers/block_element_removal.js rename to proxychain/responsemodifiers/vendor/block_element_removal.js diff --git a/proxychain/responsemodifiers/generate_readable_outline.html b/proxychain/responsemodifiers/vendor/generate_readable_outline.html similarity index 100% rename from proxychain/responsemodifiers/generate_readable_outline.html rename to proxychain/responsemodifiers/vendor/generate_readable_outline.html diff --git a/proxychain/responsemodifiers/patch_dynamic_resource_urls.js b/proxychain/responsemodifiers/vendor/patch_dynamic_resource_urls.js similarity index 100% rename from proxychain/responsemodifiers/patch_dynamic_resource_urls.js rename to proxychain/responsemodifiers/vendor/patch_dynamic_resource_urls.js diff --git a/proxychain/responsemodifiers/patch_google_analytics.js b/proxychain/responsemodifiers/vendor/patch_google_analytics.js similarity index 100% rename from proxychain/responsemodifiers/patch_google_analytics.js rename to proxychain/responsemodifiers/vendor/patch_google_analytics.js