summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD4
-rw-r--r--main.go9
3 files changed, 11 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d8e6b735c94c..cef4a17a4ed3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = sni-modifier
pkgdesc = A socks5 proxy that modifies sni header to bypass https firewalls
- pkgver = 0.0.0
+ pkgver = 1.0.0
pkgrel = 1
url = https://github.com/poscat0x04/proxy
arch = x86_64
@@ -15,8 +15,8 @@ pkgbase = sni-modifier
source = sni-modifier.service
source = LICENSE
source = sni-modifier.install
- sha256sums = SKIP
- sha256sums = 35a8f981f241472d81ac11a7c393dbcea9966c1027e874ae2e706e059de589fc
+ sha256sums = c3528d2ec9a47113abab24d1c6b22cfe599c15d14a28dadabb71ea7b8b527379
+ sha256sums = 2f4f17fa1e7ba462f65aaac3057e64fb3d3b3603978f45a8574b5f104f9d3edd
sha256sums = 0a8c70ca29638bbe9f8f26d523240525b62da7182cac8652fc7e315fc1ee4139
sha256sums = 2a66a962763091939a56353b9083e99872d419de7458f7cf034f5ec02b18494e
diff --git a/PKGBUILD b/PKGBUILD
index 2012cdc52091..c8b7427201fa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Poscat <poscat@mail.poscat.moe>
pkgname=sni-modifier
-pkgver=0.0.0
+pkgver=1.0.0
pkgrel=1
pkgdesc="A socks5 proxy that modifies sni header to bypass https firewalls"
arch=('x86_64' 'i686' 'armv6h' 'armv7h' 'aarch64')
@@ -12,7 +12,7 @@ source=("main.go"
"sni-modifier.service"
"LICENSE"
"sni-modifier.install")
-sha256sums=("0af1cf56a1b6e071b7c7d8518eb0a1cf700c92a074d6ff2bf7f43817cb9dab63"
+sha256sums=("c3528d2ec9a47113abab24d1c6b22cfe599c15d14a28dadabb71ea7b8b527379"
"2f4f17fa1e7ba462f65aaac3057e64fb3d3b3603978f45a8574b5f104f9d3edd"
"0a8c70ca29638bbe9f8f26d523240525b62da7182cac8652fc7e315fc1ee4139"
"2a66a962763091939a56353b9083e99872d419de7458f7cf034f5ec02b18494e")
diff --git a/main.go b/main.go
index 8a23e149b7e6..88bedaff290d 100644
--- a/main.go
+++ b/main.go
@@ -238,9 +238,12 @@ func forward443(ctx context.Context, network, addr string) (net.Conn, error) {
}
}
if err != nil {
- log.Infof("%s is IP-blocked", host)
- lock.Unlock()
- return nil, err
+ i, err = tls.DialWithDialer(d, "tcp", host+":443", config)
+ if err != nil {
+ log.Infof("%s is IP-blocked", host)
+ lock.Unlock()
+ return nil, err
+ }
}
}
lock.Unlock()