Skip to content

Commit

Permalink
Quickfix (#82)
Browse files Browse the repository at this point in the history
* parsing error in V6Only subnet functor filter

* quick fix for types missed in #76
  • Loading branch information
jmwample committed Apr 9, 2021
1 parent 27aaa33 commit dc12d53
Show file tree
Hide file tree
Showing 5 changed files with 1,421 additions and 996 deletions.
13 changes: 1 addition & 12 deletions application/lib/phantoms.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

// ConjurePhantomSubnet - Weighted option to choose phantom address from.
type ConjurePhantomSubnet struct {
Weight float32
Weight uint32
Subnets []string
}

Expand All @@ -30,17 +30,6 @@ type phantomIPSelectorInternal struct {
Networks map[string]*SubnetConfig
}

// var defaultSubnetGeneration = SubnetConfig{
// WeightedSubnets: []ConjurePhantomSubnet{
// {Weight: 9, Subnets: []string{"192.122.190.0/24", "2001:48a8:687f:1::/64"}},
// {Weight: 1, Subnets: []string{"141.219.0.0/16", "35.8.0.0/16"}},
// },
// }

// func defaultSubnets() *SubnetConfig {
// return &defaultSubnetGeneration
// }

// GetPhantomSubnetSelector gets the location of the configuration file from an
// environment variable and returns the parsed configuration.
func GetPhantomSubnetSelector() (*PhantomIPSelector, error) {
Expand Down
8 changes: 4 additions & 4 deletions application/lib/test/phantom_subnets.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
[Networks.1]
Generation = 1
[[Networks.1.WeightedSubnets]]
Weight = 9.0
Weight = 9
Subnets = ["192.122.190.0/24", "2001:48a8:687f:1::/64"]

[Networks.2]
Generation = 2
[[Networks.2.WeightedSubnets]]
Weight = 1.0
Weight = 1
Subnets = ["192.122.190.0/28", "2001:48a8:687f:1::/96"]

[Networks.957]
Generation = 957
[[Networks.957.WeightedSubnets]]
Weight = 9.0
Weight = 9
Subnets = ["192.122.190.0/24", "2001:48a8:687f:1::/64"]
[[Networks.957.WeightedSubnets]]
Weight = 1.0
Weight = 1
Subnets = ["141.219.0.0/16", "35.8.0.0/16"]
12 changes: 8 additions & 4 deletions proto/signalling.proto
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,21 @@ message ClientConf {
optional DecoyList decoy_list = 1;
optional uint32 generation = 2;
optional PubKey default_pubkey = 3;
optional DarkDecoyBlocks dark_decoy_blocks = 4;
optional PhantomSubnetsList phantom_subnets_list = 4;
optional PubKey conjure_pubkey = 5;
}

message DecoyList {
repeated TLSDecoySpec tls_decoys = 1;
}

message DarkDecoyBlocks{
repeated string blocks = 1;
message PhantomSubnetsList{
repeated PhantomSubnets weighted_subnets = 1;
}

message PhantomSubnets{
optional uint32 weight = 1;
repeated string subnets = 2;
}

// State transitions of the client
Expand Down Expand Up @@ -251,7 +256,6 @@ message SessionStats {
optional uint32 tcp_to_decoy = 39; // measured when establishing tcp connection to decot
}


message StationToDetector {
optional string phantom_ip = 1;
optional string client_ip = 2;
Expand Down
Loading

0 comments on commit dc12d53

Please sign in to comment.