Просмотр исходного кода

Merge branch 'master' into production-client

Rod Hynes 9 лет назад
Родитель
Сommit
0f4e6a41d1

+ 1 - 1
MobileLibrary/Android/make.bash

@@ -60,7 +60,7 @@ echo " Gomobile version: ${GOMOBILEVERSION}"
 echo " Dependencies: ${DEPENDENCIES}"
 echo ""
 
-gomobile bind -v -target=android/arm -tags "${BUILD_TAGS}" -ldflags="$LDFLAGS" github.com/Psiphon-Labs/psiphon-tunnel-core/MobileLibrary/psi
+gomobile bind -v -target=android/arm -tags="${BUILD_TAGS}" -ldflags="$LDFLAGS" github.com/Psiphon-Labs/psiphon-tunnel-core/MobileLibrary/psi
 if [ $? != 0 ]; then
   echo "..'gomobile bind' failed, exiting"
   exit $?

+ 2 - 2
MobileLibrary/iOS/build-psiphon-framework.sh

@@ -205,9 +205,9 @@ IOS_CGO_BUILD_FLAGS='// #cgo darwin CFLAGS: -I'"${OPENSSL_INCLUDE}"'\
 
 LC_ALL=C sed -i -- "s|// #cgo pkg-config: libssl|${IOS_CGO_BUILD_FLAGS}|" "${OPENSSL_SRC_DIR}/build.go"
 
-${GOPATH}/bin/gomobile bind -v -x -target ios -tags "${BUILD_TAGS}" -ldflags="${LDFLAGS}" -o "${INTERMEDIATE_OUPUT_DIR}/${INTERMEDIATE_OUPUT_FILE}" github.com/Psiphon-Labs/psiphon-tunnel-core/MobileLibrary/psi
+${GOPATH}/bin/gomobile bind -v -x -target ios -tags="${BUILD_TAGS}" -ldflags="${LDFLAGS}" -o "${INTERMEDIATE_OUPUT_DIR}/${INTERMEDIATE_OUPUT_FILE}" github.com/Psiphon-Labs/psiphon-tunnel-core/MobileLibrary/psi
 rc=$?; if [[ $rc != 0 ]]; then
-  echo "FAILURE: ${GOPATH}/bin/gomobile bind -target ios -ldflags="${LDFLAGS}" -o "${INTERMEDIATE_OUPUT_DIR}/${INTERMEDIATE_OUPUT_FILE}" github.com/Psiphon-Labs/psiphon-tunnel-core/MobileLibrary/psi"
+  echo "FAILURE: ${GOPATH}/bin/gomobile bind -target ios -tags="${BUILD_TAGS}" -ldflags="${LDFLAGS}" -o "${INTERMEDIATE_OUPUT_DIR}/${INTERMEDIATE_OUPUT_FILE}" github.com/Psiphon-Labs/psiphon-tunnel-core/MobileLibrary/psi"
   exit $rc
 fi
 

+ 3 - 3
psiphon/server/psinet/psinet.go

@@ -257,10 +257,10 @@ func (db *Database) GetHttpsRequestRegexes(sponsorID string) []map[string]string
 
 	// If neither sponsorID or DefaultSponsorID were found, sponsor will be the
 	// zero value of the map, an empty Sponsor struct.
-	for i := range sponsor.HttpsRequestRegexes {
+	for _, sponsorRegex := range sponsor.HttpsRequestRegexes {
 		regex := make(map[string]string)
-		regex["replace"] = db.Sponsors[sponsorID].HttpsRequestRegexes[i].Replace
-		regex["regex"] = db.Sponsors[sponsorID].HttpsRequestRegexes[i].Regex
+		regex["replace"] = sponsorRegex.Replace
+		regex["regex"] = sponsorRegex.Regex
 		regexes = append(regexes, regex)
 	}