Kaynağa Gözat

Prefix all custom build tags

- Use prefix "PSIPHON_" to minimize chance of conflicts with
  other code using build tags.
Rod Hynes 5 yıl önce
ebeveyn
işleme
06bd230ec4

+ 1 - 1
.travis.yml

@@ -15,7 +15,7 @@ script:
 - go test -race -v ./common/fragmentor
 - go test -race -v ./common/obfuscator
 - go test -race -v ./common/osl
-# TODO: enable all packetman tests with tag PACKET_MANIPULATOR_TEST; requires CAP_NETADMIN and CAP_RAW
+# TODO: enable all packetman tests with tag PSIPHON_RUN_PACKET_MANIPULATOR_TEST; requires CAP_NETADMIN and CAP_RAW
 - go test -race -v ./common/packetman
 - go test -race -v ./common/parameters
 - go test -race -v ./common/protocol

+ 1 - 1
psiphon/common/marionette/marionette.go

@@ -1,4 +1,4 @@
-// +build MARIONETTE
+// +build PSIPHON_ENABLE_MARIONETTE
 
 /*
  * Copyright (c) 2018, Psiphon Inc.

+ 1 - 1
psiphon/common/marionette/marionette_disabled.go

@@ -1,4 +1,4 @@
-// +build !MARIONETTE
+// +build !PSIPHON_ENABLE_MARIONETTE
 
 /*
  * Copyright (c) 2018, Psiphon Inc.

+ 1 - 1
psiphon/common/packetman/packetman_linux_test.go

@@ -1,4 +1,4 @@
-// +build PACKET_MANIPULATOR_TEST
+// +build PSIPHON_RUN_PACKET_MANIPULATOR_TEST
 
 /*
  * Copyright (c) 2020, Psiphon Inc.

+ 1 - 1
psiphon/common/quic/obfuscator.go

@@ -1,4 +1,4 @@
-// +build !DISABLE_QUIC
+// +build !PSIPHON_DISABLE_QUIC
 
 /*
  * Copyright (c) 2018, Psiphon Inc.

+ 1 - 1
psiphon/common/quic/quic.go

@@ -1,4 +1,4 @@
-// +build !DISABLE_QUIC
+// +build !PSIPHON_DISABLE_QUIC
 
 /*
  * Copyright (c) 2018, Psiphon Inc.

+ 1 - 1
psiphon/common/quic/quic_disabled.go

@@ -1,4 +1,4 @@
-// +build DISABLE_QUIC
+// +build PSIPHON_DISABLE_QUIC
 
 /*
  * Copyright (c) 2020, Psiphon Inc.

+ 1 - 1
psiphon/common/quic/quic_test.go

@@ -1,4 +1,4 @@
-// +build !DISABLE_QUIC
+// +build !PSIPHON_DISABLE_QUIC
 
 /*
  * Copyright (c) 2018, Psiphon Inc.

+ 1 - 1
psiphon/common/tapdance/embedded_config.go

@@ -1,4 +1,4 @@
-// +build TAPDANCE
+// +build PSIPHON_ENABLE_TAPDANCE
 
 /*
  * Copyright (c) 2018, Psiphon Inc.

+ 1 - 1
psiphon/common/tapdance/tapdance.go

@@ -1,4 +1,4 @@
-// +build TAPDANCE
+// +build PSIPHON_ENABLE_TAPDANCE
 
 /*
  * Copyright (c) 2018, Psiphon Inc.

+ 1 - 1
psiphon/common/tapdance/tapdance_disabled.go

@@ -1,4 +1,4 @@
-// +build !TAPDANCE
+// +build !PSIPHON_ENABLE_TAPDANCE
 
 /*
  * Copyright (c) 2018, Psiphon Inc.

+ 2 - 2
psiphon/common/values/init.go

@@ -1,4 +1,4 @@
-// +build INIT_PSIPHON_COMMON_VALUES
+// +build PSIPHON_INIT_COMMON_VALUES
 
 /*
  * Copyright (c) 2019, Psiphon Inc.
@@ -21,7 +21,7 @@
 
 package values
 
-// This file is a guard against building with INIT_PSIPHON_COMMON_VALUES
+// This file is a guard against building with PSIPHON_INIT_COMMON_VALUES
 // without replacing init.go.
 
 var buildGuard = intentionally_undefined

+ 1 - 1
psiphon/dataStoreRecovery_test.go

@@ -1,4 +1,4 @@
-// +build !BADGER_DB,!FILES_DB
+// +build !PSIPHON_USE_BADGER_DB,!PSIPHON_USE_FILES_DB
 
 /*
  * Copyright (c) 2019, Psiphon Inc.

+ 1 - 1
psiphon/dataStore_badger.go

@@ -1,4 +1,4 @@
-// +build BADGER_DB
+// +build PSIPHON_USE_BADGER_DB
 
 /*
  * Copyright (c) 2018, Psiphon Inc.

+ 1 - 1
psiphon/dataStore_bolt.go

@@ -1,4 +1,4 @@
-// +build !BADGER_DB,!FILES_DB
+// +build !PSIPHON_USE_BADGER_DB,!PSIPHON_USE_FILES_DB
 
 /*
  * Copyright (c) 2018, Psiphon Inc.

+ 1 - 1
psiphon/dataStore_files.go

@@ -1,4 +1,4 @@
-// +build FILES_DB
+// +build PSIPHON_USE_FILES_DB
 
 /*
  * Copyright (c) 2018, Psiphon Inc.

+ 1 - 1
psiphon/pprof.go

@@ -1,4 +1,4 @@
-// +build RUN_PPROF
+// +build PSIPHON_RUN_PPROF
 
 /*
  * Copyright (c) 2018, Psiphon Inc.

+ 1 - 1
psiphon/pprof_disabled.go

@@ -1,4 +1,4 @@
-// +build !RUN_PPROF
+// +build !PSIPHON_RUN_PPROF
 
 /*
  * Copyright (c) 2018, Psiphon Inc.

+ 1 - 1
psiphon/server/server_packetman_test.go

@@ -1,4 +1,4 @@
-// +build PACKET_MANIPULATOR_TEST
+// +build PSIPHON_RUN_PACKET_MANIPULATOR_TEST
 
 /*
  * Copyright (c) 2020, Psiphon Inc.