code cleanup
This commit is contained in:
@ -22,7 +22,7 @@ type Listener struct {
|
||||
var _listener *Listener
|
||||
|
||||
func New(config string, tcpIn chan<- C.ConnContext, udpIn chan<- *inbound.PacketAdapter) (*Listener, error) {
|
||||
addr, cipher, password, err := parseSSURL(config)
|
||||
addr, cipher, password, err := ParseSSURL(config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ func (c *packet) InAddr() net.Addr {
|
||||
return c.pc.LocalAddr()
|
||||
}
|
||||
|
||||
func parseSSURL(s string) (addr, cipher, password string, err error) {
|
||||
func ParseSSURL(s string) (addr, cipher, password string, err error) {
|
||||
u, err := url.Parse(s)
|
||||
if err != nil {
|
||||
return
|
||||
|
Reference in New Issue
Block a user