mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Use uTLS aware broker channel constructor
This commit is contained in:
parent
ccfdcab8fe
commit
1573502e93
2 changed files with 6 additions and 5 deletions
|
@ -56,13 +56,13 @@ func createBrokerTransport() http.RoundTripper {
|
|||
}
|
||||
|
||||
func NewBrokerChannel(broker, ampCache, front string, keepLocalAddresses bool) (*BrokerChannel, error) {
|
||||
return NewBrokerChannelWithUTlsClientID(broker, ampCache, front, keepLocalAddresses, "", false)
|
||||
return NewBrokerChannelWithUTlsSettings(broker, ampCache, front, keepLocalAddresses, "", false)
|
||||
}
|
||||
|
||||
// NewBrokerChannelWithUTlsClientID construct a new BrokerChannel, where:
|
||||
// NewBrokerChannelWithUTlsSettings construct a new BrokerChannel, where:
|
||||
// |broker| is the full URL of the facilitating program which assigns proxies
|
||||
// to clients, and |front| is the option fronting domain.
|
||||
func NewBrokerChannelWithUTlsClientID(broker, ampCache, front string, keepLocalAddresses bool, utlsClientID string, removeSNI bool) (*BrokerChannel, error) {
|
||||
func NewBrokerChannelWithUTlsSettings(broker, ampCache, front string, keepLocalAddresses bool, utlsClientID string, removeSNI bool) (*BrokerChannel, error) {
|
||||
log.Println("Rendezvous using Broker at:", broker)
|
||||
if ampCache != "" {
|
||||
log.Println("Through AMP cache at:", ampCache)
|
||||
|
|
|
@ -131,8 +131,9 @@ func NewSnowflakeClient(config ClientConfig) (*Transport, error) {
|
|||
}
|
||||
|
||||
// Rendezvous with broker using the given parameters.
|
||||
broker, err := NewBrokerChannel(
|
||||
config.BrokerURL, config.AmpCacheURL, config.FrontDomain, config.KeepLocalAddresses)
|
||||
broker, err := NewBrokerChannelWithUTlsSettings(
|
||||
config.BrokerURL, config.AmpCacheURL, config.FrontDomain,
|
||||
config.KeepLocalAddresses, config.UTlsClientID, config.UTlsRemoveSNI)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue