mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-07-25 01:40:00 +00:00
load from network will be replaced with subscription
This commit is contained in:
parent
cef6a46548
commit
6a2cca1220
@ -25,8 +25,6 @@ func LoadArg(arg string) (out io.Reader, err error) {
|
|||||||
// LoadArgToBytes loads one arg to []byte, maybe an remote url, or local file path
|
// LoadArgToBytes loads one arg to []byte, maybe an remote url, or local file path
|
||||||
func LoadArgToBytes(arg string) (out []byte, err error) {
|
func LoadArgToBytes(arg string) (out []byte, err error) {
|
||||||
switch {
|
switch {
|
||||||
case strings.HasPrefix(arg, "http://"), strings.HasPrefix(arg, "https://"):
|
|
||||||
out, err = FetchHTTPContent(arg)
|
|
||||||
default:
|
default:
|
||||||
out, err = ioutil.ReadFile(arg)
|
out, err = ioutil.ReadFile(arg)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user