Commit 36335e43 authored by Jeromy Johnson's avatar Jeromy Johnson
Browse files

Merge pull request #46 from ipfs/feat/override-mux-prefs

add env var for overriding muxer prefs
parents 0436764f 2d0c57e7
...@@ -5,6 +5,8 @@ package swarm ...@@ -5,6 +5,8 @@ package swarm
import ( import (
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"os"
"strings"
"sync" "sync"
"time" "time"
...@@ -48,6 +50,11 @@ func init() { ...@@ -48,6 +50,11 @@ func init() {
msstpt.AddTransport("/yamux/1.0.0", ymxtpt) msstpt.AddTransport("/yamux/1.0.0", ymxtpt)
msstpt.AddTransport("/spdy/3.1.0", spdy.Transport) msstpt.AddTransport("/spdy/3.1.0", spdy.Transport)
// allow overriding of muxer preferences
if prefs := os.Getenv("LIBP2P_MUX_PREFS"); prefs != "" {
msstpt.OrderPreference = strings.Fields(prefs)
}
PSTransport = msstpt PSTransport = msstpt
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment