Skip to content

Commit

Permalink
fix(torsf): update domain fronting (#1531)
Browse files Browse the repository at this point in the history
This diff updates snowflake's domain fronting such that `torsf` is
working as intended again. I adapted this diff from
#1529, written by @Lanius-collaris
(thank you so much! 🥰 🙌). The original diff contained extra
functionality that it would be very nice to have. I have chosen to drop
this functionality, because I'd like to quickly merge a Snowflake fix. I
will take care of the additional changes in a subsequent diff.

Part of ooni/probe#2692.

---------

Co-authored-by: Lanius-collaris <[email protected]>
  • Loading branch information
bassosimone and Lanius-collaris authored Mar 25, 2024
1 parent 3ab3f89 commit 5f8a767
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion internal/experiment/torsf/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
)

func TestRunWithExistingTor(t *testing.T) {
t.Skip("TODO(https://github.com/ooni/probe/issues/2692)")
if testing.Short() {
t.Skip("skip test in short mode")
}
Expand Down
2 changes: 1 addition & 1 deletion internal/experiment/torsf/torsf.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
// We may want to have a single implementation for both nettests in the future.

// testVersion is the experiment version.
const testVersion = "0.5.0"
const testVersion = "0.5.1"

// Config contains the experiment config.
type Config struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/experiment/torsf/torsf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func TestExperimentNameAndVersion(t *testing.T) {
if m.ExperimentName() != "torsf" {
t.Fatal("invalid experiment name")
}
if m.ExperimentVersion() != "0.5.0" {
if m.ExperimentVersion() != "0.5.1" {
t.Fatal("invalid experiment version")
}
}
Expand Down
4 changes: 2 additions & 2 deletions internal/ptx/snowflake.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ func (d *snowflakeRendezvousMethodDomainFronting) AMPCacheURL() string {
}

func (d *snowflakeRendezvousMethodDomainFronting) BrokerURL() string {
return "https://snowflake-broker.torproject.net.global.prod.fastly.net/"
return "https://1098762253.rsc.cdn77.org/"
}

func (d *snowflakeRendezvousMethodDomainFronting) FrontDomain() string {
return "foursquare.com"
return "www.phpmyadmin.net"
}

// NewSnowflakeRendezvousMethodAMP is a rendezvous method that
Expand Down
4 changes: 2 additions & 2 deletions internal/ptx/snowflake_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ func TestSnowflakeMethodDomainFronting(t *testing.T) {
if meth.AMPCacheURL() != "" {
t.Fatal("invalid amp cache URL")
}
const brokerURL = "https://snowflake-broker.torproject.net.global.prod.fastly.net/"
const brokerURL = "https://1098762253.rsc.cdn77.org/"
if meth.BrokerURL() != brokerURL {
t.Fatal("invalid broker URL")
}
const frontDomain = "foursquare.com"
const frontDomain = "www.phpmyadmin.net"
if meth.FrontDomain() != frontDomain {
t.Fatal("invalid front domain")
}
Expand Down

0 comments on commit 5f8a767

Please sign in to comment.