How to setup an Outline VPN Server on Ubuntu 16.04 Server
This guide will show you how to install Outline Server on an Ubuntu 16.04 Server and use Outline Manager.
Outline Manager supports Windows, macOS and Linux.
using System; | |
using System.Runtime.Caching; | |
namespace Hasin.Taaghche.Utilities | |
{ | |
// Use this class to put restriction on the number of invocations of an endpoint in your system by a given input. | |
// E.g., when a user wants to login with "test@test.com", call CanProceed("test@test.com") to check if she can do that. | |
public class RateLimiter | |
{ | |
private readonly MemoryCache _cache; |
public static class Extension | |
{ | |
public static IList<T> ToList<T>(this DataTable dt, bool isFirstRowColumnsHeader = false) where T : new() | |
{ | |
var results = new List<T>(); | |
if (dt != null && dt.Rows.Count > 0) | |
{ | |
var columns = dt.Columns.Cast<DataColumn>().ToList(); | |
var rows = dt.Rows.Cast<DataRow>().ToList(); |
<#@ template language="C#" debug="true" hostSpecific="true" #> | |
<#@ output extension=".cs" #> | |
<#@ Assembly Name="System.Core.dll" #> | |
<#@ assembly name="EnvDTE" #> | |
<#@ Assembly Name="System.Windows.Forms.dll" #> | |
<#@ Assembly name="System.Configuration"#> | |
<#@ import namespace="System" #> | |
<#@ import namespace="System.IO" #> | |
<#@ import namespace="System.Diagnostics" #> | |
<#@ import namespace="System.Linq" #> |
namespace Optimization.Custom | |
{ | |
using System.Collections.Generic; | |
using System.Web; | |
using System.Text; | |
using System.Web.Mvc; | |
using System.Web.Optimization; | |
using System.Web.Routing; | |
/// <summary> |
OneWayToSource Binding seems broken in .NET 4.0
public class NumericTextBox : TextBox | |
{ | |
private const char Delete = (char)8; | |
private const char Backspace = '\b'; | |
public bool IsNumeric { get; set; } = false; | |
public new string Text | |
{ | |
get { return IsNumeric ? base.Text?.Replace(",", "") : base.Text; } |
<#@ template language="C#" hostspecific="true" #> | |
<#@ import namespace="System.IO" #> | |
<#@ import namespace="System.Text.RegularExpressions" #> | |
<#@ output extension=".txt" #> | |
//------------------------------------------------------------------------------ | |
// <auto-generated> | |
// This code was generated by a tool. | |
// Runtime Version:4.0.30319.42000 | |
// |
{ | |
... | |
ServicePointManager.ServerCertificateValidationCallback = | |
delegate(object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { | |
return true; | |
}; | |
smtpclient.Send(); | |
... | |
} |