Refine must2 and apply NewAesGcm() to all usage (#5011)

* Refine must2 and apply NewAesGcm() to all usage

* Remove unused package

* Fix test
This commit is contained in:
风扇滑翔翼
2025-08-11 09:37:46 +08:00
committed by GitHub
parent 0cceea75da
commit b1107b9810
12 changed files with 37 additions and 96 deletions

View File

@@ -297,7 +297,7 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
if transportConfiguration.DownloadSettings != nil {
globalDialerAccess.Lock()
if streamSettings.DownloadSettings == nil {
streamSettings.DownloadSettings = common.Must2(internet.ToMemoryStreamConfig(transportConfiguration.DownloadSettings)).(*internet.MemoryStreamConfig)
streamSettings.DownloadSettings = common.Must2(internet.ToMemoryStreamConfig(transportConfiguration.DownloadSettings))
if streamSettings.SocketSettings != nil && streamSettings.SocketSettings.Penetrate {
streamSettings.DownloadSettings.SocketSettings = streamSettings.SocketSettings
}