提交 77221e5f 编写于 作者: A Alex Ross

Allow strings as host name for port forwarding

上级 af519ea9
......@@ -58,7 +58,7 @@ export function makeAddress(host: string, port: number): string {
}
export function parseAddress(address: string): { host: string, port: number } | undefined {
const matches = address.match(/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\:|localhost:)?([0-9]+)$/);
const matches = address.match(/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\:|localhost:|[a-zA-Z]+:)?([0-9]+)$/);
if (!matches) {
return undefined;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册