Browse Source

obfs4proxy: update to version 0.0.9

Changes:
-remove old patch(part of 0.0.9 release)
-change the canonical upstream repo location to gitlab
-change source to gitlab
-change source package to golang-gitlab-yawning-obfs4-dev

Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
lilik-openwrt-22.03
Jan Pavlinec 6 years ago
parent
commit
f22d113358
No known key found for this signature in database GPG Key ID: 60244CCEFB39E584
2 changed files with 11 additions and 53 deletions
  1. +11
    -13
      net/obfs4proxy/Makefile
  2. +0
    -40
      net/obfs4proxy/patches/bug-24793-send-correct-http-header-for-basic-auth.patch

+ 11
- 13
net/obfs4proxy/Makefile View File

@ -8,14 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obfs4proxy
PKG_VERSION:=0.0.7
PKG_VERSION:=0.0.9
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://git.torproject.org/pluggable-transports/obfs4.git
PKG_SOURCE_VERSION:=8256fac93c2cf79742725e3aaced5bbe3380fd32
PKG_SOURCE_DATE:=20161115
PKG_MIRROR_HASH:=9c504337f7a2b46310083224cf0998fc7645f8af5d50657cf74358d39916eddc
PKG_SOURCE:=obfs4-$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://gitlab.com/yawning/obfs4/-/archive/$(PKG_NAME)-$(PKG_VERSION)/
PKG_HASH:=ab2608014fae15b4e0dad2f8128e81f912ab27277539004b759180c1fb5007dd
PKG_BUILD_DIR:=$(BUILD_DIR)/obfs4-$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=LICENSE
@ -25,14 +24,14 @@ PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=git.torproject.org/pluggable-transports/obfs4.git
GO_PKG:=gitlab.com/yawning/obfs4.git
include $(INCLUDE_DIR)/package.mk
include ../../lang/golang/golang-package.mk
define Package/obfs4proxy/Default
TITLE:=A Tor pluggable transport proxy, implementing obfs4
URL:=https://gitweb.torproject.org/pluggable-transports/obfs4.git/
URL:=https://gitlab.com/yawning/obfs4
DEPENDS:=$(GO_ARCH_DEPENDS)
endef
@ -42,7 +41,7 @@ $(call Package/obfs4proxy/Default)
CATEGORY:=Network
endef
define Package/golang-torproject-pluggable-transports-obfs4-dev
define Package/golang-gitlab-yawning-obfs4-dev
$(call Package/obfs4proxy/Default)
$(call GoPackage/GoSubMenu)
TITLE+= (source files)
@ -76,7 +75,7 @@ This package contains both the client and the bridge in a single
program.
endef
define Package/golang-torproject-pluggable-transports-obfs4-dev/description
define Package/golang-gitlab-yawning-obfs4-dev/description
$(call Package/obfs4proxy/Default/description)
This package provides the source files for the client/bridge program.
@ -84,6 +83,5 @@ endef
$(eval $(call GoBinPackage,obfs4proxy))
$(eval $(call BuildPackage,obfs4proxy))
$(eval $(call GoSrcPackage,golang-torproject-pluggable-transports-obfs4-dev))
$(eval $(call BuildPackage,golang-torproject-pluggable-transports-obfs4-dev))
$(eval $(call GoSrcPackage,golang-gitlab-yawning-obfs4-dev))
$(eval $(call BuildPackage,golang-gitlab-yawning-obfs4-dev))

+ 0
- 40
net/obfs4proxy/patches/bug-24793-send-correct-http-header-for-basic-auth.patch View File

@ -1,40 +0,0 @@
From af4824cb0b2c36a0eba4bc1590eb0737302e992e Mon Sep 17 00:00:00 2001
From: Yawning Angel <yawning@schwanenlied.me>
Date: Wed, 10 Jan 2018 15:11:44 +0000
Subject: Bug 24793: Send the correct authorization HTTP header for basic auth.
Apparently I didn't test the "connect via HTTP(s)" proxy with
authentication at all when I added that functionality, so it has been
broken for years.
This should fix it now.
---
obfs4proxy/proxy_http.go | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/obfs4proxy/proxy_http.go b/obfs4proxy/proxy_http.go
index 6f11790..a5c2100 100644
--- a/obfs4proxy/proxy_http.go
+++ b/obfs4proxy/proxy_http.go
@@ -29,6 +29,7 @@ package main
import (
"bufio"
+ "encoding/base64"
"fmt"
"net"
"net/http"
@@ -90,7 +91,9 @@ func (s *httpProxy) Dial(network, addr string) (net.Conn, error) {
}
req.Close = false
if s.haveAuth {
- req.SetBasicAuth(s.username, s.password)
+ // SetBasicAuth doesn't quite do what is appropriate, because
+ // the correct header is `Proxy-Authorization`.
+ req.Header.Set("Proxy-Authorization", base64.StdEncoding.EncodeToString([]byte(s.username + ":" + s.password)))
}
req.Header.Set("User-Agent", "")
--
cgit v1.1

Loading…
Cancel
Save