├── .gitignore
├── .travis.yml
├── Dockerfile
├── LICENSE
├── Makefile
├── Makefile.cross-compiles
├── README.md
├── README_zh.md
├── assets
├── assets.go
├── frpc
│ ├── static
│ │ ├── 6f0a76321d30f3c8120915e57f7bd77e.ttf
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── manifest.js
│ │ └── vendor.js
│ └── statik
│ │ └── statik.go
└── frps
│ ├── static
│ ├── 6f0a76321d30f3c8120915e57f7bd77e.ttf
│ ├── favicon.ico
│ ├── index.html
│ ├── manifest.js
│ └── vendor.js
│ └── statik
│ └── statik.go
├── client
├── admin.go
├── admin_api.go
├── control.go
├── event
│ └── event.go
├── health
│ └── health.go
├── proxy
│ ├── proxy.go
│ ├── proxy_manager.go
│ └── proxy_wrapper.go
├── service.go
├── visitor.go
└── visitor_manager.go
├── cmd
├── frpc
│ ├── main.go
│ └── sub
│ │ ├── http.go
│ │ ├── https.go
│ │ ├── reload.go
│ │ ├── root.go
│ │ ├── status.go
│ │ ├── stcp.go
│ │ ├── tcp.go
│ │ ├── udp.go
│ │ └── xtcp.go
└── frps
│ ├── main.go
│ └── root.go
├── conf
├── frpc.ini
├── frpc_full.ini
├── frps.ini
├── frps_full.ini
└── systemd
│ ├── frpc.service
│ ├── frpc@.service
│ ├── frps.service
│ └── frps@.service
├── doc
└── pic
│ ├── architecture.png
│ ├── dashboard.png
│ ├── donate-alipay.png
│ ├── donate-wechatpay.png
│ └── zsxq.jpg
├── go.mod
├── go.sum
├── models
├── config
│ ├── client_common.go
│ ├── proxy.go
│ ├── server_common.go
│ ├── types.go
│ ├── types_test.go
│ ├── value.go
│ └── visitor.go
├── consts
│ └── consts.go
├── errors
│ └── errors.go
├── msg
│ ├── ctl.go
│ └── msg.go
├── nathole
│ └── nathole.go
├── plugin
│ ├── http2https.go
│ ├── http_proxy.go
│ ├── https2http.go
│ ├── plugin.go
│ ├── socks5.go
│ ├── static_file.go
│ └── unix_domain_socket.go
└── proto
│ └── udp
│ ├── udp.go
│ └── udp_test.go
├── package.sh
├── server
├── control.go
├── controller
│ ├── resource.go
│ └── visitor.go
├── dashboard.go
├── dashboard_api.go
├── group
│ ├── group.go
│ ├── http.go
│ └── tcp.go
├── ports
│ └── ports.go
├── proxy
│ ├── http.go
│ ├── https.go
│ ├── proxy.go
│ ├── stcp.go
│ ├── tcp.go
│ ├── udp.go
│ └── xtcp.go
├── service.go
└── stats
│ ├── internal.go
│ └── stats.go
├── tests
├── ci
│ ├── auto_test_frpc.ini
│ ├── auto_test_frpc_visitor.ini
│ ├── auto_test_frps.ini
│ ├── cmd_test.go
│ ├── health
│ │ └── health_test.go
│ ├── normal_test.go
│ ├── reconnect_test.go
│ ├── reload_test.go
│ ├── template_test.go
│ └── tls_test.go
├── config
│ └── config.go
├── consts
│ └── consts.go
├── mock
│ ├── echo_server.go
│ └── http_server.go
└── util
│ ├── process.go
│ └── util.go
├── utils
├── limit
│ ├── reader.go
│ └── writer.go
├── log
│ └── log.go
├── metric
│ ├── counter.go
│ ├── counter_test.go
│ ├── date_counter.go
│ └── date_counter_test.go
├── net
│ ├── conn.go
│ ├── http.go
│ ├── kcp.go
│ ├── listener.go
│ ├── tls.go
│ ├── udp.go
│ └── websocket.go
├── util
│ ├── util.go
│ └── util_test.go
├── version
│ ├── version.go
│ └── version_test.go
├── vhost
│ ├── http.go
│ ├── https.go
│ ├── resource.go
│ ├── reverseproxy.go
│ ├── router.go
│ └── vhost.go
└── xlog
│ ├── ctx.go
│ └── xlog.go
├── vendor
├── github.com
│ ├── armon
│ │ └── go-socks5
│ │ │ ├── .gitignore
│ │ │ ├── .travis.yml
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── auth.go
│ │ │ ├── credentials.go
│ │ │ ├── request.go
│ │ │ ├── resolver.go
│ │ │ ├── ruleset.go
│ │ │ └── socks5.go
│ ├── davecgh
│ │ └── go-spew
│ │ │ ├── LICENSE
│ │ │ └── spew
│ │ │ ├── bypass.go
│ │ │ ├── bypasssafe.go
│ │ │ ├── common.go
│ │ │ ├── config.go
│ │ │ ├── doc.go
│ │ │ ├── dump.go
│ │ │ ├── format.go
│ │ │ └── spew.go
│ ├── fatedier
│ │ ├── beego
│ │ │ ├── LICENSE
│ │ │ └── logs
│ │ │ │ ├── README.md
│ │ │ │ ├── color.go
│ │ │ │ ├── color_windows.go
│ │ │ │ ├── conn.go
│ │ │ │ ├── console.go
│ │ │ │ ├── file.go
│ │ │ │ ├── jianliao.go
│ │ │ │ ├── log.go
│ │ │ │ ├── logger.go
│ │ │ │ ├── multifile.go
│ │ │ │ ├── slack.go
│ │ │ │ └── smtp.go
│ │ ├── golib
│ │ │ ├── LICENSE
│ │ │ ├── control
│ │ │ │ └── shutdown
│ │ │ │ │ └── shutdown.go
│ │ │ ├── crypto
│ │ │ │ ├── decode.go
│ │ │ │ └── encode.go
│ │ │ ├── errors
│ │ │ │ └── errors.go
│ │ │ ├── io
│ │ │ │ └── io.go
│ │ │ ├── msg
│ │ │ │ └── json
│ │ │ │ │ ├── msg.go
│ │ │ │ │ ├── pack.go
│ │ │ │ │ └── process.go
│ │ │ ├── net
│ │ │ │ ├── conn.go
│ │ │ │ ├── mux
│ │ │ │ │ ├── mux.go
│ │ │ │ │ └── rule.go
│ │ │ │ └── proxy.go
│ │ │ └── pool
│ │ │ │ ├── buf.go
│ │ │ │ └── snappy.go
│ │ └── kcp-go
│ │ │ ├── .gitignore
│ │ │ ├── .travis.yml
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── batchconn.go
│ │ │ ├── crypt.go
│ │ │ ├── donate.png
│ │ │ ├── entropy.go
│ │ │ ├── fec.go
│ │ │ ├── flame.png
│ │ │ ├── frame.png
│ │ │ ├── kcp-go.png
│ │ │ ├── kcp.go
│ │ │ ├── readloop.go
│ │ │ ├── readloop_generic.go
│ │ │ ├── readloop_linux.go
│ │ │ ├── sess.go
│ │ │ ├── snmp.go
│ │ │ ├── tx.go
│ │ │ ├── tx_generic.go
│ │ │ ├── tx_linux.go
│ │ │ └── updater.go
│ ├── golang
│ │ └── snappy
│ │ │ ├── .gitignore
│ │ │ ├── AUTHORS
│ │ │ ├── CONTRIBUTORS
│ │ │ ├── LICENSE
│ │ │ ├── README
│ │ │ ├── decode.go
│ │ │ ├── decode_amd64.go
│ │ │ ├── decode_amd64.s
│ │ │ ├── decode_other.go
│ │ │ ├── encode.go
│ │ │ ├── encode_amd64.go
│ │ │ ├── encode_amd64.s
│ │ │ ├── encode_other.go
│ │ │ └── snappy.go
│ ├── gorilla
│ │ ├── mux
│ │ │ ├── AUTHORS
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── context.go
│ │ │ ├── doc.go
│ │ │ ├── go.mod
│ │ │ ├── middleware.go
│ │ │ ├── mux.go
│ │ │ ├── regexp.go
│ │ │ ├── route.go
│ │ │ └── test_helpers.go
│ │ └── websocket
│ │ │ ├── .gitignore
│ │ │ ├── .travis.yml
│ │ │ ├── AUTHORS
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── client.go
│ │ │ ├── client_clone.go
│ │ │ ├── client_clone_legacy.go
│ │ │ ├── compression.go
│ │ │ ├── conn.go
│ │ │ ├── conn_write.go
│ │ │ ├── conn_write_legacy.go
│ │ │ ├── doc.go
│ │ │ ├── json.go
│ │ │ ├── mask.go
│ │ │ ├── mask_safe.go
│ │ │ ├── prepared.go
│ │ │ ├── proxy.go
│ │ │ ├── server.go
│ │ │ ├── trace.go
│ │ │ ├── trace_17.go
│ │ │ ├── util.go
│ │ │ └── x_net_proxy.go
│ ├── hashicorp
│ │ └── yamux
│ │ │ ├── .gitignore
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── addr.go
│ │ │ ├── const.go
│ │ │ ├── go.mod
│ │ │ ├── mux.go
│ │ │ ├── session.go
│ │ │ ├── spec.md
│ │ │ ├── stream.go
│ │ │ └── util.go
│ ├── inconshreveable
│ │ └── mousetrap
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── trap_others.go
│ │ │ ├── trap_windows.go
│ │ │ └── trap_windows_1.4.go
│ ├── klauspost
│ │ ├── cpuid
│ │ │ ├── .gitignore
│ │ │ ├── .travis.yml
│ │ │ ├── CONTRIBUTING.txt
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── cpuid.go
│ │ │ ├── cpuid_386.s
│ │ │ ├── cpuid_amd64.s
│ │ │ ├── detect_intel.go
│ │ │ ├── detect_ref.go
│ │ │ └── generate.go
│ │ └── reedsolomon
│ │ │ ├── .gitignore
│ │ │ ├── .travis.yml
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── appveyor.yml
│ │ │ ├── galois.go
│ │ │ ├── galoisAvx512_amd64.go
│ │ │ ├── galoisAvx512_amd64.s
│ │ │ ├── galois_amd64.go
│ │ │ ├── galois_amd64.s
│ │ │ ├── galois_arm64.go
│ │ │ ├── galois_arm64.s
│ │ │ ├── galois_noasm.go
│ │ │ ├── galois_ppc64le.go
│ │ │ ├── galois_ppc64le.s
│ │ │ ├── inversion_tree.go
│ │ │ ├── matrix.go
│ │ │ ├── options.go
│ │ │ ├── reedsolomon.go
│ │ │ └── streaming.go
│ ├── pires
│ │ └── go-proxyproto
│ │ │ ├── .gitignore
│ │ │ ├── .travis.yml
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── addr_proto.go
│ │ │ ├── header.go
│ │ │ ├── v1.go
│ │ │ ├── v2.go
│ │ │ └── version_cmd.go
│ ├── pkg
│ │ └── errors
│ │ │ ├── .gitignore
│ │ │ ├── .travis.yml
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── appveyor.yml
│ │ │ ├── errors.go
│ │ │ └── stack.go
│ ├── pmezard
│ │ └── go-difflib
│ │ │ ├── LICENSE
│ │ │ └── difflib
│ │ │ └── difflib.go
│ ├── rakyll
│ │ └── statik
│ │ │ ├── LICENSE
│ │ │ └── fs
│ │ │ └── fs.go
│ ├── rodaine
│ │ └── table
│ │ │ ├── .travis.yml
│ │ │ ├── license
│ │ │ ├── makefile
│ │ │ ├── readme.md
│ │ │ └── table.go
│ ├── spf13
│ │ ├── cobra
│ │ │ ├── .gitignore
│ │ │ ├── .mailmap
│ │ │ ├── .travis.yml
│ │ │ ├── LICENSE.txt
│ │ │ ├── README.md
│ │ │ ├── args.go
│ │ │ ├── bash_completions.go
│ │ │ ├── bash_completions.md
│ │ │ ├── cobra.go
│ │ │ ├── command.go
│ │ │ ├── command_notwin.go
│ │ │ ├── command_win.go
│ │ │ └── zsh_completions.go
│ │ └── pflag
│ │ │ ├── .gitignore
│ │ │ ├── .travis.yml
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── bool.go
│ │ │ ├── bool_slice.go
│ │ │ ├── bytes.go
│ │ │ ├── count.go
│ │ │ ├── duration.go
│ │ │ ├── duration_slice.go
│ │ │ ├── flag.go
│ │ │ ├── float32.go
│ │ │ ├── float64.go
│ │ │ ├── golangflag.go
│ │ │ ├── int.go
│ │ │ ├── int16.go
│ │ │ ├── int32.go
│ │ │ ├── int64.go
│ │ │ ├── int8.go
│ │ │ ├── int_slice.go
│ │ │ ├── ip.go
│ │ │ ├── ip_slice.go
│ │ │ ├── ipmask.go
│ │ │ ├── ipnet.go
│ │ │ ├── string.go
│ │ │ ├── string_array.go
│ │ │ ├── string_slice.go
│ │ │ ├── uint.go
│ │ │ ├── uint16.go
│ │ │ ├── uint32.go
│ │ │ ├── uint64.go
│ │ │ ├── uint8.go
│ │ │ └── uint_slice.go
│ ├── stretchr
│ │ └── testify
│ │ │ ├── LICENSE
│ │ │ └── assert
│ │ │ ├── assertion_format.go
│ │ │ ├── assertion_format.go.tmpl
│ │ │ ├── assertion_forward.go
│ │ │ ├── assertion_forward.go.tmpl
│ │ │ ├── assertions.go
│ │ │ ├── doc.go
│ │ │ ├── errors.go
│ │ │ ├── forward_assertions.go
│ │ │ └── http_assertions.go
│ ├── templexxx
│ │ ├── cpufeat
│ │ │ ├── .gitignore
│ │ │ ├── LICENSE
│ │ │ ├── cpu.go
│ │ │ ├── cpu_arm.go
│ │ │ ├── cpu_arm64.go
│ │ │ ├── cpu_mips.go
│ │ │ ├── cpu_mips64.go
│ │ │ ├── cpu_mips64le.go
│ │ │ ├── cpu_mipsle.go
│ │ │ ├── cpu_ppc64.go
│ │ │ ├── cpu_ppc64le.go
│ │ │ ├── cpu_s390x.go
│ │ │ ├── cpu_x86.go
│ │ │ └── cpu_x86.s
│ │ └── xor
│ │ │ ├── .gitattributes
│ │ │ ├── .gitignore
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── avx2_amd64.s
│ │ │ ├── nosimd.go
│ │ │ ├── sse2_amd64.s
│ │ │ ├── xor.go
│ │ │ ├── xor_amd64.go
│ │ │ └── xor_other.go
│ ├── tjfoc
│ │ └── gmsm
│ │ │ ├── LICENSE
│ │ │ └── sm4
│ │ │ ├── key.pem
│ │ │ └── sm4.go
│ └── vaughan0
│ │ └── go-ini
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── ini.go
│ │ └── test.ini
├── golang.org
│ └── x
│ │ ├── crypto
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ ├── blowfish
│ │ │ ├── block.go
│ │ │ ├── cipher.go
│ │ │ └── const.go
│ │ ├── cast5
│ │ │ └── cast5.go
│ │ ├── internal
│ │ │ └── subtle
│ │ │ │ ├── aliasing.go
│ │ │ │ └── aliasing_appengine.go
│ │ ├── pbkdf2
│ │ │ └── pbkdf2.go
│ │ ├── salsa20
│ │ │ ├── salsa
│ │ │ │ ├── hsalsa20.go
│ │ │ │ ├── salsa2020_amd64.s
│ │ │ │ ├── salsa208.go
│ │ │ │ ├── salsa20_amd64.go
│ │ │ │ └── salsa20_ref.go
│ │ │ └── salsa20.go
│ │ ├── tea
│ │ │ └── cipher.go
│ │ ├── twofish
│ │ │ └── twofish.go
│ │ └── xtea
│ │ │ ├── block.go
│ │ │ └── cipher.go
│ │ ├── net
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ ├── bpf
│ │ │ ├── asm.go
│ │ │ ├── constants.go
│ │ │ ├── doc.go
│ │ │ ├── instructions.go
│ │ │ ├── setter.go
│ │ │ ├── vm.go
│ │ │ └── vm_instructions.go
│ │ ├── context
│ │ │ ├── context.go
│ │ │ ├── go17.go
│ │ │ ├── go19.go
│ │ │ ├── pre_go17.go
│ │ │ └── pre_go19.go
│ │ ├── http
│ │ │ └── httpguts
│ │ │ │ ├── guts.go
│ │ │ │ └── httplex.go
│ │ ├── idna
│ │ │ ├── idna10.0.0.go
│ │ │ ├── idna9.0.0.go
│ │ │ ├── punycode.go
│ │ │ ├── tables10.0.0.go
│ │ │ ├── tables11.0.0.go
│ │ │ ├── tables9.0.0.go
│ │ │ ├── trie.go
│ │ │ └── trieval.go
│ │ ├── internal
│ │ │ ├── iana
│ │ │ │ └── const.go
│ │ │ ├── socket
│ │ │ │ ├── cmsghdr.go
│ │ │ │ ├── cmsghdr_bsd.go
│ │ │ │ ├── cmsghdr_linux_32bit.go
│ │ │ │ ├── cmsghdr_linux_64bit.go
│ │ │ │ ├── cmsghdr_solaris_64bit.go
│ │ │ │ ├── cmsghdr_stub.go
│ │ │ │ ├── empty.s
│ │ │ │ ├── error_unix.go
│ │ │ │ ├── error_windows.go
│ │ │ │ ├── iovec_32bit.go
│ │ │ │ ├── iovec_64bit.go
│ │ │ │ ├── iovec_solaris_64bit.go
│ │ │ │ ├── iovec_stub.go
│ │ │ │ ├── mmsghdr_stub.go
│ │ │ │ ├── mmsghdr_unix.go
│ │ │ │ ├── msghdr_bsd.go
│ │ │ │ ├── msghdr_bsdvar.go
│ │ │ │ ├── msghdr_linux.go
│ │ │ │ ├── msghdr_linux_32bit.go
│ │ │ │ ├── msghdr_linux_64bit.go
│ │ │ │ ├── msghdr_openbsd.go
│ │ │ │ ├── msghdr_solaris_64bit.go
│ │ │ │ ├── msghdr_stub.go
│ │ │ │ ├── rawconn.go
│ │ │ │ ├── rawconn_mmsg.go
│ │ │ │ ├── rawconn_msg.go
│ │ │ │ ├── rawconn_nommsg.go
│ │ │ │ ├── rawconn_nomsg.go
│ │ │ │ ├── socket.go
│ │ │ │ ├── sys.go
│ │ │ │ ├── sys_bsd.go
│ │ │ │ ├── sys_bsdvar.go
│ │ │ │ ├── sys_const_unix.go
│ │ │ │ ├── sys_darwin.go
│ │ │ │ ├── sys_dragonfly.go
│ │ │ │ ├── sys_go1_11_darwin.go
│ │ │ │ ├── sys_linkname.go
│ │ │ │ ├── sys_linux.go
│ │ │ │ ├── sys_linux_386.go
│ │ │ │ ├── sys_linux_386.s
│ │ │ │ ├── sys_linux_amd64.go
│ │ │ │ ├── sys_linux_arm.go
│ │ │ │ ├── sys_linux_arm64.go
│ │ │ │ ├── sys_linux_mips.go
│ │ │ │ ├── sys_linux_mips64.go
│ │ │ │ ├── sys_linux_mips64le.go
│ │ │ │ ├── sys_linux_mipsle.go
│ │ │ │ ├── sys_linux_ppc64.go
│ │ │ │ ├── sys_linux_ppc64le.go
│ │ │ │ ├── sys_linux_riscv64.go
│ │ │ │ ├── sys_linux_s390x.go
│ │ │ │ ├── sys_linux_s390x.s
│ │ │ │ ├── sys_netbsd.go
│ │ │ │ ├── sys_posix.go
│ │ │ │ ├── sys_solaris.go
│ │ │ │ ├── sys_solaris_amd64.s
│ │ │ │ ├── sys_stub.go
│ │ │ │ ├── sys_unix.go
│ │ │ │ ├── sys_windows.go
│ │ │ │ ├── zsys_aix_ppc64.go
│ │ │ │ ├── zsys_darwin_386.go
│ │ │ │ ├── zsys_darwin_amd64.go
│ │ │ │ ├── zsys_darwin_arm.go
│ │ │ │ ├── zsys_darwin_arm64.go
│ │ │ │ ├── zsys_dragonfly_amd64.go
│ │ │ │ ├── zsys_freebsd_386.go
│ │ │ │ ├── zsys_freebsd_amd64.go
│ │ │ │ ├── zsys_freebsd_arm.go
│ │ │ │ ├── zsys_freebsd_arm64.go
│ │ │ │ ├── zsys_linux_386.go
│ │ │ │ ├── zsys_linux_amd64.go
│ │ │ │ ├── zsys_linux_arm.go
│ │ │ │ ├── zsys_linux_arm64.go
│ │ │ │ ├── zsys_linux_mips.go
│ │ │ │ ├── zsys_linux_mips64.go
│ │ │ │ ├── zsys_linux_mips64le.go
│ │ │ │ ├── zsys_linux_mipsle.go
│ │ │ │ ├── zsys_linux_ppc64.go
│ │ │ │ ├── zsys_linux_ppc64le.go
│ │ │ │ ├── zsys_linux_riscv64.go
│ │ │ │ ├── zsys_linux_s390x.go
│ │ │ │ ├── zsys_netbsd_386.go
│ │ │ │ ├── zsys_netbsd_amd64.go
│ │ │ │ ├── zsys_netbsd_arm.go
│ │ │ │ ├── zsys_netbsd_arm64.go
│ │ │ │ ├── zsys_openbsd_386.go
│ │ │ │ ├── zsys_openbsd_amd64.go
│ │ │ │ ├── zsys_openbsd_arm.go
│ │ │ │ ├── zsys_openbsd_arm64.go
│ │ │ │ └── zsys_solaris_amd64.go
│ │ │ └── socks
│ │ │ │ ├── client.go
│ │ │ │ └── socks.go
│ │ ├── ipv4
│ │ │ ├── batch.go
│ │ │ ├── control.go
│ │ │ ├── control_bsd.go
│ │ │ ├── control_pktinfo.go
│ │ │ ├── control_stub.go
│ │ │ ├── control_unix.go
│ │ │ ├── control_windows.go
│ │ │ ├── dgramopt.go
│ │ │ ├── doc.go
│ │ │ ├── endpoint.go
│ │ │ ├── genericopt.go
│ │ │ ├── header.go
│ │ │ ├── helper.go
│ │ │ ├── iana.go
│ │ │ ├── icmp.go
│ │ │ ├── icmp_linux.go
│ │ │ ├── icmp_stub.go
│ │ │ ├── packet.go
│ │ │ ├── payload.go
│ │ │ ├── payload_cmsg.go
│ │ │ ├── payload_nocmsg.go
│ │ │ ├── sockopt.go
│ │ │ ├── sockopt_posix.go
│ │ │ ├── sockopt_stub.go
│ │ │ ├── sys_aix.go
│ │ │ ├── sys_asmreq.go
│ │ │ ├── sys_asmreq_stub.go
│ │ │ ├── sys_asmreqn.go
│ │ │ ├── sys_asmreqn_stub.go
│ │ │ ├── sys_bpf.go
│ │ │ ├── sys_bpf_stub.go
│ │ │ ├── sys_bsd.go
│ │ │ ├── sys_darwin.go
│ │ │ ├── sys_dragonfly.go
│ │ │ ├── sys_freebsd.go
│ │ │ ├── sys_linux.go
│ │ │ ├── sys_solaris.go
│ │ │ ├── sys_ssmreq.go
│ │ │ ├── sys_ssmreq_stub.go
│ │ │ ├── sys_stub.go
│ │ │ ├── sys_windows.go
│ │ │ ├── zsys_aix_ppc64.go
│ │ │ ├── zsys_darwin.go
│ │ │ ├── zsys_dragonfly.go
│ │ │ ├── zsys_freebsd_386.go
│ │ │ ├── zsys_freebsd_amd64.go
│ │ │ ├── zsys_freebsd_arm.go
│ │ │ ├── zsys_linux_386.go
│ │ │ ├── zsys_linux_amd64.go
│ │ │ ├── zsys_linux_arm.go
│ │ │ ├── zsys_linux_arm64.go
│ │ │ ├── zsys_linux_mips.go
│ │ │ ├── zsys_linux_mips64.go
│ │ │ ├── zsys_linux_mips64le.go
│ │ │ ├── zsys_linux_mipsle.go
│ │ │ ├── zsys_linux_ppc.go
│ │ │ ├── zsys_linux_ppc64.go
│ │ │ ├── zsys_linux_ppc64le.go
│ │ │ ├── zsys_linux_riscv64.go
│ │ │ ├── zsys_linux_s390x.go
│ │ │ ├── zsys_netbsd.go
│ │ │ ├── zsys_openbsd.go
│ │ │ └── zsys_solaris.go
│ │ ├── ipv6
│ │ │ ├── batch.go
│ │ │ ├── control.go
│ │ │ ├── control_rfc2292_unix.go
│ │ │ ├── control_rfc3542_unix.go
│ │ │ ├── control_stub.go
│ │ │ ├── control_unix.go
│ │ │ ├── control_windows.go
│ │ │ ├── dgramopt.go
│ │ │ ├── doc.go
│ │ │ ├── endpoint.go
│ │ │ ├── genericopt.go
│ │ │ ├── header.go
│ │ │ ├── helper.go
│ │ │ ├── iana.go
│ │ │ ├── icmp.go
│ │ │ ├── icmp_bsd.go
│ │ │ ├── icmp_linux.go
│ │ │ ├── icmp_solaris.go
│ │ │ ├── icmp_stub.go
│ │ │ ├── icmp_windows.go
│ │ │ ├── payload.go
│ │ │ ├── payload_cmsg.go
│ │ │ ├── payload_nocmsg.go
│ │ │ ├── sockopt.go
│ │ │ ├── sockopt_posix.go
│ │ │ ├── sockopt_stub.go
│ │ │ ├── sys_aix.go
│ │ │ ├── sys_asmreq.go
│ │ │ ├── sys_asmreq_stub.go
│ │ │ ├── sys_bpf.go
│ │ │ ├── sys_bpf_stub.go
│ │ │ ├── sys_bsd.go
│ │ │ ├── sys_darwin.go
│ │ │ ├── sys_freebsd.go
│ │ │ ├── sys_linux.go
│ │ │ ├── sys_solaris.go
│ │ │ ├── sys_ssmreq.go
│ │ │ ├── sys_ssmreq_stub.go
│ │ │ ├── sys_stub.go
│ │ │ ├── sys_windows.go
│ │ │ ├── zsys_aix_ppc64.go
│ │ │ ├── zsys_darwin.go
│ │ │ ├── zsys_dragonfly.go
│ │ │ ├── zsys_freebsd_386.go
│ │ │ ├── zsys_freebsd_amd64.go
│ │ │ ├── zsys_freebsd_arm.go
│ │ │ ├── zsys_linux_386.go
│ │ │ ├── zsys_linux_amd64.go
│ │ │ ├── zsys_linux_arm.go
│ │ │ ├── zsys_linux_arm64.go
│ │ │ ├── zsys_linux_mips.go
│ │ │ ├── zsys_linux_mips64.go
│ │ │ ├── zsys_linux_mips64le.go
│ │ │ ├── zsys_linux_mipsle.go
│ │ │ ├── zsys_linux_ppc.go
│ │ │ ├── zsys_linux_ppc64.go
│ │ │ ├── zsys_linux_ppc64le.go
│ │ │ ├── zsys_linux_riscv64.go
│ │ │ ├── zsys_linux_s390x.go
│ │ │ ├── zsys_netbsd.go
│ │ │ ├── zsys_openbsd.go
│ │ │ └── zsys_solaris.go
│ │ ├── proxy
│ │ │ ├── dial.go
│ │ │ ├── direct.go
│ │ │ ├── per_host.go
│ │ │ ├── proxy.go
│ │ │ └── socks5.go
│ │ └── websocket
│ │ │ ├── client.go
│ │ │ ├── dial.go
│ │ │ ├── hybi.go
│ │ │ ├── server.go
│ │ │ └── websocket.go
│ │ ├── sys
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ ├── unix
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── affinity_linux.go
│ │ │ ├── aliases.go
│ │ │ ├── asm_aix_ppc64.s
│ │ │ ├── asm_darwin_386.s
│ │ │ ├── asm_darwin_amd64.s
│ │ │ ├── asm_darwin_arm.s
│ │ │ ├── asm_darwin_arm64.s
│ │ │ ├── asm_dragonfly_amd64.s
│ │ │ ├── asm_freebsd_386.s
│ │ │ ├── asm_freebsd_amd64.s
│ │ │ ├── asm_freebsd_arm.s
│ │ │ ├── asm_freebsd_arm64.s
│ │ │ ├── asm_linux_386.s
│ │ │ ├── asm_linux_amd64.s
│ │ │ ├── asm_linux_arm.s
│ │ │ ├── asm_linux_arm64.s
│ │ │ ├── asm_linux_mips64x.s
│ │ │ ├── asm_linux_mipsx.s
│ │ │ ├── asm_linux_ppc64x.s
│ │ │ ├── asm_linux_s390x.s
│ │ │ ├── asm_netbsd_386.s
│ │ │ ├── asm_netbsd_amd64.s
│ │ │ ├── asm_netbsd_arm.s
│ │ │ ├── asm_netbsd_arm64.s
│ │ │ ├── asm_openbsd_386.s
│ │ │ ├── asm_openbsd_amd64.s
│ │ │ ├── asm_openbsd_arm.s
│ │ │ ├── asm_solaris_amd64.s
│ │ │ ├── bluetooth_linux.go
│ │ │ ├── cap_freebsd.go
│ │ │ ├── constants.go
│ │ │ ├── dev_aix_ppc.go
│ │ │ ├── dev_aix_ppc64.go
│ │ │ ├── dev_darwin.go
│ │ │ ├── dev_dragonfly.go
│ │ │ ├── dev_freebsd.go
│ │ │ ├── dev_linux.go
│ │ │ ├── dev_netbsd.go
│ │ │ ├── dev_openbsd.go
│ │ │ ├── dirent.go
│ │ │ ├── endian_big.go
│ │ │ ├── endian_little.go
│ │ │ ├── env_unix.go
│ │ │ ├── errors_freebsd_386.go
│ │ │ ├── errors_freebsd_amd64.go
│ │ │ ├── errors_freebsd_arm.go
│ │ │ ├── fcntl.go
│ │ │ ├── fcntl_darwin.go
│ │ │ ├── fcntl_linux_32bit.go
│ │ │ ├── gccgo.go
│ │ │ ├── gccgo_c.c
│ │ │ ├── gccgo_linux_amd64.go
│ │ │ ├── ioctl.go
│ │ │ ├── mkall.sh
│ │ │ ├── mkerrors.sh
│ │ │ ├── mksysctl_openbsd.pl
│ │ │ ├── openbsd_pledge.go
│ │ │ ├── openbsd_unveil.go
│ │ │ ├── pagesize_unix.go
│ │ │ ├── race.go
│ │ │ ├── race0.go
│ │ │ ├── sockcmsg_linux.go
│ │ │ ├── sockcmsg_unix.go
│ │ │ ├── str.go
│ │ │ ├── syscall.go
│ │ │ ├── syscall_aix.go
│ │ │ ├── syscall_aix_ppc.go
│ │ │ ├── syscall_aix_ppc64.go
│ │ │ ├── syscall_bsd.go
│ │ │ ├── syscall_darwin.go
│ │ │ ├── syscall_darwin_386.go
│ │ │ ├── syscall_darwin_amd64.go
│ │ │ ├── syscall_darwin_arm.go
│ │ │ ├── syscall_darwin_arm64.go
│ │ │ ├── syscall_darwin_libSystem.go
│ │ │ ├── syscall_dragonfly.go
│ │ │ ├── syscall_dragonfly_amd64.go
│ │ │ ├── syscall_freebsd.go
│ │ │ ├── syscall_freebsd_386.go
│ │ │ ├── syscall_freebsd_amd64.go
│ │ │ ├── syscall_freebsd_arm.go
│ │ │ ├── syscall_freebsd_arm64.go
│ │ │ ├── syscall_linux.go
│ │ │ ├── syscall_linux_386.go
│ │ │ ├── syscall_linux_amd64.go
│ │ │ ├── syscall_linux_amd64_gc.go
│ │ │ ├── syscall_linux_arm.go
│ │ │ ├── syscall_linux_arm64.go
│ │ │ ├── syscall_linux_gc.go
│ │ │ ├── syscall_linux_gc_386.go
│ │ │ ├── syscall_linux_gccgo_386.go
│ │ │ ├── syscall_linux_gccgo_arm.go
│ │ │ ├── syscall_linux_mips64x.go
│ │ │ ├── syscall_linux_mipsx.go
│ │ │ ├── syscall_linux_ppc64x.go
│ │ │ ├── syscall_linux_riscv64.go
│ │ │ ├── syscall_linux_s390x.go
│ │ │ ├── syscall_linux_sparc64.go
│ │ │ ├── syscall_netbsd.go
│ │ │ ├── syscall_netbsd_386.go
│ │ │ ├── syscall_netbsd_amd64.go
│ │ │ ├── syscall_netbsd_arm.go
│ │ │ ├── syscall_netbsd_arm64.go
│ │ │ ├── syscall_openbsd.go
│ │ │ ├── syscall_openbsd_386.go
│ │ │ ├── syscall_openbsd_amd64.go
│ │ │ ├── syscall_openbsd_arm.go
│ │ │ ├── syscall_solaris.go
│ │ │ ├── syscall_solaris_amd64.go
│ │ │ ├── syscall_unix.go
│ │ │ ├── syscall_unix_gc.go
│ │ │ ├── syscall_unix_gc_ppc64x.go
│ │ │ ├── timestruct.go
│ │ │ ├── xattr_bsd.go
│ │ │ ├── zerrors_aix_ppc.go
│ │ │ ├── zerrors_aix_ppc64.go
│ │ │ ├── zerrors_darwin_386.go
│ │ │ ├── zerrors_darwin_amd64.go
│ │ │ ├── zerrors_darwin_arm.go
│ │ │ ├── zerrors_darwin_arm64.go
│ │ │ ├── zerrors_dragonfly_amd64.go
│ │ │ ├── zerrors_freebsd_386.go
│ │ │ ├── zerrors_freebsd_amd64.go
│ │ │ ├── zerrors_freebsd_arm.go
│ │ │ ├── zerrors_freebsd_arm64.go
│ │ │ ├── zerrors_linux_386.go
│ │ │ ├── zerrors_linux_amd64.go
│ │ │ ├── zerrors_linux_arm.go
│ │ │ ├── zerrors_linux_arm64.go
│ │ │ ├── zerrors_linux_mips.go
│ │ │ ├── zerrors_linux_mips64.go
│ │ │ ├── zerrors_linux_mips64le.go
│ │ │ ├── zerrors_linux_mipsle.go
│ │ │ ├── zerrors_linux_ppc64.go
│ │ │ ├── zerrors_linux_ppc64le.go
│ │ │ ├── zerrors_linux_riscv64.go
│ │ │ ├── zerrors_linux_s390x.go
│ │ │ ├── zerrors_linux_sparc64.go
│ │ │ ├── zerrors_netbsd_386.go
│ │ │ ├── zerrors_netbsd_amd64.go
│ │ │ ├── zerrors_netbsd_arm.go
│ │ │ ├── zerrors_netbsd_arm64.go
│ │ │ ├── zerrors_openbsd_386.go
│ │ │ ├── zerrors_openbsd_amd64.go
│ │ │ ├── zerrors_openbsd_arm.go
│ │ │ ├── zerrors_solaris_amd64.go
│ │ │ ├── zptrace386_linux.go
│ │ │ ├── zptracearm_linux.go
│ │ │ ├── zptracemips_linux.go
│ │ │ ├── zptracemipsle_linux.go
│ │ │ ├── zsyscall_aix_ppc.go
│ │ │ ├── zsyscall_aix_ppc64.go
│ │ │ ├── zsyscall_aix_ppc64_gc.go
│ │ │ ├── zsyscall_aix_ppc64_gccgo.go
│ │ │ ├── zsyscall_darwin_386.1_11.go
│ │ │ ├── zsyscall_darwin_386.go
│ │ │ ├── zsyscall_darwin_386.s
│ │ │ ├── zsyscall_darwin_amd64.1_11.go
│ │ │ ├── zsyscall_darwin_amd64.go
│ │ │ ├── zsyscall_darwin_amd64.s
│ │ │ ├── zsyscall_darwin_arm.1_11.go
│ │ │ ├── zsyscall_darwin_arm.go
│ │ │ ├── zsyscall_darwin_arm.s
│ │ │ ├── zsyscall_darwin_arm64.1_11.go
│ │ │ ├── zsyscall_darwin_arm64.go
│ │ │ ├── zsyscall_darwin_arm64.s
│ │ │ ├── zsyscall_dragonfly_amd64.go
│ │ │ ├── zsyscall_freebsd_386.go
│ │ │ ├── zsyscall_freebsd_amd64.go
│ │ │ ├── zsyscall_freebsd_arm.go
│ │ │ ├── zsyscall_freebsd_arm64.go
│ │ │ ├── zsyscall_linux_386.go
│ │ │ ├── zsyscall_linux_amd64.go
│ │ │ ├── zsyscall_linux_arm.go
│ │ │ ├── zsyscall_linux_arm64.go
│ │ │ ├── zsyscall_linux_mips.go
│ │ │ ├── zsyscall_linux_mips64.go
│ │ │ ├── zsyscall_linux_mips64le.go
│ │ │ ├── zsyscall_linux_mipsle.go
│ │ │ ├── zsyscall_linux_ppc64.go
│ │ │ ├── zsyscall_linux_ppc64le.go
│ │ │ ├── zsyscall_linux_riscv64.go
│ │ │ ├── zsyscall_linux_s390x.go
│ │ │ ├── zsyscall_linux_sparc64.go
│ │ │ ├── zsyscall_netbsd_386.go
│ │ │ ├── zsyscall_netbsd_amd64.go
│ │ │ ├── zsyscall_netbsd_arm.go
│ │ │ ├── zsyscall_netbsd_arm64.go
│ │ │ ├── zsyscall_openbsd_386.go
│ │ │ ├── zsyscall_openbsd_amd64.go
│ │ │ ├── zsyscall_openbsd_arm.go
│ │ │ ├── zsyscall_solaris_amd64.go
│ │ │ ├── zsysctl_openbsd_386.go
│ │ │ ├── zsysctl_openbsd_amd64.go
│ │ │ ├── zsysctl_openbsd_arm.go
│ │ │ ├── zsysnum_darwin_386.go
│ │ │ ├── zsysnum_darwin_amd64.go
│ │ │ ├── zsysnum_darwin_arm.go
│ │ │ ├── zsysnum_darwin_arm64.go
│ │ │ ├── zsysnum_dragonfly_amd64.go
│ │ │ ├── zsysnum_freebsd_386.go
│ │ │ ├── zsysnum_freebsd_amd64.go
│ │ │ ├── zsysnum_freebsd_arm.go
│ │ │ ├── zsysnum_freebsd_arm64.go
│ │ │ ├── zsysnum_linux_386.go
│ │ │ ├── zsysnum_linux_amd64.go
│ │ │ ├── zsysnum_linux_arm.go
│ │ │ ├── zsysnum_linux_arm64.go
│ │ │ ├── zsysnum_linux_mips.go
│ │ │ ├── zsysnum_linux_mips64.go
│ │ │ ├── zsysnum_linux_mips64le.go
│ │ │ ├── zsysnum_linux_mipsle.go
│ │ │ ├── zsysnum_linux_ppc64.go
│ │ │ ├── zsysnum_linux_ppc64le.go
│ │ │ ├── zsysnum_linux_riscv64.go
│ │ │ ├── zsysnum_linux_s390x.go
│ │ │ ├── zsysnum_linux_sparc64.go
│ │ │ ├── zsysnum_netbsd_386.go
│ │ │ ├── zsysnum_netbsd_amd64.go
│ │ │ ├── zsysnum_netbsd_arm.go
│ │ │ ├── zsysnum_netbsd_arm64.go
│ │ │ ├── zsysnum_openbsd_386.go
│ │ │ ├── zsysnum_openbsd_amd64.go
│ │ │ ├── zsysnum_openbsd_arm.go
│ │ │ ├── ztypes_aix_ppc.go
│ │ │ ├── ztypes_aix_ppc64.go
│ │ │ ├── ztypes_darwin_386.go
│ │ │ ├── ztypes_darwin_amd64.go
│ │ │ ├── ztypes_darwin_arm.go
│ │ │ ├── ztypes_darwin_arm64.go
│ │ │ ├── ztypes_dragonfly_amd64.go
│ │ │ ├── ztypes_freebsd_386.go
│ │ │ ├── ztypes_freebsd_amd64.go
│ │ │ ├── ztypes_freebsd_arm.go
│ │ │ ├── ztypes_freebsd_arm64.go
│ │ │ ├── ztypes_linux_386.go
│ │ │ ├── ztypes_linux_amd64.go
│ │ │ ├── ztypes_linux_arm.go
│ │ │ ├── ztypes_linux_arm64.go
│ │ │ ├── ztypes_linux_mips.go
│ │ │ ├── ztypes_linux_mips64.go
│ │ │ ├── ztypes_linux_mips64le.go
│ │ │ ├── ztypes_linux_mipsle.go
│ │ │ ├── ztypes_linux_ppc64.go
│ │ │ ├── ztypes_linux_ppc64le.go
│ │ │ ├── ztypes_linux_riscv64.go
│ │ │ ├── ztypes_linux_s390x.go
│ │ │ ├── ztypes_linux_sparc64.go
│ │ │ ├── ztypes_netbsd_386.go
│ │ │ ├── ztypes_netbsd_amd64.go
│ │ │ ├── ztypes_netbsd_arm.go
│ │ │ ├── ztypes_netbsd_arm64.go
│ │ │ ├── ztypes_openbsd_386.go
│ │ │ ├── ztypes_openbsd_amd64.go
│ │ │ ├── ztypes_openbsd_arm.go
│ │ │ └── ztypes_solaris_amd64.go
│ │ └── windows
│ │ │ ├── aliases.go
│ │ │ ├── asm_windows_386.s
│ │ │ ├── asm_windows_amd64.s
│ │ │ ├── asm_windows_arm.s
│ │ │ ├── dll_windows.go
│ │ │ ├── env_windows.go
│ │ │ ├── eventlog.go
│ │ │ ├── exec_windows.go
│ │ │ ├── memory_windows.go
│ │ │ ├── mksyscall.go
│ │ │ ├── race.go
│ │ │ ├── race0.go
│ │ │ ├── security_windows.go
│ │ │ ├── service.go
│ │ │ ├── str.go
│ │ │ ├── syscall.go
│ │ │ ├── syscall_windows.go
│ │ │ ├── types_windows.go
│ │ │ ├── types_windows_386.go
│ │ │ ├── types_windows_amd64.go
│ │ │ ├── types_windows_arm.go
│ │ │ └── zsyscall_windows.go
│ │ ├── text
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ ├── secure
│ │ │ └── bidirule
│ │ │ │ ├── bidirule.go
│ │ │ │ ├── bidirule10.0.0.go
│ │ │ │ └── bidirule9.0.0.go
│ │ ├── transform
│ │ │ └── transform.go
│ │ └── unicode
│ │ │ ├── bidi
│ │ │ ├── bidi.go
│ │ │ ├── bracket.go
│ │ │ ├── core.go
│ │ │ ├── prop.go
│ │ │ ├── tables10.0.0.go
│ │ │ ├── tables11.0.0.go
│ │ │ ├── tables9.0.0.go
│ │ │ └── trieval.go
│ │ │ └── norm
│ │ │ ├── composition.go
│ │ │ ├── forminfo.go
│ │ │ ├── input.go
│ │ │ ├── iter.go
│ │ │ ├── normalize.go
│ │ │ ├── readwriter.go
│ │ │ ├── tables10.0.0.go
│ │ │ ├── tables11.0.0.go
│ │ │ ├── tables9.0.0.go
│ │ │ ├── transform.go
│ │ │ └── trie.go
│ │ └── time
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ └── rate
│ │ └── rate.go
└── modules.txt
└── web
├── frpc
├── .babelrc
├── .gitignore
├── Makefile
├── package-lock.json
├── package.json
├── postcss.config.js
├── src
│ ├── App.vue
│ ├── assets
│ │ └── favicon.ico
│ ├── components
│ │ ├── Configure.vue
│ │ └── Overview.vue
│ ├── index.html
│ ├── main.js
│ ├── router
│ │ └── index.js
│ └── utils
│ │ ├── less
│ │ └── custom.less
│ │ └── status.js
├── webpack.config.js
└── yarn.lock
└── frps
├── .babelrc
├── .gitignore
├── Makefile
├── package-lock.json
├── package.json
├── postcss.config.js
├── src
├── App.vue
├── assets
│ └── favicon.ico
├── components
│ ├── Overview.vue
│ ├── ProxiesHttp.vue
│ ├── ProxiesHttps.vue
│ ├── ProxiesStcp.vue
│ ├── ProxiesTcp.vue
│ ├── ProxiesUdp.vue
│ └── Traffic.vue
├── index.html
├── main.js
├── router
│ └── index.js
└── utils
│ ├── chart.js
│ ├── less
│ └── custom.less
│ └── proxy.js
└── webpack.config.js
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 | *.prof
25 |
26 | # Self
27 | bin/
28 | packages/
29 | test/bin/
30 |
31 | # Cache
32 | *.swp
33 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: go
3 |
4 | go:
5 | - 1.12.x
6 |
7 | install:
8 | - make
9 |
10 | script:
11 | - make alltest
12 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM registry.cn-hangzhou.aliyuncs.com/baibaicloud/baibai-frp:base
2 |
3 | MAINTAINER baibai
4 |
5 | ENV LANG en_US.UTF-8
6 | ENV LANGUAGE en_US:en
7 | ENV LC_ALL en_US.UTF-8
8 |
9 | RUN mkdir /logs
10 | COPY frps /frps
11 | COPY frps.ini /frps.ini
12 | RUN chmod 777 /frps
13 |
14 | ENTRYPOINT ["sh","-c","/frps -c /frps.ini"]
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | export PATH := $(GOPATH)/bin:$(PATH)
2 |
3 | all: fmt build
4 |
5 | build: frps frpc
6 |
7 | # compile assets into binary file
8 | file:
9 | rm -rf ./assets/frps/static/*
10 | rm -rf ./assets/frpc/static/*
11 | cp -rf ./web/frps/dist/* ./assets/frps/static
12 | cp -rf ./web/frpc/dist/* ./assets/frpc/static
13 | rm -rf ./assets/frps/statik
14 | rm -rf ./assets/frpc/statik
15 | go generate ./assets/...
16 |
17 | fmt:
18 | go fmt ./...
19 |
20 | frps:
21 | go build -o bin/frps ./cmd/frps
22 |
23 | frpc:
24 | go build -o bin/frpc ./cmd/frpc
25 |
26 | test: gotest
27 |
28 | gotest:
29 | go test -v --cover ./assets/...
30 | go test -v --cover ./client/...
31 | go test -v --cover ./cmd/...
32 | go test -v --cover ./models/...
33 | go test -v --cover ./server/...
34 | go test -v --cover ./utils/...
35 |
36 | ci:
37 | go test -count=1 -p=1 -v ./tests/...
38 |
39 | alltest: gotest ci
40 |
41 | clean:
42 | rm -f ./bin/frpc
43 | rm -f ./bin/frps
44 |
--------------------------------------------------------------------------------
/assets/frpc/static/6f0a76321d30f3c8120915e57f7bd77e.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/baibaicloud/frp/5578e46a0a83ca34d935dc314018945b91f08697/assets/frpc/static/6f0a76321d30f3c8120915e57f7bd77e.ttf
--------------------------------------------------------------------------------
/assets/frpc/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/baibaicloud/frp/5578e46a0a83ca34d935dc314018945b91f08697/assets/frpc/static/favicon.ico
--------------------------------------------------------------------------------
/assets/frpc/static/index.html:
--------------------------------------------------------------------------------
1 |
frp client admin UI
--------------------------------------------------------------------------------
/assets/frps/static/6f0a76321d30f3c8120915e57f7bd77e.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/baibaicloud/frp/5578e46a0a83ca34d935dc314018945b91f08697/assets/frps/static/6f0a76321d30f3c8120915e57f7bd77e.ttf
--------------------------------------------------------------------------------
/assets/frps/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/baibaicloud/frp/5578e46a0a83ca34d935dc314018945b91f08697/assets/frps/static/favicon.ico
--------------------------------------------------------------------------------
/assets/frps/static/index.html:
--------------------------------------------------------------------------------
1 | frps dashboard
--------------------------------------------------------------------------------
/client/event/event.go:
--------------------------------------------------------------------------------
1 | package event
2 |
3 | import (
4 | "errors"
5 |
6 | "github.com/fatedier/frp/models/msg"
7 | )
8 |
9 | type EventType int
10 |
11 | const (
12 | EvStartProxy EventType = iota
13 | EvCloseProxy
14 | )
15 |
16 | var (
17 | ErrPayloadType = errors.New("error payload type")
18 | )
19 |
20 | type EventHandler func(evType EventType, payload interface{}) error
21 |
22 | type StartProxyPayload struct {
23 | NewProxyMsg *msg.NewProxy
24 | }
25 |
26 | type CloseProxyPayload struct {
27 | CloseProxyMsg *msg.CloseProxy
28 | }
29 |
--------------------------------------------------------------------------------
/cmd/frpc/main.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 fatedier, fatedier@gmail.com
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package main
16 |
17 | import (
18 | "math/rand"
19 | "time"
20 |
21 | _ "github.com/fatedier/frp/assets/frpc/statik"
22 | "github.com/fatedier/frp/cmd/frpc/sub"
23 |
24 | "github.com/fatedier/golib/crypto"
25 | )
26 |
27 | func main() {
28 | crypto.DefaultSalt = "frp"
29 | rand.Seed(time.Now().UnixNano())
30 |
31 | sub.Execute()
32 | }
33 |
--------------------------------------------------------------------------------
/cmd/frps/main.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 fatedier, fatedier@gmail.com
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package main
16 |
17 | import (
18 | "math/rand"
19 | "time"
20 |
21 | "github.com/fatedier/golib/crypto"
22 |
23 | _ "github.com/fatedier/frp/assets/frps/statik"
24 | )
25 |
26 | func main() {
27 | crypto.DefaultSalt = "frp"
28 | rand.Seed(time.Now().UnixNano())
29 |
30 | Execute()
31 | }
32 |
--------------------------------------------------------------------------------
/conf/frpc.ini:
--------------------------------------------------------------------------------
1 | [common]
2 | server_addr = 127.0.0.1
3 | server_port = 7000
4 | pritoken = 2b33386cb6d14ab7b5f6738f7fc1704c
5 |
6 | [ssh]
7 | type = tcp
8 | local_ip = 127.0.0.1
9 | local_port = 22
10 | remote_port = 6000
11 |
--------------------------------------------------------------------------------
/conf/frps.ini:
--------------------------------------------------------------------------------
1 | [common]
2 | bind_port = 7000
3 | token_auth_url = http://127.0.0.1:8080/tunnel/token/check?token=
4 | port_check_url = http://127.0.0.1:8080/tunnel/port/check
5 |
--------------------------------------------------------------------------------
/conf/systemd/frpc.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Frp Client Service
3 | After=network.target
4 |
5 | [Service]
6 | Type=simple
7 | User=nobody
8 | Restart=on-failure
9 | RestartSec=5s
10 | ExecStart=/usr/bin/frpc -c /etc/frp/frpc.ini
11 | ExecReload=/usr/bin/frpc reload -c /etc/frp/frpc.ini
12 |
13 | [Install]
14 | WantedBy=multi-user.target
15 |
--------------------------------------------------------------------------------
/conf/systemd/frpc@.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Frp Client Service
3 | After=network.target
4 |
5 | [Service]
6 | Type=idle
7 | User=nobody
8 | Restart=on-failure
9 | RestartSec=5s
10 | ExecStart=/usr/bin/frpc -c /etc/frp/%i.ini
11 | ExecReload=/usr/bin/frpc reload -c /etc/frp/%i.ini
12 |
13 | [Install]
14 | WantedBy=multi-user.target
15 |
--------------------------------------------------------------------------------
/conf/systemd/frps.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Frp Server Service
3 | After=network.target
4 |
5 | [Service]
6 | Type=simple
7 | User=nobody
8 | Restart=on-failure
9 | RestartSec=5s
10 | ExecStart=/usr/bin/frps -c /etc/frp/frps.ini
11 |
12 | [Install]
13 | WantedBy=multi-user.target
14 |
--------------------------------------------------------------------------------
/conf/systemd/frps@.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Frp Server Service
3 | After=network.target
4 |
5 | [Service]
6 | Type=simple
7 | User=nobody
8 | Restart=on-failure
9 | RestartSec=5s
10 | ExecStart=/usr/bin/frps -c /etc/frp/%i.ini
11 |
12 | [Install]
13 | WantedBy=multi-user.target
14 |
--------------------------------------------------------------------------------
/doc/pic/architecture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/baibaicloud/frp/5578e46a0a83ca34d935dc314018945b91f08697/doc/pic/architecture.png
--------------------------------------------------------------------------------
/doc/pic/dashboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/baibaicloud/frp/5578e46a0a83ca34d935dc314018945b91f08697/doc/pic/dashboard.png
--------------------------------------------------------------------------------
/doc/pic/donate-alipay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/baibaicloud/frp/5578e46a0a83ca34d935dc314018945b91f08697/doc/pic/donate-alipay.png
--------------------------------------------------------------------------------
/doc/pic/donate-wechatpay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/baibaicloud/frp/5578e46a0a83ca34d935dc314018945b91f08697/doc/pic/donate-wechatpay.png
--------------------------------------------------------------------------------
/doc/pic/zsxq.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/baibaicloud/frp/5578e46a0a83ca34d935dc314018945b91f08697/doc/pic/zsxq.jpg
--------------------------------------------------------------------------------
/models/consts/consts.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 fatedier, fatedier@gmail.com
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package consts
16 |
17 | var (
18 | // proxy status
19 | Idle string = "idle"
20 | Working string = "working"
21 | Closed string = "closed"
22 | Online string = "online"
23 | Offline string = "offline"
24 |
25 | // proxy type
26 | TcpProxy string = "tcp"
27 | UdpProxy string = "udp"
28 | HttpProxy string = "http"
29 | HttpsProxy string = "https"
30 | StcpProxy string = "stcp"
31 | XtcpProxy string = "xtcp"
32 | )
33 |
--------------------------------------------------------------------------------
/models/errors/errors.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 fatedier, fatedier@gmail.com
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package errors
16 |
17 | import (
18 | "errors"
19 | )
20 |
21 | var (
22 | ErrMsgType = errors.New("message type error")
23 | ErrCtlClosed = errors.New("control is closed")
24 | )
25 |
--------------------------------------------------------------------------------
/models/proto/udp/udp_test.go:
--------------------------------------------------------------------------------
1 | package udp
2 |
3 | import (
4 | "testing"
5 |
6 | "github.com/stretchr/testify/assert"
7 | )
8 |
9 | func TestUdpPacket(t *testing.T) {
10 | assert := assert.New(t)
11 |
12 | buf := []byte("hello world")
13 | udpMsg := NewUdpPacket(buf, nil, nil)
14 |
15 | newBuf, err := GetContent(udpMsg)
16 | assert.NoError(err)
17 | assert.EqualValues(buf, newBuf)
18 | }
19 |
--------------------------------------------------------------------------------
/server/group/group.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 fatedier, fatedier@gmail.com
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package group
16 |
17 | import (
18 | "errors"
19 | )
20 |
21 | var (
22 | ErrGroupAuthFailed = errors.New("group auth failed")
23 | ErrGroupParamsInvalid = errors.New("group params invalid")
24 | ErrListenerClosed = errors.New("group listener closed")
25 | ErrGroupDifferentPort = errors.New("group should have same remote port")
26 | ErrProxyRepeated = errors.New("group proxy repeated")
27 | )
28 |
--------------------------------------------------------------------------------
/tests/ci/auto_test_frpc_visitor.ini:
--------------------------------------------------------------------------------
1 | [common]
2 | server_addr = 0.0.0.0
3 | server_port = 10700
4 | log_file = console
5 | # debug, info, warn, error
6 | log_level = debug
7 | token = 123456
8 |
9 | [stcp_visitor]
10 | type = stcp
11 | role = visitor
12 | server_name = stcp
13 | sk = abcdefg
14 | bind_addr = 127.0.0.1
15 | bind_port = 10805
16 |
17 | [stcp_ec_visitor]
18 | type = stcp
19 | role = visitor
20 | server_name = stcp_ec
21 | sk = abc
22 | bind_addr = 127.0.0.1
23 | bind_port = 10905
24 | use_encryption = true
25 | use_compression = true
26 |
--------------------------------------------------------------------------------
/tests/ci/auto_test_frps.ini:
--------------------------------------------------------------------------------
1 | [common]
2 | bind_addr = 0.0.0.0
3 | bind_port = 10700
4 | vhost_http_port = 10804
5 | log_level = trace
6 | token = 123456
7 | allow_ports = 10000-20000,20002,30000-50000
8 | subdomain_host = sub.com
9 |
--------------------------------------------------------------------------------
/tests/config/config.go:
--------------------------------------------------------------------------------
1 | package config
2 |
3 | import (
4 | "io/ioutil"
5 | "os"
6 | "path/filepath"
7 | )
8 |
9 | func GenerateConfigFile(path string, content string) (realPath string, err error) {
10 | realPath = filepath.Join(os.TempDir(), path)
11 | err = ioutil.WriteFile(realPath, []byte(content), 0666)
12 | return realPath, err
13 | }
14 |
--------------------------------------------------------------------------------
/tests/util/process.go:
--------------------------------------------------------------------------------
1 | package util
2 |
3 | import (
4 | "bytes"
5 | "context"
6 | "os/exec"
7 | )
8 |
9 | type Process struct {
10 | cmd *exec.Cmd
11 | cancel context.CancelFunc
12 | errorOutput *bytes.Buffer
13 |
14 | beforeStopHandler func()
15 | }
16 |
17 | func NewProcess(path string, params []string) *Process {
18 | ctx, cancel := context.WithCancel(context.Background())
19 | cmd := exec.CommandContext(ctx, path, params...)
20 | p := &Process{
21 | cmd: cmd,
22 | cancel: cancel,
23 | }
24 | p.errorOutput = bytes.NewBufferString("")
25 | cmd.Stderr = p.errorOutput
26 | return p
27 | }
28 |
29 | func (p *Process) Start() error {
30 | return p.cmd.Start()
31 | }
32 |
33 | func (p *Process) Stop() error {
34 | if p.beforeStopHandler != nil {
35 | p.beforeStopHandler()
36 | }
37 | p.cancel()
38 | return p.cmd.Wait()
39 | }
40 |
41 | func (p *Process) ErrorOutput() string {
42 | return p.errorOutput.String()
43 | }
44 |
45 | func (p *Process) SetBeforeStopHandler(fn func()) {
46 | p.beforeStopHandler = fn
47 | }
48 |
--------------------------------------------------------------------------------
/utils/metric/counter_test.go:
--------------------------------------------------------------------------------
1 | package metric
2 |
3 | import (
4 | "testing"
5 |
6 | "github.com/stretchr/testify/assert"
7 | )
8 |
9 | func TestCounter(t *testing.T) {
10 | assert := assert.New(t)
11 | c := NewCounter()
12 | c.Inc(10)
13 | assert.EqualValues(10, c.Count())
14 |
15 | c.Dec(5)
16 | assert.EqualValues(5, c.Count())
17 |
18 | cTmp := c.Snapshot()
19 | assert.EqualValues(5, cTmp.Count())
20 |
21 | c.Clear()
22 | assert.EqualValues(0, c.Count())
23 | }
24 |
--------------------------------------------------------------------------------
/utils/metric/date_counter_test.go:
--------------------------------------------------------------------------------
1 | package metric
2 |
3 | import (
4 | "testing"
5 |
6 | "github.com/stretchr/testify/assert"
7 | )
8 |
9 | func TestDateCounter(t *testing.T) {
10 | assert := assert.New(t)
11 |
12 | dc := NewDateCounter(3)
13 | dc.Inc(10)
14 | assert.EqualValues(10, dc.TodayCount())
15 |
16 | dc.Dec(5)
17 | assert.EqualValues(5, dc.TodayCount())
18 |
19 | counts := dc.GetLastDaysCount(3)
20 | assert.EqualValues(3, len(counts))
21 | assert.EqualValues(5, counts[0])
22 | assert.EqualValues(0, counts[1])
23 | assert.EqualValues(0, counts[2])
24 |
25 | dcTmp := dc.Snapshot()
26 | assert.EqualValues(5, dcTmp.TodayCount())
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/armon/go-socks5/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 |
--------------------------------------------------------------------------------
/vendor/github.com/armon/go-socks5/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.1
4 | - tip
5 |
--------------------------------------------------------------------------------
/vendor/github.com/armon/go-socks5/credentials.go:
--------------------------------------------------------------------------------
1 | package socks5
2 |
3 | // CredentialStore is used to support user/pass authentication
4 | type CredentialStore interface {
5 | Valid(user, password string) bool
6 | }
7 |
8 | // StaticCredentials enables using a map directly as a credential store
9 | type StaticCredentials map[string]string
10 |
11 | func (s StaticCredentials) Valid(user, password string) bool {
12 | pass, ok := s[user]
13 | if !ok {
14 | return false
15 | }
16 | return password == pass
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/armon/go-socks5/resolver.go:
--------------------------------------------------------------------------------
1 | package socks5
2 |
3 | import (
4 | "net"
5 |
6 | "golang.org/x/net/context"
7 | )
8 |
9 | // NameResolver is used to implement custom name resolution
10 | type NameResolver interface {
11 | Resolve(ctx context.Context, name string) (context.Context, net.IP, error)
12 | }
13 |
14 | // DNSResolver uses the system DNS to resolve host names
15 | type DNSResolver struct{}
16 |
17 | func (d DNSResolver) Resolve(ctx context.Context, name string) (context.Context, net.IP, error) {
18 | addr, err := net.ResolveIPAddr("ip", name)
19 | if err != nil {
20 | return ctx, nil, err
21 | }
22 | return ctx, addr.IP, err
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/github.com/davecgh/go-spew/LICENSE:
--------------------------------------------------------------------------------
1 | ISC License
2 |
3 | Copyright (c) 2012-2016 Dave Collins
4 |
5 | Permission to use, copy, modify, and distribute this software for any
6 | purpose with or without fee is hereby granted, provided that the above
7 | copyright notice and this permission notice appear in all copies.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
--------------------------------------------------------------------------------
/vendor/github.com/fatedier/beego/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2014 astaxie
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
--------------------------------------------------------------------------------
/vendor/github.com/fatedier/beego/logs/color.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 beego Author. All Rights Reserved.
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | // +build !windows
16 |
17 | package logs
18 |
19 | import "io"
20 |
21 | type ansiColorWriter struct {
22 | w io.Writer
23 | mode outputMode
24 | }
25 |
26 | func (cw *ansiColorWriter) Write(p []byte) (int, error) {
27 | return cw.w.Write(p)
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/github.com/fatedier/golib/errors/errors.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 fatedier, fatedier@gmail.com
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | package errors
16 |
17 | import (
18 | "fmt"
19 | )
20 |
21 | func PanicToError(fn func()) (err error) {
22 | defer func() {
23 | if r := recover(); r != nil {
24 | err = fmt.Errorf("Panic error: %v", r)
25 | }
26 | }()
27 |
28 | fn()
29 | return
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/github.com/fatedier/kcp-go/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 | *.prof
25 |
--------------------------------------------------------------------------------
/vendor/github.com/fatedier/kcp-go/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.9.x
4 | - 1.10.x
5 | - 1.11.x
6 |
7 | before_install:
8 | - go get -t -v ./...
9 |
10 | install:
11 | - go get github.com/xtaci/kcp-go
12 |
13 | script:
14 | - go test -coverprofile=coverage.txt -covermode=atomic -bench .
15 |
16 | after_success:
17 | - bash <(curl -s https://codecov.io/bash)
18 |
--------------------------------------------------------------------------------
/vendor/github.com/fatedier/kcp-go/batchconn.go:
--------------------------------------------------------------------------------
1 | package kcp
2 |
3 | import "golang.org/x/net/ipv4"
4 |
5 | const (
6 | batchSize = 16
7 | )
8 |
9 | type batchConn interface {
10 | WriteBatch(ms []ipv4.Message, flags int) (int, error)
11 | ReadBatch(ms []ipv4.Message, flags int) (int, error)
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/github.com/fatedier/kcp-go/donate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/baibaicloud/frp/5578e46a0a83ca34d935dc314018945b91f08697/vendor/github.com/fatedier/kcp-go/donate.png
--------------------------------------------------------------------------------
/vendor/github.com/fatedier/kcp-go/flame.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/baibaicloud/frp/5578e46a0a83ca34d935dc314018945b91f08697/vendor/github.com/fatedier/kcp-go/flame.png
--------------------------------------------------------------------------------
/vendor/github.com/fatedier/kcp-go/frame.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/baibaicloud/frp/5578e46a0a83ca34d935dc314018945b91f08697/vendor/github.com/fatedier/kcp-go/frame.png
--------------------------------------------------------------------------------
/vendor/github.com/fatedier/kcp-go/kcp-go.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/baibaicloud/frp/5578e46a0a83ca34d935dc314018945b91f08697/vendor/github.com/fatedier/kcp-go/kcp-go.png
--------------------------------------------------------------------------------
/vendor/github.com/fatedier/kcp-go/readloop_generic.go:
--------------------------------------------------------------------------------
1 | // +build !linux
2 |
3 | package kcp
4 |
5 | func (s *UDPSession) readLoop() {
6 | s.defaultReadLoop()
7 | }
8 |
9 | func (l *Listener) monitor() {
10 | l.defaultMonitor()
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/fatedier/kcp-go/tx.go:
--------------------------------------------------------------------------------
1 | package kcp
2 |
3 | import (
4 | "sync/atomic"
5 |
6 | "github.com/pkg/errors"
7 | "golang.org/x/net/ipv4"
8 | )
9 |
10 | func (s *UDPSession) defaultTx(txqueue []ipv4.Message) {
11 | nbytes := 0
12 | npkts := 0
13 | for k := range txqueue {
14 | if n, err := s.conn.WriteTo(txqueue[k].Buffers[0], txqueue[k].Addr); err == nil {
15 | nbytes += n
16 | npkts++
17 | xmitBuf.Put(txqueue[k].Buffers[0])
18 | } else {
19 | s.notifyWriteError(errors.WithStack(err))
20 | break
21 | }
22 | }
23 | atomic.AddUint64(&DefaultSnmp.OutPkts, uint64(npkts))
24 | atomic.AddUint64(&DefaultSnmp.OutBytes, uint64(nbytes))
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/fatedier/kcp-go/tx_generic.go:
--------------------------------------------------------------------------------
1 | // +build !linux
2 |
3 | package kcp
4 |
5 | import (
6 | "golang.org/x/net/ipv4"
7 | )
8 |
9 | func (s *UDPSession) tx(txqueue []ipv4.Message) {
10 | s.defaultTx(txqueue)
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/golang/snappy/.gitignore:
--------------------------------------------------------------------------------
1 | cmd/snappytool/snappytool
2 | testdata/bench
3 |
4 | # These explicitly listed benchmark data files are for an obsolete version of
5 | # snappy_test.go.
6 | testdata/alice29.txt
7 | testdata/asyoulik.txt
8 | testdata/fireworks.jpeg
9 | testdata/geo.protodata
10 | testdata/html
11 | testdata/html_x_4
12 | testdata/kppkn.gtb
13 | testdata/lcet10.txt
14 | testdata/paper-100k.pdf
15 | testdata/plrabn12.txt
16 | testdata/urls.10K
17 |
--------------------------------------------------------------------------------
/vendor/github.com/golang/snappy/AUTHORS:
--------------------------------------------------------------------------------
1 | # This is the official list of Snappy-Go authors for copyright purposes.
2 | # This file is distinct from the CONTRIBUTORS files.
3 | # See the latter for an explanation.
4 |
5 | # Names should be added to this file as
6 | # Name or Organization
7 | # The email address is not required for organizations.
8 |
9 | # Please keep the list sorted.
10 |
11 | Damian Gryski
12 | Google Inc.
13 | Jan Mercl <0xjnml@gmail.com>
14 | Rodolfo Carvalho
15 | Sebastien Binet
16 |
--------------------------------------------------------------------------------
/vendor/github.com/golang/snappy/decode_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Snappy-Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !appengine
6 | // +build gc
7 | // +build !noasm
8 |
9 | package snappy
10 |
11 | // decode has the same semantics as in decode_other.go.
12 | //
13 | //go:noescape
14 | func decode(dst, src []byte) int
15 |
--------------------------------------------------------------------------------
/vendor/github.com/golang/snappy/encode_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Snappy-Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !appengine
6 | // +build gc
7 | // +build !noasm
8 |
9 | package snappy
10 |
11 | // emitLiteral has the same semantics as in encode_other.go.
12 | //
13 | //go:noescape
14 | func emitLiteral(dst, lit []byte) int
15 |
16 | // emitCopy has the same semantics as in encode_other.go.
17 | //
18 | //go:noescape
19 | func emitCopy(dst []byte, offset, length int) int
20 |
21 | // extendMatch has the same semantics as in encode_other.go.
22 | //
23 | //go:noescape
24 | func extendMatch(src []byte, i, j int) int
25 |
26 | // encodeBlock has the same semantics as in encode_other.go.
27 | //
28 | //go:noescape
29 | func encodeBlock(dst, src []byte) (d int)
30 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/mux/AUTHORS:
--------------------------------------------------------------------------------
1 | # This is the official list of gorilla/mux authors for copyright purposes.
2 | #
3 | # Please keep the list sorted.
4 |
5 | Google LLC (https://opensource.google.com/)
6 | Kamil Kisielk
7 | Matt Silverlock
8 | Rodrigo Moraes (https://github.com/moraes)
9 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/mux/context.go:
--------------------------------------------------------------------------------
1 | package mux
2 |
3 | import (
4 | "context"
5 | "net/http"
6 | )
7 |
8 | func contextGet(r *http.Request, key interface{}) interface{} {
9 | return r.Context().Value(key)
10 | }
11 |
12 | func contextSet(r *http.Request, key, val interface{}) *http.Request {
13 | if val == nil {
14 | return r
15 | }
16 |
17 | return r.WithContext(context.WithValue(r.Context(), key, val))
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/mux/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/gorilla/mux
2 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/mux/test_helpers.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Gorilla Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package mux
6 |
7 | import "net/http"
8 |
9 | // SetURLVars sets the URL variables for the given request, to be accessed via
10 | // mux.Vars for testing route behaviour. Arguments are not modified, a shallow
11 | // copy is returned.
12 | //
13 | // This API should only be used for testing purposes; it provides a way to
14 | // inject variables into the request context. Alternatively, URL variables
15 | // can be set by making a route that captures the required variables,
16 | // starting a server and sending the request to that server.
17 | func SetURLVars(r *http.Request, val map[string]string) *http.Request {
18 | return setVars(r, val)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/websocket/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 |
24 | .idea/
25 | *.iml
26 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/websocket/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | sudo: false
3 |
4 | matrix:
5 | include:
6 | - go: 1.7.x
7 | - go: 1.8.x
8 | - go: 1.9.x
9 | - go: 1.10.x
10 | - go: 1.11.x
11 | - go: tip
12 | allow_failures:
13 | - go: tip
14 |
15 | script:
16 | - go get -t -v ./...
17 | - diff -u <(echo -n) <(gofmt -d .)
18 | - go vet $(go list ./... | grep -v /vendor/)
19 | - go test -v -race ./...
20 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/websocket/AUTHORS:
--------------------------------------------------------------------------------
1 | # This is the official list of Gorilla WebSocket authors for copyright
2 | # purposes.
3 | #
4 | # Please keep the list sorted.
5 |
6 | Gary Burd
7 | Google LLC (https://opensource.google.com/)
8 | Joachim Bauch
9 |
10 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/websocket/client_clone.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.8
6 |
7 | package websocket
8 |
9 | import "crypto/tls"
10 |
11 | func cloneTLSConfig(cfg *tls.Config) *tls.Config {
12 | if cfg == nil {
13 | return &tls.Config{}
14 | }
15 | return cfg.Clone()
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/websocket/conn_write.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Gorilla WebSocket Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.8
6 |
7 | package websocket
8 |
9 | import "net"
10 |
11 | func (c *Conn) writeBufs(bufs ...[]byte) error {
12 | b := net.Buffers(bufs)
13 | _, err := b.WriteTo(c.conn)
14 | return err
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/websocket/conn_write_legacy.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Gorilla WebSocket Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !go1.8
6 |
7 | package websocket
8 |
9 | func (c *Conn) writeBufs(bufs ...[]byte) error {
10 | for _, buf := range bufs {
11 | if len(buf) > 0 {
12 | if _, err := c.conn.Write(buf); err != nil {
13 | return err
14 | }
15 | }
16 | }
17 | return nil
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/websocket/mask_safe.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. Use of
2 | // this source code is governed by a BSD-style license that can be found in the
3 | // LICENSE file.
4 |
5 | // +build appengine
6 |
7 | package websocket
8 |
9 | func maskBytes(key [4]byte, pos int, b []byte) int {
10 | for i := range b {
11 | b[i] ^= key[pos&3]
12 | pos++
13 | }
14 | return pos & 3
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/websocket/trace.go:
--------------------------------------------------------------------------------
1 | // +build go1.8
2 |
3 | package websocket
4 |
5 | import (
6 | "crypto/tls"
7 | "net/http/httptrace"
8 | )
9 |
10 | func doHandshakeWithTrace(trace *httptrace.ClientTrace, tlsConn *tls.Conn, cfg *tls.Config) error {
11 | if trace.TLSHandshakeStart != nil {
12 | trace.TLSHandshakeStart()
13 | }
14 | err := doHandshake(tlsConn, cfg)
15 | if trace.TLSHandshakeDone != nil {
16 | trace.TLSHandshakeDone(tlsConn.ConnectionState(), err)
17 | }
18 | return err
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/gorilla/websocket/trace_17.go:
--------------------------------------------------------------------------------
1 | // +build !go1.8
2 |
3 | package websocket
4 |
5 | import (
6 | "crypto/tls"
7 | "net/http/httptrace"
8 | )
9 |
10 | func doHandshakeWithTrace(trace *httptrace.ClientTrace, tlsConn *tls.Conn, cfg *tls.Config) error {
11 | return doHandshake(tlsConn, cfg)
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/yamux/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/yamux/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/hashicorp/yamux
2 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/yamux/util.go:
--------------------------------------------------------------------------------
1 | package yamux
2 |
3 | import (
4 | "sync"
5 | "time"
6 | )
7 |
8 | var (
9 | timerPool = &sync.Pool{
10 | New: func() interface{} {
11 | timer := time.NewTimer(time.Hour * 1e6)
12 | timer.Stop()
13 | return timer
14 | },
15 | }
16 | )
17 |
18 | // asyncSendErr is used to try an async send of an error
19 | func asyncSendErr(ch chan error, err error) {
20 | if ch == nil {
21 | return
22 | }
23 | select {
24 | case ch <- err:
25 | default:
26 | }
27 | }
28 |
29 | // asyncNotify is used to signal a waiting goroutine
30 | func asyncNotify(ch chan struct{}) {
31 | select {
32 | case ch <- struct{}{}:
33 | default:
34 | }
35 | }
36 |
37 | // min computes the minimum of two values
38 | func min(a, b uint32) uint32 {
39 | if a < b {
40 | return a
41 | }
42 | return b
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/github.com/inconshreveable/mousetrap/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2014 Alan Shreve
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/vendor/github.com/inconshreveable/mousetrap/README.md:
--------------------------------------------------------------------------------
1 | # mousetrap
2 |
3 | mousetrap is a tiny library that answers a single question.
4 |
5 | On a Windows machine, was the process invoked by someone double clicking on
6 | the executable file while browsing in explorer?
7 |
8 | ### Motivation
9 |
10 | Windows developers unfamiliar with command line tools will often "double-click"
11 | the executable for a tool. Because most CLI tools print the help and then exit
12 | when invoked without arguments, this is often very frustrating for those users.
13 |
14 | mousetrap provides a way to detect these invocations so that you can provide
15 | more helpful behavior and instructions on how to run the CLI tool. To see what
16 | this looks like, both from an organizational and a technical perspective, see
17 | https://inconshreveable.com/09-09-2014/sweat-the-small-stuff/
18 |
19 | ### The interface
20 |
21 | The library exposes a single interface:
22 |
23 | func StartedByExplorer() (bool)
24 |
--------------------------------------------------------------------------------
/vendor/github.com/inconshreveable/mousetrap/trap_others.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package mousetrap
4 |
5 | // StartedByExplorer returns true if the program was invoked by the user
6 | // double-clicking on the executable from explorer.exe
7 | //
8 | // It is conservative and returns false if any of the internal calls fail.
9 | // It does not guarantee that the program was run from a terminal. It only can tell you
10 | // whether it was launched from explorer.exe
11 | //
12 | // On non-Windows platforms, it always returns false.
13 | func StartedByExplorer() bool {
14 | return false
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/klauspost/cpuid/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 | *.prof
25 |
--------------------------------------------------------------------------------
/vendor/github.com/klauspost/cpuid/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | sudo: false
4 |
5 | os:
6 | - linux
7 | - osx
8 | go:
9 | - 1.8.x
10 | - 1.9.x
11 | - 1.10.x
12 | - master
13 |
14 | script:
15 | - go vet ./...
16 | - go test -v ./...
17 | - go test -race ./...
18 | - diff <(gofmt -d .) <("")
19 |
20 | matrix:
21 | allow_failures:
22 | - go: 'master'
23 | fast_finish: true
24 |
--------------------------------------------------------------------------------
/vendor/github.com/klauspost/cpuid/detect_intel.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
2 |
3 | // +build 386,!gccgo amd64,!gccgo
4 |
5 | package cpuid
6 |
7 | func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32)
8 | func asmCpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32)
9 | func asmXgetbv(index uint32) (eax, edx uint32)
10 | func asmRdtscpAsm() (eax, ebx, ecx, edx uint32)
11 |
12 | func initCPU() {
13 | cpuid = asmCpuid
14 | cpuidex = asmCpuidex
15 | xgetbv = asmXgetbv
16 | rdtscpAsm = asmRdtscpAsm
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/klauspost/cpuid/detect_ref.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
2 |
3 | // +build !amd64,!386 gccgo
4 |
5 | package cpuid
6 |
7 | func initCPU() {
8 | cpuid = func(op uint32) (eax, ebx, ecx, edx uint32) {
9 | return 0, 0, 0, 0
10 | }
11 |
12 | cpuidex = func(op, op2 uint32) (eax, ebx, ecx, edx uint32) {
13 | return 0, 0, 0, 0
14 | }
15 |
16 | xgetbv = func(index uint32) (eax, edx uint32) {
17 | return 0, 0
18 | }
19 |
20 | rdtscpAsm = func() (eax, ebx, ecx, edx uint32) {
21 | return 0, 0, 0, 0
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/github.com/klauspost/cpuid/generate.go:
--------------------------------------------------------------------------------
1 | package cpuid
2 |
3 | //go:generate go run private-gen.go
4 | //go:generate gofmt -w ./private
5 |
--------------------------------------------------------------------------------
/vendor/github.com/klauspost/reedsolomon/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 | *.prof
25 |
26 | .idea
--------------------------------------------------------------------------------
/vendor/github.com/klauspost/reedsolomon/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | sudo: false
4 |
5 | os:
6 | - linux
7 | - osx
8 |
9 | go:
10 | - 1.9.x
11 | - 1.10.x
12 | - 1.11.x
13 | - 1.12.x
14 | - master
15 |
16 | install:
17 | - go get ./...
18 |
19 | script:
20 | - go vet ./...
21 | - go test -v -cpu=1,2,4 .
22 | - go test -v -cpu=1,2,4 -short -race .
23 | - go test -tags=noasm -v -cpu=1,2,4 -short -race .
24 | - go build examples/simple-decoder.go
25 | - go build examples/simple-encoder.go
26 | - go build examples/stream-decoder.go
27 | - go build examples/stream-encoder.go
28 | - diff <(gofmt -d .) <("")
29 |
30 | matrix:
31 | allow_failures:
32 | - go: 'master'
33 | fast_finish: true
34 |
--------------------------------------------------------------------------------
/vendor/github.com/klauspost/reedsolomon/appveyor.yml:
--------------------------------------------------------------------------------
1 | os: Visual Studio 2015
2 |
3 | platform: x64
4 |
5 | clone_folder: c:\gopath\src\github.com\klauspost\reedsolomon
6 |
7 | # environment variables
8 | environment:
9 | GOPATH: c:\gopath
10 |
11 | install:
12 | - echo %PATH%
13 | - echo %GOPATH%
14 | - go version
15 | - go env
16 | - go get -d ./...
17 |
18 | build_script:
19 | - go test -v -cpu=2 ./...
20 | - go test -cpu=1,2,4 -short -race ./...
21 |
--------------------------------------------------------------------------------
/vendor/github.com/klauspost/reedsolomon/galois_noasm.go:
--------------------------------------------------------------------------------
1 | //+build !amd64 noasm appengine gccgo
2 | //+build !arm64 noasm appengine gccgo
3 | //+build !ppc64le noasm appengine gccgo
4 |
5 | // Copyright 2015, Klaus Post, see LICENSE for details.
6 |
7 | package reedsolomon
8 |
9 | func galMulSlice(c byte, in, out []byte, o *options) {
10 | mt := mulTable[c][:256]
11 | out = out[:len(in)]
12 | for n, input := range in {
13 | out[n] = mt[input]
14 | }
15 | }
16 |
17 | func galMulSliceXor(c byte, in, out []byte, o *options) {
18 | mt := mulTable[c][:256]
19 | out = out[:len(in)]
20 | for n, input := range in {
21 | out[n] ^= mt[input]
22 | }
23 | }
24 |
25 | // slice galois add
26 | func sliceXor(in, out []byte, sse2 bool) {
27 | for n, input := range in {
28 | out[n] ^= input
29 | }
30 | }
31 |
32 | func (r reedSolomon) codeSomeShardsAvx512(matrixRows, inputs, outputs [][]byte, outputCount, byteCount int) {
33 | panic("unreachable")
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/github.com/pires/go-proxyproto/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | .idea
8 | bin
9 | pkg
10 |
--------------------------------------------------------------------------------
/vendor/github.com/pires/go-proxyproto/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | sudo: false
3 | go:
4 | - 1.11
5 | install:
6 | - go get golang.org/x/tools/cmd/cover
7 | - go get github.com/mattn/goveralls
8 | script:
9 | - go fmt
10 | - go vet
11 | - go test -v -covermode=count -coverprofile=coverage.out
12 | - $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN
13 | env:
14 | global:
15 | secure: NRDefpPiVrhkRetDbJ1bek+7+Ojwh9dUSAAP4KBw5cqQbEDMUo/fgTHnTBywe4p7zaJ2IX7B2gmQk8zsAHu8D74A8baYzZBOJzpgAGx6GzTSMtLKTX62TKrKGvslru0/e9V/OaOGRuy1ETteuOb/b23rtBqQ7+N0JfC5+9wjH1mmYd6rbeU8bGMzyvXoCYorgf7VNV1KQM+4355pSDR5cvbV1lHfSut6Pw1dcjOahxheXi1YVhohdkQOwvBlSifVritJgwWcUtrb4xW97pZ8TWnHi5TlqSnxtRSKiPq5aojgsAt9ETnouPBhs0cToyteN3xi5N0SWvn5RRs7mPFFwkpvspghWNtqU4/uPRR0NrbcEiYcEFghicoq7pTthP0iP/KsBb7F1mH2YC79uuNMnOgoByKxLjD/TOybhSvyTRt2TldHZwePxcukXwwL7LHALhojsN299KQgIIiMdn9+oXESIzJXwI10ZDEfLPfhX+LHBQylobNqnnFM/tzFyFDGAqDVEn+yc4GVEu+FjpJ/kqDpTDpnUZ7Ui6KJX/VJfGMgwOrMDegOYlm5Cg6xPug0zb08taciTcWByDWOzZfmHcxOt3JyJXFTh49oFK70Xn+C7YNQt7VxfdsjCJ84HEDxxeY/Rp3HowTzjvqjsVVncKtJm0o7epOnY58RKP/GFwg=
16 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/errors/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 | *.prof
25 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/errors/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go_import_path: github.com/pkg/errors
3 | go:
4 | - 1.4.3
5 | - 1.5.4
6 | - 1.6.2
7 | - 1.7.1
8 | - tip
9 |
10 | script:
11 | - go test -v ./...
12 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/errors/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: build-{build}.{branch}
2 |
3 | clone_folder: C:\gopath\src\github.com\pkg\errors
4 | shallow_clone: true # for startup speed
5 |
6 | environment:
7 | GOPATH: C:\gopath
8 |
9 | platform:
10 | - x64
11 |
12 | # http://www.appveyor.com/docs/installed-software
13 | install:
14 | # some helpful output for debugging builds
15 | - go version
16 | - go env
17 | # pre-installed MinGW at C:\MinGW is 32bit only
18 | # but MSYS2 at C:\msys64 has mingw64
19 | - set PATH=C:\msys64\mingw64\bin;%PATH%
20 | - gcc --version
21 | - g++ --version
22 |
23 | build_script:
24 | - go install -v ./...
25 |
26 | test_script:
27 | - set PATH=C:\gopath\bin;%PATH%
28 | - go test -v ./...
29 |
30 | #artifacts:
31 | # - path: '%GOPATH%\bin\*.exe'
32 | deploy: off
33 |
--------------------------------------------------------------------------------
/vendor/github.com/rodaine/table/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: go
3 | go: 1.8
4 |
5 | branches:
6 | only:
7 | - master
8 |
9 | install: go get -t ./... github.com/golang/lint/golint
10 | script: make lint test
11 |
--------------------------------------------------------------------------------
/vendor/github.com/rodaine/table/makefile:
--------------------------------------------------------------------------------
1 | .PHONY: lint
2 | lint:
3 | gofmt -d -s .
4 | golint -set_exit_status ./...
5 | go tool vet -all -shadow -shadowstrict .
6 |
7 | .PHONY: test
8 | test:
9 | go test -v -cover -race ./...
10 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | # Vim files https://github.com/github/gitignore/blob/master/Global/Vim.gitignore
23 | # swap
24 | [._]*.s[a-w][a-z]
25 | [._]s[a-w][a-z]
26 | # session
27 | Session.vim
28 | # temporary
29 | .netrwhist
30 | *~
31 | # auto-generated tag files
32 | tags
33 |
34 | *.exe
35 |
36 | cobra.test
37 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/.mailmap:
--------------------------------------------------------------------------------
1 | Steve Francia
2 | Bjørn Erik Pedersen
3 | Fabiano Franz
4 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | matrix:
4 | include:
5 | - go: 1.9.4
6 | - go: 1.10.0
7 | - go: tip
8 | allow_failures:
9 | - go: tip
10 |
11 | before_install:
12 | - mkdir -p bin
13 | - curl -Lso bin/shellcheck https://github.com/caarlos0/shellcheck-docker/releases/download/v0.4.3/shellcheck
14 | - chmod +x bin/shellcheck
15 | script:
16 | - PATH=$PATH:$PWD/bin go test -v ./...
17 | - go build
18 | - diff -u <(echo -n) <(gofmt -d -s .)
19 | - if [ -z $NOVET ]; then
20 | diff -u <(echo -n) <(go tool vet . 2>&1 | grep -vE 'ExampleCommand|bash_completions.*Fprint');
21 | fi
22 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/command_notwin.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package cobra
4 |
5 | var preExecHookFn func(*Command)
6 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/cobra/command_win.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package cobra
4 |
5 | import (
6 | "os"
7 | "time"
8 |
9 | "github.com/inconshreveable/mousetrap"
10 | )
11 |
12 | var preExecHookFn = preExecHook
13 |
14 | func preExecHook(c *Command) {
15 | if MousetrapHelpText != "" && mousetrap.StartedByExplorer() {
16 | c.Print(MousetrapHelpText)
17 | time.Sleep(5 * time.Second)
18 | os.Exit(1)
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/pflag/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/*
2 |
3 |
--------------------------------------------------------------------------------
/vendor/github.com/spf13/pflag/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 |
3 | language: go
4 |
5 | go:
6 | - 1.7.3
7 | - 1.8.1
8 | - tip
9 |
10 | matrix:
11 | allow_failures:
12 | - go: tip
13 |
14 | install:
15 | - go get github.com/golang/lint/golint
16 | - export PATH=$GOPATH/bin:$PATH
17 | - go install ./...
18 |
19 | script:
20 | - verify/all.sh -v
21 | - go test ./...
22 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl:
--------------------------------------------------------------------------------
1 | {{.CommentFormat}}
2 | func {{.DocInfo.Name}}f(t TestingT, {{.ParamsFormat}}) bool {
3 | if h, ok := t.(tHelper); ok { h.Helper() }
4 | return {{.DocInfo.Name}}(t, {{.ForwardedParamsFormat}})
5 | }
6 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl:
--------------------------------------------------------------------------------
1 | {{.CommentWithoutT "a"}}
2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool {
3 | if h, ok := a.t.(tHelper); ok { h.Helper() }
4 | return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}})
5 | }
6 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/assert/errors.go:
--------------------------------------------------------------------------------
1 | package assert
2 |
3 | import (
4 | "errors"
5 | )
6 |
7 | // AnError is an error instance useful for testing. If the code does not care
8 | // about error specifics, and only needs to return the error for example, this
9 | // error should be used to make the test code more readable.
10 | var AnError = errors.New("assert.AnError general error for testing")
11 |
--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/assert/forward_assertions.go:
--------------------------------------------------------------------------------
1 | package assert
2 |
3 | // Assertions provides assertion methods around the
4 | // TestingT interface.
5 | type Assertions struct {
6 | t TestingT
7 | }
8 |
9 | // New makes a new Assertions object for the specified TestingT.
10 | func New(t TestingT) *Assertions {
11 | return &Assertions{
12 | t: t,
13 | }
14 | }
15 |
16 | //go:generate go run ../_codegen/main.go -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs
17 |
--------------------------------------------------------------------------------
/vendor/github.com/templexxx/cpufeat/.gitignore:
--------------------------------------------------------------------------------
1 | # Binaries for programs and plugins
2 | *.exe
3 | *.dll
4 | *.so
5 | *.dylib
6 |
7 | # Test binary, build with `go test -c`
8 | *.test
9 |
10 | # Output of the go coverage tool, specifically when used with LiteIDE
11 | *.out
12 |
13 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
14 | .glide/
15 |
--------------------------------------------------------------------------------
/vendor/github.com/templexxx/cpufeat/cpu.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package cpu implements processor feature detection
6 | // used by the Go standard libary.
7 | package cpufeat
8 |
9 | var X86 x86
10 |
11 | // The booleans in x86 contain the correspondingly named cpuid feature bit.
12 | // HasAVX and HasAVX2 are only set if the OS does support XMM and YMM registers
13 | // in addition to the cpuid feature bit being set.
14 | // The struct is padded to avoid false sharing.
15 | type x86 struct {
16 | _ [CacheLineSize]byte
17 | HasAES bool
18 | HasAVX bool
19 | HasAVX2 bool
20 | HasBMI1 bool
21 | HasBMI2 bool
22 | HasERMS bool
23 | HasOSXSAVE bool
24 | HasPCLMULQDQ bool
25 | HasPOPCNT bool
26 | HasSSE2 bool
27 | HasSSE3 bool
28 | HasSSSE3 bool
29 | HasSSE41 bool
30 | HasSSE42 bool
31 | _ [CacheLineSize]byte
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/github.com/templexxx/cpufeat/cpu_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpufeat
6 |
7 | const CacheLineSize = 32
8 |
--------------------------------------------------------------------------------
/vendor/github.com/templexxx/cpufeat/cpu_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpufeat
6 |
7 | const CacheLineSize = 32
8 |
--------------------------------------------------------------------------------
/vendor/github.com/templexxx/cpufeat/cpu_mips.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpufeat
6 |
7 | const CacheLineSize = 32
8 |
--------------------------------------------------------------------------------
/vendor/github.com/templexxx/cpufeat/cpu_mips64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpufeat
6 |
7 | const CacheLineSize = 32
8 |
--------------------------------------------------------------------------------
/vendor/github.com/templexxx/cpufeat/cpu_mips64le.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpufeat
6 |
7 | const CacheLineSize = 32
8 |
--------------------------------------------------------------------------------
/vendor/github.com/templexxx/cpufeat/cpu_mipsle.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpufeat
6 |
7 | const CacheLineSize = 32
8 |
--------------------------------------------------------------------------------
/vendor/github.com/templexxx/cpufeat/cpu_ppc64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpufeat
6 |
7 | const CacheLineSize = 128
8 |
--------------------------------------------------------------------------------
/vendor/github.com/templexxx/cpufeat/cpu_ppc64le.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpufeat
6 |
7 | const CacheLineSize = 128
8 |
--------------------------------------------------------------------------------
/vendor/github.com/templexxx/cpufeat/cpu_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpufeat
6 |
7 | const CacheLineSize = 256
8 |
--------------------------------------------------------------------------------
/vendor/github.com/templexxx/cpufeat/cpu_x86.s:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386 amd64 amd64p32
6 |
7 | #include "textflag.h"
8 |
9 | // func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
10 | TEXT ·cpuid(SB), NOSPLIT, $0-24
11 | MOVL eaxArg+0(FP), AX
12 | MOVL ecxArg+4(FP), CX
13 | CPUID
14 | MOVL AX, eax+8(FP)
15 | MOVL BX, ebx+12(FP)
16 | MOVL CX, ecx+16(FP)
17 | MOVL DX, edx+20(FP)
18 | RET
19 |
20 | // func xgetbv() (eax, edx uint32)
21 | TEXT ·xgetbv(SB),NOSPLIT,$0-8
22 | #ifdef GOOS_nacl
23 | // nacl does not support XGETBV.
24 | MOVL $0, eax+0(FP)
25 | MOVL $0, edx+4(FP)
26 | #else
27 | MOVL $0, CX
28 | WORD $0x010f; BYTE $0xd0 //XGETBV
29 | MOVL AX, eax+0(FP)
30 | MOVL DX, edx+4(FP)
31 | #endif
32 | RET
33 |
--------------------------------------------------------------------------------
/vendor/github.com/templexxx/xor/.gitattributes:
--------------------------------------------------------------------------------
1 | *.s linguist-language=go
2 |
--------------------------------------------------------------------------------
/vendor/github.com/templexxx/xor/.gitignore:
--------------------------------------------------------------------------------
1 | # Binaries for programs and plugins
2 | *.exe
3 | *.dll
4 | *.so
5 | *.dylib
6 |
7 | # Test binary, build with `go test -c`
8 | *.test
9 |
10 | # Output of the go coverage tool, specifically when used with LiteIDE
11 | *.out
12 |
13 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
14 | .glide/
15 | /backup/
16 | /backup2/
17 | /.idea
18 | /backup3/
19 |
--------------------------------------------------------------------------------
/vendor/github.com/templexxx/xor/xor_other.go:
--------------------------------------------------------------------------------
1 | // +build !amd64 noasm
2 |
3 | package xor
4 |
5 | func xorBytes(dst, src0, src1 []byte, size int) {
6 | bytesNoSIMD(dst, src0, src1, size)
7 | }
8 |
9 | func xorMatrix(dst []byte, src [][]byte) {
10 | matrixNoSIMD(dst, src)
11 | }
12 |
13 | func xorSrc0(dst, src0, src1 []byte) {
14 | bytesNoSIMD(dst, src0, src1, len(src0))
15 | }
16 |
17 | func xorSrc1(dst, src0, src1 []byte) {
18 | bytesNoSIMD(dst, src0, src1, len(src1))
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/tjfoc/gmsm/sm4/key.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN SM4 KEY-----
2 | MTIzNDU2Nzg5MGFiY2RlZg==
3 | -----END SM4 KEY-----
4 |
--------------------------------------------------------------------------------
/vendor/github.com/vaughan0/go-ini/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013 Vaughan Newton
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
4 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
5 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
6 | persons to whom the Software is furnished to do so, subject to the following conditions:
7 |
8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
9 | Software.
10 |
11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
12 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
13 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
14 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15 |
--------------------------------------------------------------------------------
/vendor/github.com/vaughan0/go-ini/test.ini:
--------------------------------------------------------------------------------
1 | [default]
2 | stuff = things
3 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at https://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at https://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,!appengine,!gccgo
6 |
7 | package salsa
8 |
9 | // This function is implemented in salsa2020_amd64.s.
10 |
11 | //go:noescape
12 |
13 | func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte)
14 |
15 | // XORKeyStream crypts bytes from in to out using the given key and counters.
16 | // In and out must overlap entirely or not at all. Counter
17 | // contains the raw salsa20 counter bytes (both nonce and block counter).
18 | func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) {
19 | if len(in) == 0 {
20 | return
21 | }
22 | _ = out[len(in)-1]
23 | salsa2020XORKeyStream(&out[0], &in[0], uint64(len(in)), &counter[0], &key[0])
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/bpf/setter.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package bpf
6 |
7 | // A Setter is a type which can attach a compiled BPF filter to itself.
8 | type Setter interface {
9 | SetBPF(filter []RawInstruction) error
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/context/go19.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.9
6 |
7 | package context
8 |
9 | import "context" // standard library's context, as of Go 1.7
10 |
11 | // A Context carries a deadline, a cancelation signal, and other values across
12 | // API boundaries.
13 | //
14 | // Context's methods may be called by multiple goroutines simultaneously.
15 | type Context = context.Context
16 |
17 | // A CancelFunc tells an operation to abandon its work.
18 | // A CancelFunc does not wait for the work to stop.
19 | // After the first call, subsequent calls to a CancelFunc do nothing.
20 | type CancelFunc = context.CancelFunc
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/cmsghdr.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package socket
8 |
9 | func (h *cmsghdr) len() int { return int(h.Len) }
10 | func (h *cmsghdr) lvl() int { return int(h.Level) }
11 | func (h *cmsghdr) typ() int { return int(h.Type) }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd netbsd openbsd
6 |
7 | package socket
8 |
9 | func (h *cmsghdr) set(l, lvl, typ int) {
10 | h.Len = uint32(l)
11 | h.Level = int32(lvl)
12 | h.Type = int32(typ)
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm mips mipsle 386
6 | // +build linux
7 |
8 | package socket
9 |
10 | func (h *cmsghdr) set(l, lvl, typ int) {
11 | h.Len = uint32(l)
12 | h.Level = int32(lvl)
13 | h.Type = int32(typ)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
6 | // +build linux
7 |
8 | package socket
9 |
10 | func (h *cmsghdr) set(l, lvl, typ int) {
11 | h.Len = uint64(l)
12 | h.Level = int32(lvl)
13 | h.Type = int32(typ)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64
6 | // +build solaris
7 |
8 | package socket
9 |
10 | func (h *cmsghdr) set(l, lvl, typ int) {
11 | h.Len = uint32(l)
12 | h.Level = int32(lvl)
13 | h.Type = int32(typ)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
6 |
7 | package socket
8 |
9 | type cmsghdr struct{}
10 |
11 | const sizeofCmsghdr = 0
12 |
13 | func (h *cmsghdr) len() int { return 0 }
14 | func (h *cmsghdr) lvl() int { return 0 }
15 | func (h *cmsghdr) typ() int { return 0 }
16 |
17 | func (h *cmsghdr) set(l, lvl, typ int) {}
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/empty.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin,go1.12
6 |
7 | // This exists solely so we can linkname in symbols from syscall.
8 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/error_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package socket
8 |
9 | import "syscall"
10 |
11 | var (
12 | errEAGAIN error = syscall.EAGAIN
13 | errEINVAL error = syscall.EINVAL
14 | errENOENT error = syscall.ENOENT
15 | )
16 |
17 | // errnoErr returns common boxed Errno values, to prevent allocations
18 | // at runtime.
19 | func errnoErr(errno syscall.Errno) error {
20 | switch errno {
21 | case 0:
22 | return nil
23 | case syscall.EAGAIN:
24 | return errEAGAIN
25 | case syscall.EINVAL:
26 | return errEINVAL
27 | case syscall.ENOENT:
28 | return errENOENT
29 | }
30 | return errno
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/error_windows.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | import "syscall"
8 |
9 | var (
10 | errERROR_IO_PENDING error = syscall.ERROR_IO_PENDING
11 | errEINVAL error = syscall.EINVAL
12 | )
13 |
14 | // errnoErr returns common boxed Errno values, to prevent allocations
15 | // at runtime.
16 | func errnoErr(errno syscall.Errno) error {
17 | switch errno {
18 | case 0:
19 | return nil
20 | case syscall.ERROR_IO_PENDING:
21 | return errERROR_IO_PENDING
22 | case syscall.EINVAL:
23 | return errEINVAL
24 | }
25 | return errno
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/iovec_32bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm mips mipsle 386
6 | // +build darwin dragonfly freebsd linux netbsd openbsd
7 |
8 | package socket
9 |
10 | import "unsafe"
11 |
12 | func (v *iovec) set(b []byte) {
13 | l := len(b)
14 | if l == 0 {
15 | return
16 | }
17 | v.Base = (*byte)(unsafe.Pointer(&b[0]))
18 | v.Len = uint32(l)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/iovec_64bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd
7 |
8 | package socket
9 |
10 | import "unsafe"
11 |
12 | func (v *iovec) set(b []byte) {
13 | l := len(b)
14 | if l == 0 {
15 | return
16 | }
17 | v.Base = (*byte)(unsafe.Pointer(&b[0]))
18 | v.Len = uint64(l)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64
6 | // +build solaris
7 |
8 | package socket
9 |
10 | import "unsafe"
11 |
12 | func (v *iovec) set(b []byte) {
13 | l := len(b)
14 | if l == 0 {
15 | return
16 | }
17 | v.Base = (*int8)(unsafe.Pointer(&b[0]))
18 | v.Len = uint64(l)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/iovec_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
6 |
7 | package socket
8 |
9 | type iovec struct{}
10 |
11 | func (v *iovec) set(b []byte) {}
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !aix,!linux,!netbsd
6 |
7 | package socket
8 |
9 | import "net"
10 |
11 | type mmsghdr struct{}
12 |
13 | type mmsghdrs []mmsghdr
14 |
15 | func (hs mmsghdrs) pack(ms []Message, parseFn func([]byte, string) (net.Addr, error), marshalFn func(net.Addr) []byte) error {
16 | return nil
17 | }
18 |
19 | func (hs mmsghdrs) unpack(ms []Message, parseFn func([]byte, string) (net.Addr, error), hint string) error {
20 | return nil
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd netbsd openbsd
6 |
7 | package socket
8 |
9 | import "unsafe"
10 |
11 | func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {
12 | for i := range vs {
13 | vs[i].set(bs[i])
14 | }
15 | h.setIov(vs)
16 | if len(oob) > 0 {
17 | h.Control = (*byte)(unsafe.Pointer(&oob[0]))
18 | h.Controllen = uint32(len(oob))
19 | }
20 | if sa != nil {
21 | h.Name = (*byte)(unsafe.Pointer(&sa[0]))
22 | h.Namelen = uint32(len(sa))
23 | }
24 | }
25 |
26 | func (h *msghdr) name() []byte {
27 | if h.Name != nil && h.Namelen > 0 {
28 | return (*[sizeofSockaddrInet6]byte)(unsafe.Pointer(h.Name))[:h.Namelen]
29 | }
30 | return nil
31 | }
32 |
33 | func (h *msghdr) controllen() int {
34 | return int(h.Controllen)
35 | }
36 |
37 | func (h *msghdr) flags() int {
38 | return int(h.Flags)
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd netbsd
6 |
7 | package socket
8 |
9 | func (h *msghdr) setIov(vs []iovec) {
10 | l := len(vs)
11 | if l == 0 {
12 | return
13 | }
14 | h.Iov = &vs[0]
15 | h.Iovlen = int32(l)
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/msghdr_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | import "unsafe"
8 |
9 | func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {
10 | for i := range vs {
11 | vs[i].set(bs[i])
12 | }
13 | h.setIov(vs)
14 | if len(oob) > 0 {
15 | h.setControl(oob)
16 | }
17 | if sa != nil {
18 | h.Name = (*byte)(unsafe.Pointer(&sa[0]))
19 | h.Namelen = uint32(len(sa))
20 | }
21 | }
22 |
23 | func (h *msghdr) name() []byte {
24 | if h.Name != nil && h.Namelen > 0 {
25 | return (*[sizeofSockaddrInet6]byte)(unsafe.Pointer(h.Name))[:h.Namelen]
26 | }
27 | return nil
28 | }
29 |
30 | func (h *msghdr) controllen() int {
31 | return int(h.Controllen)
32 | }
33 |
34 | func (h *msghdr) flags() int {
35 | return int(h.Flags)
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm mips mipsle 386
6 | // +build linux
7 |
8 | package socket
9 |
10 | import "unsafe"
11 |
12 | func (h *msghdr) setIov(vs []iovec) {
13 | l := len(vs)
14 | if l == 0 {
15 | return
16 | }
17 | h.Iov = &vs[0]
18 | h.Iovlen = uint32(l)
19 | }
20 |
21 | func (h *msghdr) setControl(b []byte) {
22 | h.Control = (*byte)(unsafe.Pointer(&b[0]))
23 | h.Controllen = uint32(len(b))
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
6 | // +build linux
7 |
8 | package socket
9 |
10 | import "unsafe"
11 |
12 | func (h *msghdr) setIov(vs []iovec) {
13 | l := len(vs)
14 | if l == 0 {
15 | return
16 | }
17 | h.Iov = &vs[0]
18 | h.Iovlen = uint64(l)
19 | }
20 |
21 | func (h *msghdr) setControl(b []byte) {
22 | h.Control = (*byte)(unsafe.Pointer(&b[0]))
23 | h.Controllen = uint64(len(b))
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | func (h *msghdr) setIov(vs []iovec) {
8 | l := len(vs)
9 | if l == 0 {
10 | return
11 | }
12 | h.Iov = &vs[0]
13 | h.Iovlen = uint32(l)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64
6 | // +build solaris
7 |
8 | package socket
9 |
10 | import "unsafe"
11 |
12 | func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {
13 | for i := range vs {
14 | vs[i].set(bs[i])
15 | }
16 | if len(vs) > 0 {
17 | h.Iov = &vs[0]
18 | h.Iovlen = int32(len(vs))
19 | }
20 | if len(oob) > 0 {
21 | h.Accrights = (*int8)(unsafe.Pointer(&oob[0]))
22 | h.Accrightslen = int32(len(oob))
23 | }
24 | if sa != nil {
25 | h.Name = (*byte)(unsafe.Pointer(&sa[0]))
26 | h.Namelen = uint32(len(sa))
27 | }
28 | }
29 |
30 | func (h *msghdr) controllen() int {
31 | return int(h.Accrightslen)
32 | }
33 |
34 | func (h *msghdr) flags() int {
35 | return int(NativeEndian.Uint32(h.Pad_cgo_2[:]))
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/msghdr_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
6 |
7 | package socket
8 |
9 | type msghdr struct{}
10 |
11 | func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {}
12 | func (h *msghdr) name() []byte { return nil }
13 | func (h *msghdr) controllen() int { return 0 }
14 | func (h *msghdr) flags() int { return 0 }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !linux
6 |
7 | package socket
8 |
9 | func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) {
10 | return 0, errNotImplemented
11 | }
12 |
13 | func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) {
14 | return 0, errNotImplemented
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
6 |
7 | package socket
8 |
9 | func (c *Conn) recvMsg(m *Message, flags int) error {
10 | return errNotImplemented
11 | }
12 |
13 | func (c *Conn) sendMsg(m *Message, flags int) error {
14 | return errNotImplemented
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | import (
8 | "encoding/binary"
9 | "unsafe"
10 | )
11 |
12 | var (
13 | // NativeEndian is the machine native endian implementation of
14 | // ByteOrder.
15 | NativeEndian binary.ByteOrder
16 |
17 | kernelAlign int
18 | )
19 |
20 | func init() {
21 | i := uint32(1)
22 | b := (*[4]byte)(unsafe.Pointer(&i))
23 | if b[0] == 1 {
24 | NativeEndian = binary.LittleEndian
25 | } else {
26 | NativeEndian = binary.BigEndian
27 | }
28 | kernelAlign = probeProtocolStack()
29 | }
30 |
31 | func roundup(l int) int {
32 | return (l + kernelAlign - 1) &^ (kernelAlign - 1)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_bsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd openbsd
6 |
7 | package socket
8 |
9 | func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
10 | return 0, errNotImplemented
11 | }
12 |
13 | func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
14 | return 0, errNotImplemented
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_bsdvar.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix freebsd netbsd openbsd
6 |
7 | package socket
8 |
9 | import (
10 | "runtime"
11 | "unsafe"
12 | )
13 |
14 | func probeProtocolStack() int {
15 | if (runtime.GOOS == "netbsd" || runtime.GOOS == "openbsd") && runtime.GOARCH == "arm" {
16 | return 8
17 | }
18 | if runtime.GOOS == "aix" {
19 | return 1
20 | }
21 | var p uintptr
22 | return int(unsafe.Sizeof(p))
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_const_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package socket
8 |
9 | import "golang.org/x/sys/unix"
10 |
11 | const (
12 | sysAF_UNSPEC = unix.AF_UNSPEC
13 | sysAF_INET = unix.AF_INET
14 | sysAF_INET6 = unix.AF_INET6
15 |
16 | sysSOCK_RAW = unix.SOCK_RAW
17 | )
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | func probeProtocolStack() int { return 4 }
8 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_dragonfly.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | func probeProtocolStack() int { return 4 }
8 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,!s390x,!386
6 |
7 | package socket
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func probeProtocolStack() int {
15 | var p uintptr
16 | return int(unsafe.Sizeof(p))
17 | }
18 |
19 | func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
20 | n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
21 | return int(n), errnoErr(errno)
22 | }
23 |
24 | func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
25 | n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
26 | return int(n), errnoErr(errno)
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | #include "textflag.h"
6 |
7 | TEXT ·socketcall(SB),NOSPLIT,$0-36
8 | JMP syscall·socketcall(SB)
9 |
10 | TEXT ·rawsocketcall(SB),NOSPLIT,$0-36
11 | JMP syscall·rawsocketcall(SB)
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0x12b
9 | sysSENDMMSG = 0x133
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0x16d
9 | sysSENDMMSG = 0x176
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0xf3
9 | sysSENDMMSG = 0x10d
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_mips.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0x10ef
9 | sysSENDMMSG = 0x10f7
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0x14ae
9 | sysSENDMMSG = 0x14b6
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0x14ae
9 | sysSENDMMSG = 0x14b6
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0x10ef
9 | sysSENDMMSG = 0x10f7
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0x157
9 | sysSENDMMSG = 0x15d
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0x157
9 | sysSENDMMSG = 0x15d
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_riscv64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build riscv64
6 |
7 | package socket
8 |
9 | const (
10 | sysRECVMMSG = 0xf3
11 | sysSENDMMSG = 0x10d
12 | )
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | #include "textflag.h"
6 |
7 | TEXT ·socketcall(SB),NOSPLIT,$0-72
8 | JMP syscall·socketcall(SB)
9 |
10 | TEXT ·rawsocketcall(SB),NOSPLIT,$0-72
11 | JMP syscall·rawsocketcall(SB)
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_netbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | import (
8 | "syscall"
9 | "unsafe"
10 | )
11 |
12 | const (
13 | sysRECVMMSG = 0x1db
14 | sysSENDMMSG = 0x1dc
15 | )
16 |
17 | func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
18 | n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
19 | return int(n), errnoErr(errno)
20 | }
21 |
22 | func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
23 | n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
24 | return int(n), errnoErr(errno)
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_solaris_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | #include "textflag.h"
6 |
7 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88
8 | JMP syscall·sysvicall6(SB)
9 |
10 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
11 | JMP syscall·rawSysvicall6(SB)
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_darwin.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen int32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type cmsghdr struct {
22 | Len uint32
23 | Level int32
24 | Type int32
25 | }
26 |
27 | type sockaddrInet struct {
28 | Len uint8
29 | Family uint8
30 | Port uint16
31 | Addr [4]byte /* in_addr */
32 | Zero [8]int8
33 | }
34 |
35 | type sockaddrInet6 struct {
36 | Len uint8
37 | Family uint8
38 | Port uint16
39 | Flowinfo uint32
40 | Addr [16]byte /* in6_addr */
41 | Scope_id uint32
42 | }
43 |
44 | const (
45 | sizeofIovec = 0x8
46 | sizeofMsghdr = 0x1c
47 | sizeofCmsghdr = 0xc
48 |
49 | sizeofSockaddrInet = 0x10
50 | sizeofSockaddrInet6 = 0x1c
51 | )
52 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_darwin.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen int32
17 | Pad_cgo_1 [4]byte
18 | Control *byte
19 | Controllen uint32
20 | Flags int32
21 | }
22 |
23 | type cmsghdr struct {
24 | Len uint32
25 | Level int32
26 | Type int32
27 | }
28 |
29 | type sockaddrInet struct {
30 | Len uint8
31 | Family uint8
32 | Port uint16
33 | Addr [4]byte /* in_addr */
34 | Zero [8]int8
35 | }
36 |
37 | type sockaddrInet6 struct {
38 | Len uint8
39 | Family uint8
40 | Port uint16
41 | Flowinfo uint32
42 | Addr [16]byte /* in6_addr */
43 | Scope_id uint32
44 | }
45 |
46 | const (
47 | sizeofIovec = 0x10
48 | sizeofMsghdr = 0x30
49 | sizeofCmsghdr = 0xc
50 |
51 | sizeofSockaddrInet = 0x10
52 | sizeofSockaddrInet6 = 0x1c
53 | )
54 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_darwin.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen int32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type cmsghdr struct {
22 | Len uint32
23 | Level int32
24 | Type int32
25 | }
26 |
27 | type sockaddrInet struct {
28 | Len uint8
29 | Family uint8
30 | Port uint16
31 | Addr [4]byte /* in_addr */
32 | Zero [8]int8
33 | }
34 |
35 | type sockaddrInet6 struct {
36 | Len uint8
37 | Family uint8
38 | Port uint16
39 | Flowinfo uint32
40 | Addr [16]byte /* in6_addr */
41 | Scope_id uint32
42 | }
43 |
44 | const (
45 | sizeofIovec = 0x8
46 | sizeofMsghdr = 0x1c
47 | sizeofCmsghdr = 0xc
48 |
49 | sizeofSockaddrInet = 0x10
50 | sizeofSockaddrInet6 = 0x1c
51 | )
52 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_darwin.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen int32
17 | Pad_cgo_1 [4]byte
18 | Control *byte
19 | Controllen uint32
20 | Flags int32
21 | }
22 |
23 | type cmsghdr struct {
24 | Len uint32
25 | Level int32
26 | Type int32
27 | }
28 |
29 | type sockaddrInet struct {
30 | Len uint8
31 | Family uint8
32 | Port uint16
33 | Addr [4]byte /* in_addr */
34 | Zero [8]int8
35 | }
36 |
37 | type sockaddrInet6 struct {
38 | Len uint8
39 | Family uint8
40 | Port uint16
41 | Flowinfo uint32
42 | Addr [16]byte /* in6_addr */
43 | Scope_id uint32
44 | }
45 |
46 | const (
47 | sizeofIovec = 0x10
48 | sizeofMsghdr = 0x30
49 | sizeofCmsghdr = 0xc
50 |
51 | sizeofSockaddrInet = 0x10
52 | sizeofSockaddrInet6 = 0x1c
53 | )
54 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_dragonfly.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen int32
17 | Pad_cgo_1 [4]byte
18 | Control *byte
19 | Controllen uint32
20 | Flags int32
21 | }
22 |
23 | type cmsghdr struct {
24 | Len uint32
25 | Level int32
26 | Type int32
27 | }
28 |
29 | type sockaddrInet struct {
30 | Len uint8
31 | Family uint8
32 | Port uint16
33 | Addr [4]byte /* in_addr */
34 | Zero [8]int8
35 | }
36 |
37 | type sockaddrInet6 struct {
38 | Len uint8
39 | Family uint8
40 | Port uint16
41 | Flowinfo uint32
42 | Addr [16]byte /* in6_addr */
43 | Scope_id uint32
44 | }
45 |
46 | const (
47 | sizeofIovec = 0x10
48 | sizeofMsghdr = 0x30
49 | sizeofCmsghdr = 0xc
50 |
51 | sizeofSockaddrInet = 0x10
52 | sizeofSockaddrInet6 = 0x1c
53 | )
54 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_freebsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen int32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type cmsghdr struct {
22 | Len uint32
23 | Level int32
24 | Type int32
25 | }
26 |
27 | type sockaddrInet struct {
28 | Len uint8
29 | Family uint8
30 | Port uint16
31 | Addr [4]byte /* in_addr */
32 | Zero [8]int8
33 | }
34 |
35 | type sockaddrInet6 struct {
36 | Len uint8
37 | Family uint8
38 | Port uint16
39 | Flowinfo uint32
40 | Addr [16]byte /* in6_addr */
41 | Scope_id uint32
42 | }
43 |
44 | const (
45 | sizeofIovec = 0x8
46 | sizeofMsghdr = 0x1c
47 | sizeofCmsghdr = 0xc
48 |
49 | sizeofSockaddrInet = 0x10
50 | sizeofSockaddrInet6 = 0x1c
51 | )
52 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_freebsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen int32
17 | Pad_cgo_1 [4]byte
18 | Control *byte
19 | Controllen uint32
20 | Flags int32
21 | }
22 |
23 | type cmsghdr struct {
24 | Len uint32
25 | Level int32
26 | Type int32
27 | }
28 |
29 | type sockaddrInet struct {
30 | Len uint8
31 | Family uint8
32 | Port uint16
33 | Addr [4]byte /* in_addr */
34 | Zero [8]int8
35 | }
36 |
37 | type sockaddrInet6 struct {
38 | Len uint8
39 | Family uint8
40 | Port uint16
41 | Flowinfo uint32
42 | Addr [16]byte /* in6_addr */
43 | Scope_id uint32
44 | }
45 |
46 | const (
47 | sizeofIovec = 0x10
48 | sizeofMsghdr = 0x30
49 | sizeofCmsghdr = 0xc
50 |
51 | sizeofSockaddrInet = 0x10
52 | sizeofSockaddrInet6 = 0x1c
53 | )
54 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_freebsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen int32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type cmsghdr struct {
22 | Len uint32
23 | Level int32
24 | Type int32
25 | }
26 |
27 | type sockaddrInet struct {
28 | Len uint8
29 | Family uint8
30 | Port uint16
31 | Addr [4]byte /* in_addr */
32 | Zero [8]int8
33 | }
34 |
35 | type sockaddrInet6 struct {
36 | Len uint8
37 | Family uint8
38 | Port uint16
39 | Flowinfo uint32
40 | Addr [16]byte /* in6_addr */
41 | Scope_id uint32
42 | }
43 |
44 | const (
45 | sizeofIovec = 0x8
46 | sizeofMsghdr = 0x1c
47 | sizeofCmsghdr = 0xc
48 |
49 | sizeofSockaddrInet = 0x10
50 | sizeofSockaddrInet6 = 0x1c
51 | )
52 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_freebsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen int32
17 | Pad_cgo_1 [4]byte
18 | Control *byte
19 | Controllen uint32
20 | Flags int32
21 | }
22 |
23 | type cmsghdr struct {
24 | Len uint32
25 | Level int32
26 | Type int32
27 | }
28 |
29 | type sockaddrInet struct {
30 | Len uint8
31 | Family uint8
32 | Port uint16
33 | Addr [4]byte /* in_addr */
34 | Zero [8]int8
35 | }
36 |
37 | type sockaddrInet6 struct {
38 | Len uint8
39 | Family uint8
40 | Port uint16
41 | Flowinfo uint32
42 | Addr [16]byte /* in6_addr */
43 | Scope_id uint32
44 | }
45 |
46 | const (
47 | sizeofIovec = 0x10
48 | sizeofMsghdr = 0x30
49 | sizeofCmsghdr = 0xc
50 |
51 | sizeofSockaddrInet = 0x10
52 | sizeofSockaddrInet6 = 0x1c
53 | )
54 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen uint32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type mmsghdr struct {
22 | Hdr msghdr
23 | Len uint32
24 | }
25 |
26 | type cmsghdr struct {
27 | Len uint32
28 | Level int32
29 | Type int32
30 | }
31 |
32 | type sockaddrInet struct {
33 | Family uint16
34 | Port uint16
35 | Addr [4]byte /* in_addr */
36 | X__pad [8]uint8
37 | }
38 |
39 | type sockaddrInet6 struct {
40 | Family uint16
41 | Port uint16
42 | Flowinfo uint32
43 | Addr [16]byte /* in6_addr */
44 | Scope_id uint32
45 | }
46 |
47 | const (
48 | sizeofIovec = 0x8
49 | sizeofMsghdr = 0x1c
50 | sizeofMmsghdr = 0x20
51 | sizeofCmsghdr = 0xc
52 |
53 | sizeofSockaddrInet = 0x10
54 | sizeofSockaddrInet6 = 0x1c
55 | )
56 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen uint32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type mmsghdr struct {
22 | Hdr msghdr
23 | Len uint32
24 | }
25 |
26 | type cmsghdr struct {
27 | Len uint32
28 | Level int32
29 | Type int32
30 | }
31 |
32 | type sockaddrInet struct {
33 | Family uint16
34 | Port uint16
35 | Addr [4]byte /* in_addr */
36 | X__pad [8]uint8
37 | }
38 |
39 | type sockaddrInet6 struct {
40 | Family uint16
41 | Port uint16
42 | Flowinfo uint32
43 | Addr [16]byte /* in6_addr */
44 | Scope_id uint32
45 | }
46 |
47 | const (
48 | sizeofIovec = 0x8
49 | sizeofMsghdr = 0x1c
50 | sizeofMmsghdr = 0x20
51 | sizeofCmsghdr = 0xc
52 |
53 | sizeofSockaddrInet = 0x10
54 | sizeofSockaddrInet6 = 0x1c
55 | )
56 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen uint32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type mmsghdr struct {
22 | Hdr msghdr
23 | Len uint32
24 | }
25 |
26 | type cmsghdr struct {
27 | Len uint32
28 | Level int32
29 | Type int32
30 | }
31 |
32 | type sockaddrInet struct {
33 | Family uint16
34 | Port uint16
35 | Addr [4]byte /* in_addr */
36 | X__pad [8]uint8
37 | }
38 |
39 | type sockaddrInet6 struct {
40 | Family uint16
41 | Port uint16
42 | Flowinfo uint32
43 | Addr [16]byte /* in6_addr */
44 | Scope_id uint32
45 | }
46 |
47 | const (
48 | sizeofIovec = 0x8
49 | sizeofMsghdr = 0x1c
50 | sizeofMmsghdr = 0x20
51 | sizeofCmsghdr = 0xc
52 |
53 | sizeofSockaddrInet = 0x10
54 | sizeofSockaddrInet6 = 0x1c
55 | )
56 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen uint32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type mmsghdr struct {
22 | Hdr msghdr
23 | Len uint32
24 | }
25 |
26 | type cmsghdr struct {
27 | Len uint32
28 | Level int32
29 | Type int32
30 | }
31 |
32 | type sockaddrInet struct {
33 | Family uint16
34 | Port uint16
35 | Addr [4]byte /* in_addr */
36 | X__pad [8]uint8
37 | }
38 |
39 | type sockaddrInet6 struct {
40 | Family uint16
41 | Port uint16
42 | Flowinfo uint32
43 | Addr [16]byte /* in6_addr */
44 | Scope_id uint32
45 | }
46 |
47 | const (
48 | sizeofIovec = 0x8
49 | sizeofMsghdr = 0x1c
50 | sizeofMmsghdr = 0x20
51 | sizeofCmsghdr = 0xc
52 |
53 | sizeofSockaddrInet = 0x10
54 | sizeofSockaddrInet6 = 0x1c
55 | )
56 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_netbsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen int32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type mmsghdr struct {
22 | Hdr msghdr
23 | Len uint32
24 | }
25 |
26 | type cmsghdr struct {
27 | Len uint32
28 | Level int32
29 | Type int32
30 | }
31 |
32 | type sockaddrInet struct {
33 | Len uint8
34 | Family uint8
35 | Port uint16
36 | Addr [4]byte /* in_addr */
37 | Zero [8]int8
38 | }
39 |
40 | type sockaddrInet6 struct {
41 | Len uint8
42 | Family uint8
43 | Port uint16
44 | Flowinfo uint32
45 | Addr [16]byte /* in6_addr */
46 | Scope_id uint32
47 | }
48 |
49 | const (
50 | sizeofIovec = 0x8
51 | sizeofMsghdr = 0x1c
52 | sizeofMmsghdr = 0x20
53 | sizeofCmsghdr = 0xc
54 |
55 | sizeofSockaddrInet = 0x10
56 | sizeofSockaddrInet6 = 0x1c
57 | )
58 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_netbsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen int32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type mmsghdr struct {
22 | Hdr msghdr
23 | Len uint32
24 | }
25 |
26 | type cmsghdr struct {
27 | Len uint32
28 | Level int32
29 | Type int32
30 | }
31 |
32 | type sockaddrInet struct {
33 | Len uint8
34 | Family uint8
35 | Port uint16
36 | Addr [4]byte /* in_addr */
37 | Zero [8]int8
38 | }
39 |
40 | type sockaddrInet6 struct {
41 | Len uint8
42 | Family uint8
43 | Port uint16
44 | Flowinfo uint32
45 | Addr [16]byte /* in6_addr */
46 | Scope_id uint32
47 | }
48 |
49 | const (
50 | sizeofIovec = 0x8
51 | sizeofMsghdr = 0x1c
52 | sizeofMmsghdr = 0x20
53 | sizeofCmsghdr = 0xc
54 |
55 | sizeofSockaddrInet = 0x10
56 | sizeofSockaddrInet6 = 0x1c
57 | )
58 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_openbsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen uint32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type cmsghdr struct {
22 | Len uint32
23 | Level int32
24 | Type int32
25 | }
26 |
27 | type sockaddrInet struct {
28 | Len uint8
29 | Family uint8
30 | Port uint16
31 | Addr [4]byte /* in_addr */
32 | Zero [8]int8
33 | }
34 |
35 | type sockaddrInet6 struct {
36 | Len uint8
37 | Family uint8
38 | Port uint16
39 | Flowinfo uint32
40 | Addr [16]byte /* in6_addr */
41 | Scope_id uint32
42 | }
43 |
44 | const (
45 | sizeofIovec = 0x8
46 | sizeofMsghdr = 0x1c
47 | sizeofCmsghdr = 0xc
48 |
49 | sizeofSockaddrInet = 0x10
50 | sizeofSockaddrInet6 = 0x1c
51 | )
52 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_openbsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen uint32
17 | Pad_cgo_1 [4]byte
18 | Control *byte
19 | Controllen uint32
20 | Flags int32
21 | }
22 |
23 | type cmsghdr struct {
24 | Len uint32
25 | Level int32
26 | Type int32
27 | }
28 |
29 | type sockaddrInet struct {
30 | Len uint8
31 | Family uint8
32 | Port uint16
33 | Addr [4]byte /* in_addr */
34 | Zero [8]int8
35 | }
36 |
37 | type sockaddrInet6 struct {
38 | Len uint8
39 | Family uint8
40 | Port uint16
41 | Flowinfo uint32
42 | Addr [16]byte /* in6_addr */
43 | Scope_id uint32
44 | }
45 |
46 | const (
47 | sizeofIovec = 0x10
48 | sizeofMsghdr = 0x30
49 | sizeofCmsghdr = 0xc
50 |
51 | sizeofSockaddrInet = 0x10
52 | sizeofSockaddrInet6 = 0x1c
53 | )
54 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_openbsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen uint32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type cmsghdr struct {
22 | Len uint32
23 | Level int32
24 | Type int32
25 | }
26 |
27 | type sockaddrInet struct {
28 | Len uint8
29 | Family uint8
30 | Port uint16
31 | Addr [4]byte /* in_addr */
32 | Zero [8]int8
33 | }
34 |
35 | type sockaddrInet6 struct {
36 | Len uint8
37 | Family uint8
38 | Port uint16
39 | Flowinfo uint32
40 | Addr [16]byte /* in6_addr */
41 | Scope_id uint32
42 | }
43 |
44 | const (
45 | sizeofIovec = 0x8
46 | sizeofMsghdr = 0x1c
47 | sizeofCmsghdr = 0xc
48 |
49 | sizeofSockaddrInet = 0x10
50 | sizeofSockaddrInet6 = 0x1c
51 | )
52 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_openbsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen uint32
17 | Pad_cgo_1 [4]byte
18 | Control *byte
19 | Controllen uint32
20 | Flags int32
21 | }
22 |
23 | type cmsghdr struct {
24 | Len uint32
25 | Level int32
26 | Type int32
27 | }
28 |
29 | type sockaddrInet struct {
30 | Len uint8
31 | Family uint8
32 | Port uint16
33 | Addr [4]byte /* in_addr */
34 | Zero [8]int8
35 | }
36 |
37 | type sockaddrInet6 struct {
38 | Len uint8
39 | Family uint8
40 | Port uint16
41 | Flowinfo uint32
42 | Addr [16]byte /* in6_addr */
43 | Scope_id uint32
44 | }
45 |
46 | const (
47 | sizeofIovec = 0x10
48 | sizeofMsghdr = 0x30
49 | sizeofCmsghdr = 0xc
50 |
51 | sizeofSockaddrInet = 0x10
52 | sizeofSockaddrInet6 = 0x1c
53 | )
54 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_solaris.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *int8
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen int32
17 | Pad_cgo_1 [4]byte
18 | Accrights *int8
19 | Accrightslen int32
20 | Pad_cgo_2 [4]byte
21 | }
22 |
23 | type cmsghdr struct {
24 | Len uint32
25 | Level int32
26 | Type int32
27 | }
28 |
29 | type sockaddrInet struct {
30 | Family uint16
31 | Port uint16
32 | Addr [4]byte /* in_addr */
33 | Zero [8]int8
34 | }
35 |
36 | type sockaddrInet6 struct {
37 | Family uint16
38 | Port uint16
39 | Flowinfo uint32
40 | Addr [16]byte /* in6_addr */
41 | Scope_id uint32
42 | X__sin6_src_id uint32
43 | }
44 |
45 | const (
46 | sizeofIovec = 0x10
47 | sizeofMsghdr = 0x30
48 | sizeofCmsghdr = 0xc
49 |
50 | sizeofSockaddrInet = 0x10
51 | sizeofSockaddrInet6 = 0x20
52 | )
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/control_pktinfo.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin linux solaris
6 |
7 | package ipv4
8 |
9 | import (
10 | "net"
11 | "unsafe"
12 |
13 | "golang.org/x/net/internal/iana"
14 | "golang.org/x/net/internal/socket"
15 | )
16 |
17 | func marshalPacketInfo(b []byte, cm *ControlMessage) []byte {
18 | m := socket.ControlMessage(b)
19 | m.MarshalHeader(iana.ProtocolIP, sysIP_PKTINFO, sizeofInetPktinfo)
20 | if cm != nil {
21 | pi := (*inetPktinfo)(unsafe.Pointer(&m.Data(sizeofInetPktinfo)[0]))
22 | if ip := cm.Src.To4(); ip != nil {
23 | copy(pi.Spec_dst[:], ip)
24 | }
25 | if cm.IfIndex > 0 {
26 | pi.setIfindex(cm.IfIndex)
27 | }
28 | }
29 | return m.Next(sizeofInetPktinfo)
30 | }
31 |
32 | func parsePacketInfo(cm *ControlMessage, b []byte) {
33 | pi := (*inetPktinfo)(unsafe.Pointer(&b[0]))
34 | cm.IfIndex = int(pi.Ifindex)
35 | if len(cm.Dst) < net.IPv4len {
36 | cm.Dst = make(net.IP, net.IPv4len)
37 | }
38 | copy(cm.Dst, pi.Addr[:])
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/control_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
6 |
7 | package ipv4
8 |
9 | import "golang.org/x/net/internal/socket"
10 |
11 | func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
12 | return errNotImplemented
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/control_windows.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ipv4
6 |
7 | import "golang.org/x/net/internal/socket"
8 |
9 | func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
10 | // TODO(mikio): implement this
11 | return errNotImplemented
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/icmp_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ipv4
6 |
7 | func (f *icmpFilter) accept(typ ICMPType) {
8 | f.Data &^= 1 << (uint32(typ) & 31)
9 | }
10 |
11 | func (f *icmpFilter) block(typ ICMPType) {
12 | f.Data |= 1 << (uint32(typ) & 31)
13 | }
14 |
15 | func (f *icmpFilter) setAll(block bool) {
16 | if block {
17 | f.Data = 1<<32 - 1
18 | } else {
19 | f.Data = 0
20 | }
21 | }
22 |
23 | func (f *icmpFilter) willBlock(typ ICMPType) bool {
24 | return f.Data&(1<<(uint32(typ)&31)) != 0
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/icmp_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !linux
6 |
7 | package ipv4
8 |
9 | const sizeofICMPFilter = 0x0
10 |
11 | type icmpFilter struct {
12 | }
13 |
14 | func (f *icmpFilter) accept(typ ICMPType) {
15 | }
16 |
17 | func (f *icmpFilter) block(typ ICMPType) {
18 | }
19 |
20 | func (f *icmpFilter) setAll(block bool) {
21 | }
22 |
23 | func (f *icmpFilter) willBlock(typ ICMPType) bool {
24 | return false
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/payload.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ipv4
6 |
7 | import (
8 | "net"
9 |
10 | "golang.org/x/net/internal/socket"
11 | )
12 |
13 | // BUG(mikio): On Windows, the ControlMessage for ReadFrom and WriteTo
14 | // methods of PacketConn is not implemented.
15 |
16 | // A payloadHandler represents the IPv4 datagram payload handler.
17 | type payloadHandler struct {
18 | net.PacketConn
19 | *socket.Conn
20 | rawOpt
21 | }
22 |
23 | func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil && c.Conn != nil }
24 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !aix,!darwin,!dragonfly,!freebsd,!netbsd,!openbsd,!solaris,!windows
6 |
7 | package ipv4
8 |
9 | import (
10 | "net"
11 |
12 | "golang.org/x/net/internal/socket"
13 | )
14 |
15 | func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
16 | return errNotImplemented
17 | }
18 |
19 | func (so *sockOpt) getMulticastIf(c *socket.Conn) (*net.Interface, error) {
20 | return nil, errNotImplemented
21 | }
22 |
23 | func (so *sockOpt) setMulticastIf(c *socket.Conn, ifi *net.Interface) error {
24 | return errNotImplemented
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !darwin,!freebsd,!linux
6 |
7 | package ipv4
8 |
9 | import (
10 | "net"
11 |
12 | "golang.org/x/net/internal/socket"
13 | )
14 |
15 | func (so *sockOpt) getIPMreqn(c *socket.Conn) (*net.Interface, error) {
16 | return nil, errNotImplemented
17 | }
18 |
19 | func (so *sockOpt) setIPMreqn(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
20 | return errNotImplemented
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/sys_bpf.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 |
7 | package ipv4
8 |
9 | import (
10 | "unsafe"
11 |
12 | "golang.org/x/net/bpf"
13 | "golang.org/x/net/internal/socket"
14 | )
15 |
16 | func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
17 | prog := sockFProg{
18 | Len: uint16(len(f)),
19 | Filter: (*sockFilter)(unsafe.Pointer(&f[0])),
20 | }
21 | b := (*[sizeofSockFprog]byte)(unsafe.Pointer(&prog))[:sizeofSockFprog]
22 | return so.Set(c, b)
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !linux
6 |
7 | package ipv4
8 |
9 | import (
10 | "golang.org/x/net/bpf"
11 | "golang.org/x/net/internal/socket"
12 | )
13 |
14 | func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
15 | return errNotImplemented
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !darwin,!freebsd,!linux,!solaris
6 |
7 | package ipv4
8 |
9 | import (
10 | "net"
11 |
12 | "golang.org/x/net/internal/socket"
13 | )
14 |
15 | func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
16 | return errNotImplemented
17 | }
18 |
19 | func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
20 | return errNotImplemented
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/sys_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
6 |
7 | package ipv4
8 |
9 | var (
10 | ctlOpts = [ctlMax]ctlOpt{}
11 |
12 | sockOpts = map[int]*sockOpt{}
13 | )
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/zsys_aix_ppc64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_aix.go
3 |
4 | // Added for go1.11 compatibility
5 | // +build aix
6 |
7 | package ipv4
8 |
9 | const (
10 | sysIP_OPTIONS = 0x1
11 | sysIP_HDRINCL = 0x2
12 | sysIP_TOS = 0x3
13 | sysIP_TTL = 0x4
14 | sysIP_RECVOPTS = 0x5
15 | sysIP_RECVRETOPTS = 0x6
16 | sysIP_RECVDSTADDR = 0x7
17 | sysIP_RETOPTS = 0x8
18 | sysIP_RECVIF = 0x20
19 | sysIP_RECVTTL = 0x22
20 |
21 | sysIP_MULTICAST_IF = 0x9
22 | sysIP_MULTICAST_TTL = 0xa
23 | sysIP_MULTICAST_LOOP = 0xb
24 | sysIP_ADD_MEMBERSHIP = 0xc
25 | sysIP_DROP_MEMBERSHIP = 0xd
26 |
27 | sizeofIPMreq = 0x8
28 | )
29 |
30 | type ipMreq struct {
31 | Multiaddr [4]byte /* in_addr */
32 | Interface [4]byte /* in_addr */
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/zsys_dragonfly.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_dragonfly.go
3 |
4 | package ipv4
5 |
6 | const (
7 | sysIP_OPTIONS = 0x1
8 | sysIP_HDRINCL = 0x2
9 | sysIP_TOS = 0x3
10 | sysIP_TTL = 0x4
11 | sysIP_RECVOPTS = 0x5
12 | sysIP_RECVRETOPTS = 0x6
13 | sysIP_RECVDSTADDR = 0x7
14 | sysIP_RETOPTS = 0x8
15 | sysIP_RECVIF = 0x14
16 | sysIP_RECVTTL = 0x41
17 |
18 | sysIP_MULTICAST_IF = 0x9
19 | sysIP_MULTICAST_TTL = 0xa
20 | sysIP_MULTICAST_LOOP = 0xb
21 | sysIP_MULTICAST_VIF = 0xe
22 | sysIP_ADD_MEMBERSHIP = 0xc
23 | sysIP_DROP_MEMBERSHIP = 0xd
24 |
25 | sizeofIPMreq = 0x8
26 | )
27 |
28 | type ipMreq struct {
29 | Multiaddr [4]byte /* in_addr */
30 | Interface [4]byte /* in_addr */
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/zsys_netbsd.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_netbsd.go
3 |
4 | package ipv4
5 |
6 | const (
7 | sysIP_OPTIONS = 0x1
8 | sysIP_HDRINCL = 0x2
9 | sysIP_TOS = 0x3
10 | sysIP_TTL = 0x4
11 | sysIP_RECVOPTS = 0x5
12 | sysIP_RECVRETOPTS = 0x6
13 | sysIP_RECVDSTADDR = 0x7
14 | sysIP_RETOPTS = 0x8
15 | sysIP_RECVIF = 0x14
16 | sysIP_RECVTTL = 0x17
17 |
18 | sysIP_MULTICAST_IF = 0x9
19 | sysIP_MULTICAST_TTL = 0xa
20 | sysIP_MULTICAST_LOOP = 0xb
21 | sysIP_ADD_MEMBERSHIP = 0xc
22 | sysIP_DROP_MEMBERSHIP = 0xd
23 |
24 | sizeofIPMreq = 0x8
25 | )
26 |
27 | type ipMreq struct {
28 | Multiaddr [4]byte /* in_addr */
29 | Interface [4]byte /* in_addr */
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/zsys_openbsd.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_openbsd.go
3 |
4 | package ipv4
5 |
6 | const (
7 | sysIP_OPTIONS = 0x1
8 | sysIP_HDRINCL = 0x2
9 | sysIP_TOS = 0x3
10 | sysIP_TTL = 0x4
11 | sysIP_RECVOPTS = 0x5
12 | sysIP_RECVRETOPTS = 0x6
13 | sysIP_RECVDSTADDR = 0x7
14 | sysIP_RETOPTS = 0x8
15 | sysIP_RECVIF = 0x1e
16 | sysIP_RECVTTL = 0x1f
17 |
18 | sysIP_MULTICAST_IF = 0x9
19 | sysIP_MULTICAST_TTL = 0xa
20 | sysIP_MULTICAST_LOOP = 0xb
21 | sysIP_ADD_MEMBERSHIP = 0xc
22 | sysIP_DROP_MEMBERSHIP = 0xd
23 |
24 | sizeofIPMreq = 0x8
25 | )
26 |
27 | type ipMreq struct {
28 | Multiaddr [4]byte /* in_addr */
29 | Interface [4]byte /* in_addr */
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/control_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
6 |
7 | package ipv6
8 |
9 | import "golang.org/x/net/internal/socket"
10 |
11 | func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
12 | return errNotImplemented
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/control_windows.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ipv6
6 |
7 | import "golang.org/x/net/internal/socket"
8 |
9 | func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
10 | // TODO(mikio): implement this
11 | return errNotImplemented
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/icmp_bsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd netbsd openbsd
6 |
7 | package ipv6
8 |
9 | func (f *icmpv6Filter) accept(typ ICMPType) {
10 | f.Filt[typ>>5] |= 1 << (uint32(typ) & 31)
11 | }
12 |
13 | func (f *icmpv6Filter) block(typ ICMPType) {
14 | f.Filt[typ>>5] &^= 1 << (uint32(typ) & 31)
15 | }
16 |
17 | func (f *icmpv6Filter) setAll(block bool) {
18 | for i := range f.Filt {
19 | if block {
20 | f.Filt[i] = 0
21 | } else {
22 | f.Filt[i] = 1<<32 - 1
23 | }
24 | }
25 | }
26 |
27 | func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
28 | return f.Filt[typ>>5]&(1<<(uint32(typ)&31)) == 0
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/icmp_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ipv6
6 |
7 | func (f *icmpv6Filter) accept(typ ICMPType) {
8 | f.Data[typ>>5] &^= 1 << (uint32(typ) & 31)
9 | }
10 |
11 | func (f *icmpv6Filter) block(typ ICMPType) {
12 | f.Data[typ>>5] |= 1 << (uint32(typ) & 31)
13 | }
14 |
15 | func (f *icmpv6Filter) setAll(block bool) {
16 | for i := range f.Data {
17 | if block {
18 | f.Data[i] = 1<<32 - 1
19 | } else {
20 | f.Data[i] = 0
21 | }
22 | }
23 | }
24 |
25 | func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
26 | return f.Data[typ>>5]&(1<<(uint32(typ)&31)) != 0
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/icmp_solaris.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ipv6
6 |
7 | func (f *icmpv6Filter) accept(typ ICMPType) {
8 | f.X__icmp6_filt[typ>>5] |= 1 << (uint32(typ) & 31)
9 | }
10 |
11 | func (f *icmpv6Filter) block(typ ICMPType) {
12 | f.X__icmp6_filt[typ>>5] &^= 1 << (uint32(typ) & 31)
13 | }
14 |
15 | func (f *icmpv6Filter) setAll(block bool) {
16 | for i := range f.X__icmp6_filt {
17 | if block {
18 | f.X__icmp6_filt[i] = 0
19 | } else {
20 | f.X__icmp6_filt[i] = 1<<32 - 1
21 | }
22 | }
23 | }
24 |
25 | func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
26 | return f.X__icmp6_filt[typ>>5]&(1<<(uint32(typ)&31)) == 0
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/icmp_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
6 |
7 | package ipv6
8 |
9 | type icmpv6Filter struct {
10 | }
11 |
12 | func (f *icmpv6Filter) accept(typ ICMPType) {
13 | }
14 |
15 | func (f *icmpv6Filter) block(typ ICMPType) {
16 | }
17 |
18 | func (f *icmpv6Filter) setAll(block bool) {
19 | }
20 |
21 | func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
22 | return false
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/icmp_windows.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ipv6
6 |
7 | func (f *icmpv6Filter) accept(typ ICMPType) {
8 | // TODO(mikio): implement this
9 | }
10 |
11 | func (f *icmpv6Filter) block(typ ICMPType) {
12 | // TODO(mikio): implement this
13 | }
14 |
15 | func (f *icmpv6Filter) setAll(block bool) {
16 | // TODO(mikio): implement this
17 | }
18 |
19 | func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
20 | // TODO(mikio): implement this
21 | return false
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/payload.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ipv6
6 |
7 | import (
8 | "net"
9 |
10 | "golang.org/x/net/internal/socket"
11 | )
12 |
13 | // BUG(mikio): On Windows, the ControlMessage for ReadFrom and WriteTo
14 | // methods of PacketConn is not implemented.
15 |
16 | // A payloadHandler represents the IPv6 datagram payload handler.
17 | type payloadHandler struct {
18 | net.PacketConn
19 | *socket.Conn
20 | rawOpt
21 | }
22 |
23 | func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil && c.Conn != nil }
24 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/sys_asmreq.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
6 |
7 | package ipv6
8 |
9 | import (
10 | "net"
11 | "unsafe"
12 |
13 | "golang.org/x/net/internal/socket"
14 | )
15 |
16 | func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
17 | var mreq ipv6Mreq
18 | copy(mreq.Multiaddr[:], grp)
19 | if ifi != nil {
20 | mreq.setIfindex(ifi.Index)
21 | }
22 | b := (*[sizeofIPv6Mreq]byte)(unsafe.Pointer(&mreq))[:sizeofIPv6Mreq]
23 | return so.Set(c, b)
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
6 |
7 | package ipv6
8 |
9 | import (
10 | "net"
11 |
12 | "golang.org/x/net/internal/socket"
13 | )
14 |
15 | func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
16 | return errNotImplemented
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/sys_bpf.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 |
7 | package ipv6
8 |
9 | import (
10 | "unsafe"
11 |
12 | "golang.org/x/net/bpf"
13 | "golang.org/x/net/internal/socket"
14 | )
15 |
16 | func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
17 | prog := sockFProg{
18 | Len: uint16(len(f)),
19 | Filter: (*sockFilter)(unsafe.Pointer(&f[0])),
20 | }
21 | b := (*[sizeofSockFprog]byte)(unsafe.Pointer(&prog))[:sizeofSockFprog]
22 | return so.Set(c, b)
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/sys_bpf_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !linux
6 |
7 | package ipv6
8 |
9 | import (
10 | "golang.org/x/net/bpf"
11 | "golang.org/x/net/internal/socket"
12 | )
13 |
14 | func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
15 | return errNotImplemented
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !aix,!darwin,!freebsd,!linux,!solaris
6 |
7 | package ipv6
8 |
9 | import (
10 | "net"
11 |
12 | "golang.org/x/net/internal/socket"
13 | )
14 |
15 | func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
16 | return errNotImplemented
17 | }
18 |
19 | func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
20 | return errNotImplemented
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/sys_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
6 |
7 | package ipv6
8 |
9 | var (
10 | ctlOpts = [ctlMax]ctlOpt{}
11 |
12 | sockOpts = map[int]*sockOpt{}
13 | )
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/proxy/direct.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package proxy
6 |
7 | import (
8 | "context"
9 | "net"
10 | )
11 |
12 | type direct struct{}
13 |
14 | // Direct implements Dialer by making network connections directly using net.Dial or net.DialContext.
15 | var Direct = direct{}
16 |
17 | var (
18 | _ Dialer = Direct
19 | _ ContextDialer = Direct
20 | )
21 |
22 | // Dial directly invokes net.Dial with the supplied parameters.
23 | func (direct) Dial(network, addr string) (net.Conn, error) {
24 | return net.Dial(network, addr)
25 | }
26 |
27 | // DialContext instantiates a net.Dialer and invokes its DialContext receiver with the supplied parameters.
28 | func (direct) DialContext(ctx context.Context, network, addr string) (net.Conn, error) {
29 | var d net.Dialer
30 | return d.DialContext(ctx, network, addr)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/websocket/dial.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package websocket
6 |
7 | import (
8 | "crypto/tls"
9 | "net"
10 | )
11 |
12 | func dialWithDialer(dialer *net.Dialer, config *Config) (conn net.Conn, err error) {
13 | switch config.Location.Scheme {
14 | case "ws":
15 | conn, err = dialer.Dial("tcp", parseAuthority(config.Location))
16 |
17 | case "wss":
18 | conn, err = tls.DialWithDialer(dialer, "tcp", parseAuthority(config.Location), config.TlsConfig)
19 |
20 | default:
21 | err = ErrBadScheme
22 | }
23 | return
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/.gitignore:
--------------------------------------------------------------------------------
1 | _obj/
2 | unix.test
3 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/aliases.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 | // +build go1.9
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | type Signal = syscall.Signal
13 | type Errno = syscall.Errno
14 | type SysProcAttr = syscall.SysProcAttr
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go
11 | //
12 |
13 | TEXT ·syscall6(SB),NOSPLIT,$0-88
14 | JMP syscall·syscall6(SB)
15 |
16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88
17 | JMP syscall·rawSyscall6(SB)
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, Darwin
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, Darwin
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 | // +build arm,darwin
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System call support for ARM, Darwin
12 | //
13 |
14 | // Just jump to package syscall's implementation for all these functions.
15 | // The runtime may know about them.
16 |
17 | TEXT ·Syscall(SB),NOSPLIT,$0-28
18 | B syscall·Syscall(SB)
19 |
20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
21 | B syscall·Syscall6(SB)
22 |
23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
24 | B syscall·Syscall9(SB)
25 |
26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
27 | B syscall·RawSyscall(SB)
28 |
29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
30 | B syscall·RawSyscall6(SB)
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 | // +build arm64,darwin
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System call support for AMD64, Darwin
12 | //
13 |
14 | // Just jump to package syscall's implementation for all these functions.
15 | // The runtime may know about them.
16 |
17 | TEXT ·Syscall(SB),NOSPLIT,$0-56
18 | B syscall·Syscall(SB)
19 |
20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
21 | B syscall·Syscall6(SB)
22 |
23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
24 | B syscall·Syscall9(SB)
25 |
26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
27 | B syscall·RawSyscall(SB)
28 |
29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
30 | B syscall·RawSyscall6(SB)
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, DragonFly
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM64, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build ppc64 ppc64le
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for ppc64, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
19 | BL runtime·entersyscall(SB)
20 | MOVD a1+8(FP), R3
21 | MOVD a2+16(FP), R4
22 | MOVD a3+24(FP), R5
23 | MOVD R0, R6
24 | MOVD R0, R7
25 | MOVD R0, R8
26 | MOVD trap+0(FP), R9 // syscall entry
27 | SYSCALL R9
28 | MOVD R3, r1+32(FP)
29 | MOVD R4, r2+40(FP)
30 | BL runtime·exitsyscall(SB)
31 | RET
32 |
33 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
34 | MOVD a1+8(FP), R3
35 | MOVD a2+16(FP), R4
36 | MOVD a3+24(FP), R5
37 | MOVD R0, R6
38 | MOVD R0, R7
39 | MOVD R0, R8
40 | MOVD trap+0(FP), R9 // syscall entry
41 | SYSCALL R9
42 | MOVD R3, r1+32(FP)
43 | MOVD R4, r2+40(FP)
44 | RET
45 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM64, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
11 | //
12 |
13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88
14 | JMP syscall·sysvicall6(SB)
15 |
16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
17 | JMP syscall·rawSysvicall6(SB)
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/bluetooth_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Bluetooth sockets and messages
6 |
7 | package unix
8 |
9 | // Bluetooth Protocols
10 | const (
11 | BTPROTO_L2CAP = 0
12 | BTPROTO_HCI = 1
13 | BTPROTO_SCO = 2
14 | BTPROTO_RFCOMM = 3
15 | BTPROTO_BNEP = 4
16 | BTPROTO_CMTP = 5
17 | BTPROTO_HIDP = 6
18 | BTPROTO_AVDTP = 7
19 | )
20 |
21 | const (
22 | HCI_CHANNEL_RAW = 0
23 | HCI_CHANNEL_USER = 1
24 | HCI_CHANNEL_MONITOR = 2
25 | HCI_CHANNEL_CONTROL = 3
26 | )
27 |
28 | // Socketoption Level
29 | const (
30 | SOL_BLUETOOTH = 0x112
31 | SOL_HCI = 0x0
32 | SOL_L2CAP = 0x6
33 | SOL_RFCOMM = 0x12
34 | SOL_SCO = 0x11
35 | )
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/constants.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | const (
10 | R_OK = 0x4
11 | W_OK = 0x2
12 | X_OK = 0x1
13 | )
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_aix_ppc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix
6 | // +build ppc
7 |
8 | // Functions to access/create device major and minor numbers matching the
9 | // encoding used by AIX.
10 |
11 | package unix
12 |
13 | // Major returns the major component of a Linux device number.
14 | func Major(dev uint64) uint32 {
15 | return uint32((dev >> 16) & 0xffff)
16 | }
17 |
18 | // Minor returns the minor component of a Linux device number.
19 | func Minor(dev uint64) uint32 {
20 | return uint32(dev & 0xffff)
21 | }
22 |
23 | // Mkdev returns a Linux device number generated from the given major and minor
24 | // components.
25 | func Mkdev(major, minor uint32) uint64 {
26 | return uint64(((major) << 16) | (minor))
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix
6 | // +build ppc64
7 |
8 | // Functions to access/create device major and minor numbers matching the
9 | // encoding used AIX.
10 |
11 | package unix
12 |
13 | // Major returns the major component of a Linux device number.
14 | func Major(dev uint64) uint32 {
15 | return uint32((dev & 0x3fffffff00000000) >> 32)
16 | }
17 |
18 | // Minor returns the minor component of a Linux device number.
19 | func Minor(dev uint64) uint32 {
20 | return uint32((dev & 0x00000000ffffffff) >> 0)
21 | }
22 |
23 | // Mkdev returns a Linux device number generated from the given major and minor
24 | // components.
25 | func Mkdev(major, minor uint32) uint64 {
26 | var DEVNO64 uint64
27 | DEVNO64 = 0x8000000000000000
28 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64)
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in Darwin's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of a Darwin device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev >> 24) & 0xff)
13 | }
14 |
15 | // Minor returns the minor component of a Darwin device number.
16 | func Minor(dev uint64) uint32 {
17 | return uint32(dev & 0xffffff)
18 | }
19 |
20 | // Mkdev returns a Darwin device number generated from the given major and minor
21 | // components.
22 | func Mkdev(major, minor uint32) uint64 {
23 | return (uint64(major) << 24) | uint64(minor)
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_netbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in NetBSD's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of a NetBSD device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev & 0x000fff00) >> 8)
13 | }
14 |
15 | // Minor returns the minor component of a NetBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xfff00000) >> 12)
19 | return minor
20 | }
21 |
22 | // Mkdev returns a NetBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x000fff00
26 | dev |= (uint64(minor) << 12) & 0xfff00000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_openbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in OpenBSD's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of an OpenBSD device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev & 0x0000ff00) >> 8)
13 | }
14 |
15 | // Minor returns the minor component of an OpenBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xffff0000) >> 8)
19 | return minor
20 | }
21 |
22 | // Mkdev returns an OpenBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x0000ff00
26 | dev |= (uint64(minor) << 8) & 0xffff0000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dirent.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | // ParseDirent parses up to max directory entries in buf,
12 | // appending the names to names. It returns the number of
13 | // bytes consumed from buf, the number of entries added
14 | // to names, and the new names slice.
15 | func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
16 | return syscall.ParseDirent(buf, max, names)
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/endian_big.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | // +build ppc64 s390x mips mips64
6 |
7 | package unix
8 |
9 | const isBigEndian = true
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/endian_little.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | // +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le
6 |
7 | package unix
8 |
9 | const isBigEndian = false
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/env_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | // Unix environment variables.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getenv(key string) (value string, found bool) {
14 | return syscall.Getenv(key)
15 | }
16 |
17 | func Setenv(key, value string) error {
18 | return syscall.Setenv(key, value)
19 | }
20 |
21 | func Clearenv() {
22 | syscall.Clearenv()
23 | }
24 |
25 | func Environ() []string {
26 | return syscall.Environ()
27 | }
28 |
29 | func Unsetenv(key string) error {
30 | return syscall.Unsetenv(key)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build dragonfly freebsd linux netbsd openbsd
6 |
7 | package unix
8 |
9 | import "unsafe"
10 |
11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux
12 | // systems by flock_linux_32bit.go to be SYS_FCNTL64.
13 | var fcntl64Syscall uintptr = SYS_FCNTL
14 |
15 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
16 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
17 | valptr, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(arg))
18 | var err error
19 | if errno != 0 {
20 | err = errno
21 | }
22 | return int(valptr), err
23 | }
24 |
25 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
26 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
27 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
28 | if errno == 0 {
29 | return nil
30 | }
31 | return errno
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package unix
6 |
7 | import "unsafe"
8 |
9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
11 | return fcntl(int(fd), cmd, arg)
12 | }
13 |
14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk))))
17 | return err
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go:
--------------------------------------------------------------------------------
1 | // +build linux,386 linux,arm linux,mips linux,mipsle
2 |
3 | // Copyright 2014 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package unix
8 |
9 | func init() {
10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's
11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
12 | fcntl64Syscall = SYS_FCNTL64
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build gccgo,linux,amd64
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | //extern gettimeofday
12 | func realGettimeofday(*Timeval, *byte) int32
13 |
14 | func gettimeofday(tv *Timeval) (err syscall.Errno) {
15 | r := realGettimeofday(tv, nil)
16 | if r < 0 {
17 | return syscall.GetErrno()
18 | }
19 | return 0
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/ioctl.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | import "runtime"
10 |
11 | // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
12 | //
13 | // To change fd's window size, the req argument should be TIOCSWINSZ.
14 | func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
15 | // TODO: if we get the chance, remove the req parameter and
16 | // hardcode TIOCSWINSZ.
17 | err := ioctlSetWinsize(fd, req, value)
18 | runtime.KeepAlive(value)
19 | return err
20 | }
21 |
22 | // IoctlSetTermios performs an ioctl on fd with a *Termios.
23 | //
24 | // The req value will usually be TCSETA or TIOCSETA.
25 | func IoctlSetTermios(fd int, req uint, value *Termios) error {
26 | // TODO: if we get the chance, remove the req parameter.
27 | err := ioctlSetTermios(fd, req, value)
28 | runtime.KeepAlive(value)
29 | return err
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/pagesize_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | // For Unix, get the pagesize from the runtime.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getpagesize() int {
14 | return syscall.Getpagesize()
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/race.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin,race linux,race freebsd,race
6 |
7 | package unix
8 |
9 | import (
10 | "runtime"
11 | "unsafe"
12 | )
13 |
14 | const raceenabled = true
15 |
16 | func raceAcquire(addr unsafe.Pointer) {
17 | runtime.RaceAcquire(addr)
18 | }
19 |
20 | func raceReleaseMerge(addr unsafe.Pointer) {
21 | runtime.RaceReleaseMerge(addr)
22 | }
23 |
24 | func raceReadRange(addr unsafe.Pointer, len int) {
25 | runtime.RaceReadRange(addr, len)
26 | }
27 |
28 | func raceWriteRange(addr unsafe.Pointer, len int) {
29 | runtime.RaceWriteRange(addr, len)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/race0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly
6 |
7 | package unix
8 |
9 | import (
10 | "unsafe"
11 | )
12 |
13 | const raceenabled = false
14 |
15 | func raceAcquire(addr unsafe.Pointer) {
16 | }
17 |
18 | func raceReleaseMerge(addr unsafe.Pointer) {
19 | }
20 |
21 | func raceReadRange(addr unsafe.Pointer, len int) {
22 | }
23 |
24 | func raceWriteRange(addr unsafe.Pointer, len int) {
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/str.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency
10 | if val < 0 {
11 | return "-" + uitoa(uint(-val))
12 | }
13 | return uitoa(uint(val))
14 | }
15 |
16 | func uitoa(val uint) string {
17 | var buf [32]byte // big enough for int64
18 | i := len(buf) - 1
19 | for val >= 10 {
20 | buf[i] = byte(val%10 + '0')
21 | i--
22 | val /= 10
23 | }
24 | buf[i] = byte(val + '0')
25 | return string(buf[i:])
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix
6 | // +build ppc
7 |
8 | package unix
9 |
10 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
11 | //sysnb Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64
12 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
13 |
14 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
15 |
16 | func setTimespec(sec, nsec int64) Timespec {
17 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
18 | }
19 |
20 | func setTimeval(sec, usec int64) Timeval {
21 | return Timeval{Sec: int32(sec), Usec: int32(usec)}
22 | }
23 |
24 | func (iov *Iovec) SetLen(length int) {
25 | iov.Len = uint32(length)
26 | }
27 |
28 | func (msghdr *Msghdr) SetControllen(length int) {
29 | msghdr.Controllen = uint32(length)
30 | }
31 |
32 | func (cmsg *Cmsghdr) SetLen(length int) {
33 | cmsg.Len = uint32(length)
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix
6 | // +build ppc64
7 |
8 | package unix
9 |
10 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
11 | //sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
12 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek
13 |
14 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64
15 |
16 | func setTimespec(sec, nsec int64) Timespec {
17 | return Timespec{Sec: sec, Nsec: nsec}
18 | }
19 |
20 | func setTimeval(sec, usec int64) Timeval {
21 | return Timeval{Sec: int64(sec), Usec: int32(usec)}
22 | }
23 |
24 | func (iov *Iovec) SetLen(length int) {
25 | iov.Len = uint64(length)
26 | }
27 |
28 | func (msghdr *Msghdr) SetControllen(length int) {
29 | msghdr.Controllen = uint32(length)
30 | }
31 |
32 | func (cmsg *Cmsghdr) SetLen(length int) {
33 | cmsg.Len = uint32(length)
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,linux
6 | // +build !gccgo
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | //go:noescape
13 | func gettimeofday(tv *Timeval) (err syscall.Errno)
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,!gccgo
6 |
7 | package unix
8 |
9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail.
10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
11 |
12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't
13 | // fail.
14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,!gccgo,386
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | // Underlying system call writes to newoffset via pointer.
12 | // Implemented in assembly to avoid allocation.
13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
14 |
15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,gccgo,386
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
24 | return int(fd), err
25 | }
26 |
27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
29 | return int(fd), err
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,gccgo,arm
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm64,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386,openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
36 | // of openbsd/386 the syscall is called sysctl instead of __sysctl.
37 | const SYS___SYSCTL = SYS_SYSCTL
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
36 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
37 | const SYS___SYSCTL = SYS_SYSCTL
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm,openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
36 | // of openbsd/arm the syscall is called sysctl instead of __sysctl.
37 | const SYS___SYSCTL = SYS_SYSCTL
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,solaris
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func (iov *Iovec) SetLen(length int) {
18 | iov.Len = uint64(length)
19 | }
20 |
21 | func (cmsg *Cmsghdr) SetLen(length int) {
22 | cmsg.Len = uint32(length)
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 | // +build !gccgo,!ppc64le,!ppc64
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build ppc64le ppc64
7 | // +build !gccgo
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
14 | return syscall.Syscall(trap, a1, a2, a3)
15 | }
16 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
17 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6)
18 | }
19 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
20 | return syscall.RawSyscall(trap, a1, a2, a3)
21 | }
22 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
23 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6)
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/aliases.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows
6 | // +build go1.9
7 |
8 | package windows
9 |
10 | import "syscall"
11 |
12 | type Errno = syscall.Errno
13 | type SysProcAttr = syscall.SysProcAttr
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/asm_windows_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //
6 | // System calls for 386, Windows are implemented in runtime/syscall_windows.goc
7 | //
8 |
9 | TEXT ·getprocaddress(SB), 7, $0-16
10 | JMP syscall·getprocaddress(SB)
11 |
12 | TEXT ·loadlibrary(SB), 7, $0-12
13 | JMP syscall·loadlibrary(SB)
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/asm_windows_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //
6 | // System calls for amd64, Windows are implemented in runtime/syscall_windows.goc
7 | //
8 |
9 | TEXT ·getprocaddress(SB), 7, $0-32
10 | JMP syscall·getprocaddress(SB)
11 |
12 | TEXT ·loadlibrary(SB), 7, $0-24
13 | JMP syscall·loadlibrary(SB)
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/asm_windows_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | #include "textflag.h"
6 |
7 | TEXT ·getprocaddress(SB),NOSPLIT,$0
8 | B syscall·getprocaddress(SB)
9 |
10 | TEXT ·loadlibrary(SB),NOSPLIT,$0
11 | B syscall·loadlibrary(SB)
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/env_windows.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Windows environment variables.
6 |
7 | package windows
8 |
9 | import "syscall"
10 |
11 | func Getenv(key string) (value string, found bool) {
12 | return syscall.Getenv(key)
13 | }
14 |
15 | func Setenv(key, value string) error {
16 | return syscall.Setenv(key, value)
17 | }
18 |
19 | func Clearenv() {
20 | syscall.Clearenv()
21 | }
22 |
23 | func Environ() []string {
24 | return syscall.Environ()
25 | }
26 |
27 | func Unsetenv(key string) error {
28 | return syscall.Unsetenv(key)
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/eventlog.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows
6 |
7 | package windows
8 |
9 | const (
10 | EVENTLOG_SUCCESS = 0
11 | EVENTLOG_ERROR_TYPE = 1
12 | EVENTLOG_WARNING_TYPE = 2
13 | EVENTLOG_INFORMATION_TYPE = 4
14 | EVENTLOG_AUDIT_SUCCESS = 8
15 | EVENTLOG_AUDIT_FAILURE = 16
16 | )
17 |
18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW
19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource
20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/memory_windows.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package windows
6 |
7 | const (
8 | MEM_COMMIT = 0x00001000
9 | MEM_RESERVE = 0x00002000
10 | MEM_DECOMMIT = 0x00004000
11 | MEM_RELEASE = 0x00008000
12 | MEM_RESET = 0x00080000
13 | MEM_TOP_DOWN = 0x00100000
14 | MEM_WRITE_WATCH = 0x00200000
15 | MEM_PHYSICAL = 0x00400000
16 | MEM_RESET_UNDO = 0x01000000
17 | MEM_LARGE_PAGES = 0x20000000
18 |
19 | PAGE_NOACCESS = 0x01
20 | PAGE_READONLY = 0x02
21 | PAGE_READWRITE = 0x04
22 | PAGE_WRITECOPY = 0x08
23 | PAGE_EXECUTE_READ = 0x20
24 | PAGE_EXECUTE_READWRITE = 0x40
25 | PAGE_EXECUTE_WRITECOPY = 0x80
26 | )
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/mksyscall.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package windows
6 |
7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go
8 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/race.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows,race
6 |
7 | package windows
8 |
9 | import (
10 | "runtime"
11 | "unsafe"
12 | )
13 |
14 | const raceenabled = true
15 |
16 | func raceAcquire(addr unsafe.Pointer) {
17 | runtime.RaceAcquire(addr)
18 | }
19 |
20 | func raceReleaseMerge(addr unsafe.Pointer) {
21 | runtime.RaceReleaseMerge(addr)
22 | }
23 |
24 | func raceReadRange(addr unsafe.Pointer, len int) {
25 | runtime.RaceReadRange(addr, len)
26 | }
27 |
28 | func raceWriteRange(addr unsafe.Pointer, len int) {
29 | runtime.RaceWriteRange(addr, len)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/race0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows,!race
6 |
7 | package windows
8 |
9 | import (
10 | "unsafe"
11 | )
12 |
13 | const raceenabled = false
14 |
15 | func raceAcquire(addr unsafe.Pointer) {
16 | }
17 |
18 | func raceReleaseMerge(addr unsafe.Pointer) {
19 | }
20 |
21 | func raceReadRange(addr unsafe.Pointer, len int) {
22 | }
23 |
24 | func raceWriteRange(addr unsafe.Pointer, len int) {
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/str.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows
6 |
7 | package windows
8 |
9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency
10 | if val < 0 {
11 | return "-" + itoa(-val)
12 | }
13 | var buf [32]byte // big enough for int64
14 | i := len(buf) - 1
15 | for val >= 10 {
16 | buf[i] = byte(val%10 + '0')
17 | i--
18 | val /= 10
19 | }
20 | buf[i] = byte(val + '0')
21 | return string(buf[i:])
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/types_windows_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package windows
6 |
7 | type WSAData struct {
8 | Version uint16
9 | HighVersion uint16
10 | Description [WSADESCRIPTION_LEN + 1]byte
11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte
12 | MaxSockets uint16
13 | MaxUdpDg uint16
14 | VendorInfo *byte
15 | }
16 |
17 | type Servent struct {
18 | Name *byte
19 | Aliases **byte
20 | Port uint16
21 | Proto *byte
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/types_windows_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package windows
6 |
7 | type WSAData struct {
8 | Version uint16
9 | HighVersion uint16
10 | MaxSockets uint16
11 | MaxUdpDg uint16
12 | VendorInfo *byte
13 | Description [WSADESCRIPTION_LEN + 1]byte
14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte
15 | }
16 |
17 | type Servent struct {
18 | Name *byte
19 | Aliases **byte
20 | Proto *byte
21 | Port uint16
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/types_windows_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package windows
6 |
7 | type WSAData struct {
8 | Version uint16
9 | HighVersion uint16
10 | Description [WSADESCRIPTION_LEN + 1]byte
11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte
12 | MaxSockets uint16
13 | MaxUdpDg uint16
14 | VendorInfo *byte
15 | }
16 |
17 | type Servent struct {
18 | Name *byte
19 | Aliases **byte
20 | Port uint16
21 | Proto *byte
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.10
6 |
7 | package bidirule
8 |
9 | func (t *Transformer) isFinal() bool {
10 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !go1.10
6 |
7 | package bidirule
8 |
9 | func (t *Transformer) isFinal() bool {
10 | if !t.isRTL() {
11 | return true
12 | }
13 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/time/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/time/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/web/frpc/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["es2015", { "modules": false }]
4 | ],
5 | "plugins": [
6 | [
7 | "component",
8 | {
9 | "libraryName": "element-ui",
10 | "styleLibraryName": "theme-chalk"
11 | }
12 | ]
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/web/frpc/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log
5 | .idea
6 | .vscode/settings.json
7 |
--------------------------------------------------------------------------------
/web/frpc/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: dist build
2 | build:
3 | @npm run build
4 |
5 | dev:
6 | @npm run dev
7 |
--------------------------------------------------------------------------------
/web/frpc/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: [
3 | require('autoprefixer')()
4 | ]
5 | }
--------------------------------------------------------------------------------
/web/frpc/src/assets/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/baibaicloud/frp/5578e46a0a83ca34d935dc314018945b91f08697/web/frpc/src/assets/favicon.ico
--------------------------------------------------------------------------------
/web/frpc/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | frp client admin UI
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/web/frpc/src/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 | import Overview from '../components/Overview.vue'
4 | import Configure from '../components/Configure.vue'
5 |
6 | Vue.use(Router)
7 |
8 | export default new Router({
9 | routes: [{
10 | path: '/',
11 | name: 'Overview',
12 | component: Overview
13 | },{
14 | path: '/configure',
15 | name: 'Configure',
16 | component: Configure,
17 | }]
18 | })
19 |
--------------------------------------------------------------------------------
/web/frpc/src/utils/less/custom.less:
--------------------------------------------------------------------------------
1 | @color: red;
2 |
3 | .el-form-item {
4 | span {
5 | margin-left: 15px;
6 | }
7 | }
8 |
9 | .demo-table-expand {
10 | font-size: 0;
11 |
12 | label {
13 | width: 90px;
14 | color: #99a9bf;
15 | }
16 |
17 | .el-form-item {
18 | margin-right: 0;
19 | margin-bottom: 0;
20 | width: 50%;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/web/frpc/src/utils/status.js:
--------------------------------------------------------------------------------
1 | class ProxyStatus {
2 | constructor(status) {
3 | this.name = status.name
4 | this.type = status.type
5 | this.status = status.status
6 | this.err = status.err
7 | this.local_addr = status.local_addr
8 | this.plugin = status.plugin
9 | this.remote_addr = status.remote_addr
10 | }
11 | }
12 |
13 | export {ProxyStatus}
14 |
--------------------------------------------------------------------------------
/web/frps/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["es2015", { "modules": false }]
4 | ],
5 | "plugins": [
6 | [
7 | "component",
8 | {
9 | "libraryName": "element-ui",
10 | "styleLibraryName": "theme-chalk"
11 | }
12 | ]
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/web/frps/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log
5 | .idea
6 | .vscode/settings.json
7 |
--------------------------------------------------------------------------------
/web/frps/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: dist build
2 |
3 | build:
4 | @npm run build
5 |
6 | dev: install
7 | @npm run dev
8 |
--------------------------------------------------------------------------------
/web/frps/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: [
3 | require('autoprefixer')()
4 | ]
5 | }
--------------------------------------------------------------------------------
/web/frps/src/assets/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/baibaicloud/frp/5578e46a0a83ca34d935dc314018945b91f08697/web/frps/src/assets/favicon.ico
--------------------------------------------------------------------------------
/web/frps/src/components/Traffic.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
34 |
35 |
37 |
--------------------------------------------------------------------------------
/web/frps/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | frps dashboard
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/web/frps/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | //import ElementUI from 'element-ui'
3 | import {
4 | Button,
5 | Form,
6 | FormItem,
7 | Row,
8 | Col,
9 | Table,
10 | TableColumn,
11 | Popover,
12 | Menu,
13 | Submenu,
14 | MenuItem,
15 | Tag
16 | } from 'element-ui'
17 | import lang from 'element-ui/lib/locale/lang/en'
18 | import locale from 'element-ui/lib/locale'
19 | import 'element-ui/lib/theme-chalk/index.css'
20 | import './utils/less/custom.less'
21 |
22 | import App from './App.vue'
23 | import router from './router'
24 | import 'whatwg-fetch'
25 |
26 | locale.use(lang)
27 |
28 | Vue.use(Button)
29 | Vue.use(Form)
30 | Vue.use(FormItem)
31 | Vue.use(Row)
32 | Vue.use(Col)
33 | Vue.use(Table)
34 | Vue.use(TableColumn)
35 | Vue.use(Popover)
36 | Vue.use(Menu)
37 | Vue.use(Submenu)
38 | Vue.use(MenuItem)
39 | Vue.use(Tag)
40 |
41 | Vue.config.productionTip = false
42 |
43 | new Vue({
44 | el: '#app',
45 | router,
46 | template: '',
47 | components: { App }
48 | })
49 |
--------------------------------------------------------------------------------
/web/frps/src/utils/less/custom.less:
--------------------------------------------------------------------------------
1 | @color: red;
2 |
3 | .el-form-item {
4 | span {
5 | margin-left: 15px;
6 | }
7 | }
8 |
9 | .demo-table-expand {
10 | font-size: 0;
11 |
12 | label {
13 | width: 90px;
14 | color: #99a9bf;
15 | }
16 |
17 | .el-form-item {
18 | margin-right: 0;
19 | margin-bottom: 0;
20 | width: 50%;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------