1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-06-10 13:09:11 -04:00

improve commands

(rebased from ebbf31f07e)
This commit is contained in:
Jebbs
2021-02-21 23:02:42 +08:00
committed by Shelikhoo
parent fa0cf6db26
commit 2523d77919
67 changed files with 1723 additions and 1220 deletions

View File

@@ -6,7 +6,6 @@ import (
"io/ioutil"
"net/http"
"net/url"
"os"
"strings"
"time"
@@ -28,8 +27,6 @@ func LoadArgToBytes(arg string) (out []byte, err error) {
switch {
case strings.HasPrefix(arg, "http://"), strings.HasPrefix(arg, "https://"):
out, err = FetchHTTPContent(arg)
case (arg == "stdin:"):
out, err = ioutil.ReadAll(os.Stdin)
default:
out, err = ioutil.ReadFile(arg)
}