rename
circlesuck
This commit is contained in:
parent
55a939e0cc
commit
4781305304
38 changed files with 48 additions and 63 deletions
|
@ -3,9 +3,9 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Square.INI;
|
||||
using Glove.INI;
|
||||
|
||||
namespace CircleScape {
|
||||
namespace SockScape {
|
||||
public static class Configuration {
|
||||
private static SettingsFile Settings;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ using System.Net;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CircleScape.DAL {
|
||||
namespace SockScape.DAL {
|
||||
public partial class Origin {
|
||||
public long Id { get; set; }
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
namespace CircleScape.DAL {
|
||||
namespace SockScape.DAL {
|
||||
using System;
|
||||
using System.Data.Entity;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
|
|
@ -6,7 +6,7 @@ using System.Net;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CircleScape.DAL {
|
||||
namespace SockScape.DAL {
|
||||
public partial class Session {
|
||||
public long Id { get; set; }
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CircleScape.DAL {
|
||||
namespace SockScape.DAL {
|
||||
public partial class User {
|
||||
public long Id { get; set; }
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Numerics;
|
||||
using Square;
|
||||
using Glove;
|
||||
|
||||
namespace CircleScape.Encryption {
|
||||
namespace SockScape.Encryption {
|
||||
class Cipher {
|
||||
private byte[] Key = new byte[512 / 8];
|
||||
private byte[] State = new byte[256];
|
||||
|
|
|
@ -4,10 +4,10 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Numerics;
|
||||
using Square;
|
||||
using Glove;
|
||||
using System.Globalization;
|
||||
|
||||
namespace CircleScape.Encryption {
|
||||
namespace SockScape.Encryption {
|
||||
class Key {
|
||||
private readonly static BigInteger Secret = RNG.NextPrime(512 / 8);
|
||||
public BigInteger Generator { get; private set; } = 2;
|
||||
|
|
|
@ -5,11 +5,11 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
//using CircleScape.DAL;
|
||||
using System.Numerics;
|
||||
using Square;
|
||||
using Glove;
|
||||
using System.Net;
|
||||
using Kneesocks;
|
||||
|
||||
namespace CircleScape {
|
||||
namespace SockScape {
|
||||
class Entrypoint {
|
||||
static void Main(string[] args) {
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Square {
|
||||
namespace Glove {
|
||||
public static class ArrayExtensions {
|
||||
public static T[] Subset<T>(this T[] arr, int offset, int count = -1) {
|
||||
var arrEnum = arr.AsEnumerable();
|
|
@ -5,7 +5,7 @@ using System.Security.Cryptography;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Square {
|
||||
namespace Glove {
|
||||
public static class CryptoExtensions {
|
||||
public static byte[] SHA1(this string str)
|
||||
=> Encoding.UTF8.GetBytes(str).SHA1();
|
|
@ -4,7 +4,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Square {
|
||||
namespace Glove {
|
||||
public static class Utils {
|
||||
public static void Swap<T>(ref T a, ref T b) {
|
||||
T c = a;
|
|
@ -5,7 +5,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Square.INI {
|
||||
namespace Glove.INI {
|
||||
public class Instance : IEnumerable<KeyValuePair<string, Value>> {
|
||||
private Dictionary<string, Value> Data
|
||||
= new Dictionary<string, Value>(StringComparer.OrdinalIgnoreCase);
|
|
@ -5,7 +5,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Square.INI {
|
||||
namespace Glove.INI {
|
||||
public class Section : IEnumerable<Instance> {
|
||||
private List<Instance> Instances = new List<Instance>();
|
||||
|
|
@ -4,7 +4,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Square.INI {
|
||||
namespace Glove.INI {
|
||||
public class SectionRules {
|
||||
public string Name { get; set; }
|
||||
public bool Required { get; set; } = true;
|
|
@ -5,7 +5,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Square.INI {
|
||||
namespace Glove.INI {
|
||||
public class SettingsFile {
|
||||
private Dictionary<string, Section> Sections
|
||||
= new Dictionary<string, Section>(StringComparer.OrdinalIgnoreCase);
|
|
@ -4,7 +4,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Square.INI {
|
||||
namespace Glove.INI {
|
||||
public class Value {
|
||||
private string Raw;
|
||||
|
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||
using System.Numerics;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Square {
|
||||
namespace Glove {
|
||||
public static class NumericExtensions {
|
||||
public static byte[] Pack(this Single value)
|
||||
=> BitConverter.GetBytes(value).HostToNetworkOrder();
|
|
@ -5,7 +5,7 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using System.Numerics;
|
||||
|
||||
namespace Square {
|
||||
namespace Glove {
|
||||
public static class RNG {
|
||||
private static Random RandCtx = new Random();
|
||||
|
|
@ -4,7 +4,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Square {
|
||||
namespace Glove {
|
||||
public static class StringExtensions {
|
||||
public static byte[] GetBytes(this string str, bool isUtf8 = true)
|
||||
=> isUtf8 ? Encoding.UTF8.GetBytes(str)
|
|
@ -4,7 +4,7 @@ using System.Linq;
|
|||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Square;
|
||||
using Glove;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Square;
|
||||
using Glove;
|
||||
|
||||
namespace Kneesocks {
|
||||
public class Frame {
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Square;
|
||||
using Glove;
|
||||
|
||||
namespace Kneesocks {
|
||||
public class Handshake {
|
||||
|
|
|
@ -50,9 +50,9 @@
|
|||
<Compile Include="Stack.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Square\Square.csproj">
|
||||
<ProjectReference Include="..\Square\Glove.csproj">
|
||||
<Project>{054f172e-9683-40bc-8bdd-7671340ec193}</Project>
|
||||
<Name>Square</Name>
|
||||
<Name>Glove</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// <auto-generated />
|
||||
namespace CircleScape.Migrations
|
||||
namespace SocjScape.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
namespace CircleScape.Migrations
|
||||
namespace SockScape.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
namespace CircleScape.Migrations
|
||||
namespace SockScape.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Linq;
|
||||
|
||||
internal sealed class Configuration : DbMigrationsConfiguration<CircleScape.DAL.ScapeDb>
|
||||
internal sealed class Configuration : DbMigrationsConfiguration<SockScape.DAL.ScapeDb>
|
||||
{
|
||||
public Configuration()
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace CircleScape.Migrations
|
|||
AutomaticMigrationsEnabled = false;
|
||||
}
|
||||
|
||||
protected override void Seed(CircleScape.DAL.ScapeDb context)
|
||||
protected override void Seed(SockScape.DAL.ScapeDb context)
|
||||
{
|
||||
// This method will be called after migrating to the latest version.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ using System.Net;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CircleScape {
|
||||
namespace SockScape {
|
||||
static class ServerList {
|
||||
public static Dictionary<int, IPEndPoint> Servers { get; private set; }
|
||||
= new Dictionary<int, IPEndPoint>();
|
||||
|
|
|
@ -125,9 +125,9 @@
|
|||
<Project>{347353f6-cecd-4895-8717-2b5394ac71cc}</Project>
|
||||
<Name>Kneesocks</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="Libraries\Square\Square.csproj">
|
||||
<ProjectReference Include="Libraries\Square\Glove.csproj">
|
||||
<Project>{054f172e-9683-40bc-8bdd-7671340ec193}</Project>
|
||||
<Name>Square</Name>
|
||||
<Name>Glove</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
|
@ -1,13 +1,13 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26430.6
|
||||
VisualStudioVersion = 15.0.26403.7
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CircleScape", "CircleScape.csproj", "{438DBAC1-BA37-40BB-9CCE-0FE1F23C6DC5}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SockScape", "SockScape.csproj", "{438DBAC1-BA37-40BB-9CCE-0FE1F23C6DC5}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kneesocks", "Libraries\Kneesocks\Kneesocks.csproj", "{347353F6-CECD-4895-8717-2B5394AC71CC}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Square", "Libraries\Square\Square.csproj", "{054F172E-9683-40BC-8BDD-7671340EC193}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Glove", "Libraries\Glove\Glove.csproj", "{054F172E-9683-40BC-8BDD-7671340EC193}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
@ -4,9 +4,9 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Kneesocks;
|
||||
using Square;
|
||||
using Glove;
|
||||
|
||||
namespace CircleScape.Socks {
|
||||
namespace SockScape.Socks {
|
||||
class MasterConnection : Connection {
|
||||
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CircleScape.Socks {
|
||||
namespace SockScape.Socks {
|
||||
class MasterUdpClient {
|
||||
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ using System.Text;
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CircleScape.Socks {
|
||||
namespace SockScape.Socks {
|
||||
static class MasterUdpServer {
|
||||
private static UdpClient Sock;
|
||||
private static Thread ListeningThread = null;
|
||||
|
|
|
@ -3,9 +3,9 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Square;
|
||||
using Glove;
|
||||
|
||||
namespace CircleScape {
|
||||
namespace SockScape {
|
||||
class Packet {
|
||||
public enum kId {
|
||||
KeyExchange = 0,
|
||||
|
|
|
@ -5,10 +5,10 @@ using System.Net.Sockets;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Kneesocks;
|
||||
using Square;
|
||||
using CircleScape.Encryption;
|
||||
using Glove;
|
||||
using SockScape.Encryption;
|
||||
|
||||
namespace CircleScape {
|
||||
namespace SockScape {
|
||||
class PlayerConnection : Connection {
|
||||
private DateTime ConnectionOpened;
|
||||
private Key Key;
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace What
|
||||
{
|
||||
public class INIFile {
|
||||
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard1.4</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
Loading…
Reference in a new issue