 989046da13
			
		
	
	989046da13
	
	
	
		
			
			fix bug more logging fix logging wtf is going on even handle lists in config log output do not set "*" as default continent do not rely on "*" being present in configuration when picking file shard
		
			
				
	
	
		
			47 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System.Text;
 | |
| 
 | |
| namespace MareSynchronosShared.Utils;
 | |
| 
 | |
| public class ServerConfiguration : MareConfigurationAuthBase
 | |
| {
 | |
|     [RemoteConfiguration]
 | |
|     public Uri CdnFullUrl { get; set; } = null;
 | |
| 
 | |
|     [RemoteConfiguration]
 | |
|     public Version ExpectedClientVersion { get; set; } = new Version(0, 0, 0);
 | |
| 
 | |
|     [RemoteConfiguration]
 | |
|     public int MaxExistingGroupsByUser { get; set; } = 3;
 | |
| 
 | |
|     [RemoteConfiguration]
 | |
|     public int MaxGroupUserCount { get; set; } = 100;
 | |
| 
 | |
|     [RemoteConfiguration]
 | |
|     public int MaxJoinedGroupsByUser { get; set; } = 6;
 | |
| 
 | |
|     [RemoteConfiguration]
 | |
|     public bool PurgeUnusedAccounts { get; set; } = false;
 | |
| 
 | |
|     [RemoteConfiguration]
 | |
|     public int PurgeUnusedAccountsPeriodInDays { get; set; } = 14;
 | |
|     public string GeoIPDbCountryFile { get; set; } = string.Empty;
 | |
| 
 | |
|     public int RedisPool { get; set; } = 50;
 | |
| 
 | |
|     public override string ToString()
 | |
|     {
 | |
|         StringBuilder sb = new();
 | |
|         sb.AppendLine(base.ToString());
 | |
|         sb.AppendLine($"{nameof(CdnFullUrl)} => {CdnFullUrl}");
 | |
|         sb.AppendLine($"{nameof(RedisConnectionString)} => {RedisConnectionString}");
 | |
|         sb.AppendLine($"{nameof(RedisPool)} => {RedisPool}");
 | |
|         sb.AppendLine($"{nameof(ExpectedClientVersion)} => {ExpectedClientVersion}");
 | |
|         sb.AppendLine($"{nameof(MaxExistingGroupsByUser)} => {MaxExistingGroupsByUser}");
 | |
|         sb.AppendLine($"{nameof(MaxJoinedGroupsByUser)} => {MaxJoinedGroupsByUser}");
 | |
|         sb.AppendLine($"{nameof(MaxGroupUserCount)} => {MaxGroupUserCount}");
 | |
|         sb.AppendLine($"{nameof(PurgeUnusedAccounts)} => {PurgeUnusedAccounts}");
 | |
|         sb.AppendLine($"{nameof(PurgeUnusedAccountsPeriodInDays)} => {PurgeUnusedAccountsPeriodInDays}");
 | |
|         sb.AppendLine($"{nameof(GeoIPDbCountryFile)} => {GeoIPDbCountryFile}");
 | |
|         return sb.ToString();
 | |
|     }
 | |
| } |