Skip to content

Commit 2c3c12d

Browse files
committed
utp enble flag added
1 parent 72d6639 commit 2c3c12d

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

cmd/cortex/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ var (
160160
utils.StorageTrackerFlag,
161161
utils.StorageDisableDHTFlag,
162162
utils.StorageDisableTCPFlag,
163+
utils.StorageEnableUTPFlag,
163164
utils.StorageFullFlag,
164165
utils.StorageModeFlag,
165166
utils.StorageBoostFlag,

cmd/cortex/usage.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ var AppHelpFlagGroups = []flagGroup{
225225
utils.StorageTrackerFlag,
226226
utils.StorageDisableDHTFlag,
227227
utils.StorageDisableTCPFlag,
228+
utils.StorageEnableUTPFlag,
228229
utils.StorageFullFlag,
229230
utils.StorageModeFlag,
230231
utils.StorageBoostFlag,

cmd/utils/flags.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,10 @@ var (
266266
Name: "storage.disable_tcp",
267267
Usage: "disable TCP network in FS (EXPERIMENTAL)",
268268
}
269+
StorageEnableUTPFlag = cli.BoolFlag{
270+
Name: "storage.utp",
271+
Usage: "enable UTP network in FS (EXPERIMENTAL)",
272+
}
269273
StorageFullFlag = cli.BoolFlag{
270274
Name: "storage.full",
271275
Usage: "download full file",
@@ -1683,7 +1687,8 @@ func SetTorrentFsConfig(ctx *cli.Context, cfg *torrentfs.Config) {
16831687
cfg.MaxActiveNum = ctx.GlobalInt(StorageMaxActiveFlag.Name)
16841688
cfg.Mode = ctx.GlobalString(StorageModeFlag.Name)
16851689
cfg.DisableDHT = ctx.GlobalBool(StorageDisableDHTFlag.Name)
1686-
//cfg.DisableTCP = ctx.GlobalBool(StorageDisableTCPFlag.Name)
1690+
cfg.DisableTCP = ctx.GlobalBool(StorageDisableTCPFlag.Name)
1691+
cfg.DisableUTP = !ctx.GlobalBool(StorageEnableUTPFlag.Name)
16871692
//cfg.FullSeed = ctx.GlobalBool(StorageFullFlag.Name)
16881693
//if cfg.Mode == "full" {
16891694
// cfg.FullSeed = true

0 commit comments

Comments
 (0)