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

Fix PSIPHON_DISABLE_QUIC build

Rod Hynes 2 лет назад
Родитель
Сommit
efcd090041
2 измененных файлов с 11 добавлено и 1 удалено
  1. 9 1
      .github/workflows/tests.yml
  2. 2 0
      psiphon/common/quic/quic_disabled.go

+ 9 - 1
.github/workflows/tests.yml

@@ -16,7 +16,7 @@ jobs:
       matrix:
         os: [ "ubuntu" ]
         go: [ "1.19.8" ]
-        test-type: [ "detector", "coverage", "memory" ]
+        test-type: [ "detector", "coverage", "memory", "custom-build-tags" ]
 
     runs-on: ${{ matrix.os }}-latest
 
@@ -140,3 +140,11 @@ jobs:
           cd ${{ github.workspace }}/go/src/github.com/Psiphon-Labs/psiphon-tunnel-core
           go test -v ./psiphon/memory_test -run TestReconnectTunnel
           go test -v ./psiphon/memory_test -run TestRestartController
+
+      - name: Compile with custom build tags
+        if: ${{ matrix.test-type == 'custom-build-tags' }}
+        run: |
+          cd ${{ github.workspace }}/go/src/github.com/Psiphon-Labs/psiphon-tunnel-core/ConsoleClient
+          go build -a -v -tags "PSIPHON_DISABLE_QUIC"
+          go build -a -v -tags "PSIPHON_DISABLE_GQUIC"
+          go build -a -v -tags "PSIPHON_ENABLE_REFRACTION_NETWORKING"

+ 2 - 0
psiphon/common/quic/quic_disabled.go

@@ -30,6 +30,7 @@ import (
 	"github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common"
 	"github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/errors"
 	"github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/prng"
+	"github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/transforms"
 )
 
 // Enabled indicates if QUIC functionality is enabled.
@@ -60,6 +61,7 @@ func Dial(
 	_ *prng.Seed,
 	_ string,
 	_ *prng.Seed,
+	_ *transforms.ObfuscatorSeedTransformerParameters,
 	_ bool) (net.Conn, error) {
 
 	return nil, errors.TraceNew("operation is not enabled")