mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-05-24 10:58:15 +08:00
fix: set sni to servername if not specified for trojan outbound (#1991)
This commit is contained in:
parent
5dce957755
commit
468cfc3cc4
@ -295,6 +295,10 @@ func (t *Trojan) Close() error {
|
|||||||
func NewTrojan(option TrojanOption) (*Trojan, error) {
|
func NewTrojan(option TrojanOption) (*Trojan, error) {
|
||||||
addr := net.JoinHostPort(option.Server, strconv.Itoa(option.Port))
|
addr := net.JoinHostPort(option.Server, strconv.Itoa(option.Port))
|
||||||
|
|
||||||
|
if option.SNI == "" {
|
||||||
|
option.SNI = option.Server
|
||||||
|
}
|
||||||
|
|
||||||
t := &Trojan{
|
t := &Trojan{
|
||||||
Base: &Base{
|
Base: &Base{
|
||||||
name: option.Name,
|
name: option.Name,
|
||||||
|
Loading…
Reference in New Issue
Block a user