-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
106 changed files
with
147 additions
and
63 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Submodule CsharpNugetPush
deleted from
6ed641
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Net; | ||
using System.Net.Sockets; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using TqkLibrary.Proxy.Authentications; | ||
using TqkLibrary.Proxy.Interfaces; | ||
using TqkLibrary.Proxy.ProxyServers; | ||
using TqkLibrary.Proxy.ProxySources; | ||
|
||
namespace ConsoleTest | ||
{ | ||
internal static class ProxyWraper | ||
{ | ||
const string listen = "0.0.0.0:16615"; | ||
public static async Task RunAsync() | ||
{ | ||
//string strHostName = Dns.GetHostName(); | ||
//IPHostEntry iPHostEntry = Dns.GetHostEntry(strHostName); | ||
//IPAddress? ipaddress = null; | ||
|
||
//ipaddress = iPHostEntry | ||
// .AddressList | ||
// .FirstOrDefault(ip => ip.AddressFamily == AddressFamily.InterNetwork); | ||
|
||
IPEndPoint ipEndPoint = IPEndPoint.Parse(listen); | ||
//if (ipaddress is not null) | ||
//{ | ||
// ipEndPoint = new IPEndPoint(ipaddress, 0); | ||
//} | ||
|
||
//ipEndPoint = new IPEndPoint(IPAddress.Any, 0); | ||
|
||
using var server = new HttpProxyServer(ipEndPoint, GetProxySource()); | ||
server.StartListen(); | ||
Console.WriteLine($"Listening {server.IPEndPoint}"); | ||
Console.ReadLine(); | ||
} | ||
|
||
static IProxySource GetProxySource() | ||
{ | ||
//HttpProxyAuthentication? auth = null;// new HttpProxyAuthentication("", ""); | ||
//HttpProxySource httpProxySource = new HttpProxySource(new Uri("http://88.99.245.58:8903")); | ||
//Socks4ProxySource socks4ProxySource = new Socks4ProxySource(IPEndPoint.Parse("93.104.63.65:80")); | ||
//Socks5ProxySource socks5ProxySource = new Socks5ProxySource(IPEndPoint.Parse("138.201.120.118:29127")); | ||
LocalProxySource localProxySource = new LocalProxySource(); | ||
|
||
return localProxySource; | ||
} | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
param ( | ||
[string]$buildIndex="00" | ||
) | ||
$workingDir = Get-Location | ||
$dirInfo= New-Object -Typename System.IO.DirectoryInfo -ArgumentList ($workingDir) | ||
$projectName= $dirInfo.Name; | ||
$key=$env:nugetKey | ||
$buildDay=[DateTime]::Now.ToString("yyyyMMdd") | ||
$p="buildDay=$($buildDay);buildIndex=$($buildIndex)".Trim() | ||
$build="Release" | ||
|
||
function RunCommand | ||
{ | ||
$numOfArgs = $args.Length | ||
for ($i=0; $i -lt $numOfArgs; $i++) | ||
{ | ||
iex $args[$i] | ||
if($LASTEXITCODE -eq 0 -or $i -eq 0) { | ||
Write-Host "$($args[$i]) success" | ||
} | ||
else{ | ||
Write-Host "$($args[$i]) failed" | ||
return 0 | ||
} | ||
} | ||
return 1 | ||
} | ||
|
||
function NugetPack | ||
{ | ||
$numOfArgs = $args.Length | ||
for ($i=0; $i -lt $numOfArgs; $i++) | ||
{ | ||
Write-Host "NugetPack $($args[$i])" | ||
|
||
$result = RunCommand "Remove-Item -Recurse -Force .\bin\$($build)\**" ` | ||
"dotnet build .\$($args[$i]).csproj -c $($build)" ` | ||
"nuget pack .\$($args[$i]).nuspec -Symbols -OutputDirectory .\bin\$($build) -p 'id=$($args[$i]);$($p)'" | ||
|
||
if($result) { | ||
Write-Host "$($args[$i]) success" | ||
} | ||
else{ | ||
Write-Host "$($args[$i]) failed" | ||
return 0 | ||
} | ||
} | ||
return 1 | ||
} | ||
|
||
function NugetPush | ||
{ | ||
$numOfArgs = $args.Length | ||
for ($i=0; $i -lt $numOfArgs; $i++) | ||
{ | ||
Write-Host "NugetPush $($args[$i])" | ||
|
||
$files = [System.IO.Directory]::GetFiles(".\bin\$($build)\") | ||
iex "nuget push $($files[0]) -ApiKey $($key) -Source https://api.nuget.org/v3/index.json" | ||
} | ||
} | ||
|
||
$result = NugetPack $projectName | ||
if($result) | ||
{ | ||
if([string]::IsNullOrEmpty($key)) | ||
{ | ||
Write-Host "Build & pack success" | ||
} | ||
else | ||
{ | ||
Write-Host "enter to push nuget" | ||
pause | ||
Write-Host "enter to confirm" | ||
pause | ||
|
||
NugetPush $projectName | ||
} | ||
} | ||
else | ||
{ | ||
echo "Build & pack error" | ||
} | ||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# CsharpNugetPush |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.