Skip to content

Commit 265eeec

Browse files
committed
.
1 parent 1405e92 commit 265eeec

3 files changed

Lines changed: 223 additions & 9 deletions

File tree

‎.gitignore‎

Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# User-specific files
5+
*.suo
6+
*.user
7+
*.userosscache
8+
*.sln.docstates
9+
10+
# User-specific files (MonoDevelop/Xamarin Studio)
11+
*.userprefs
12+
13+
# Build results
14+
[Dd]ebug/
15+
[Dd]ebugPublic/
16+
[Rr]elease/
17+
[Rr]eleases/
18+
x64/
19+
x86/
20+
build/
21+
bld/
22+
[Bb]in/
23+
[Oo]bj/
24+
25+
#ASP.NET Data dir
26+
App_Data/
27+
28+
#Entity Framework migrations
29+
Migrations/
30+
31+
# Visual Studio 2015 cache/options directory
32+
.vs/
33+
34+
# MSTest test Results
35+
[Tt]est[Rr]esult*/
36+
[Bb]uild[Ll]og.*
37+
38+
# NUNIT
39+
*.VisualState.xml
40+
TestResult.xml
41+
42+
# Build Results of an ATL Project
43+
[Dd]ebugPS/
44+
[Rr]eleasePS/
45+
dlldata.c
46+
47+
# DNX
48+
project.lock.json
49+
artifacts/
50+
51+
*_i.c
52+
*_p.c
53+
*_i.h
54+
*.ilk
55+
*.meta
56+
*.obj
57+
*.pch
58+
*.pdb
59+
*.pgc
60+
*.pgd
61+
*.rsp
62+
*.sbr
63+
*.tlb
64+
*.tli
65+
*.tlh
66+
*.tmp
67+
*.tmp_proj
68+
*.log
69+
*.vspscc
70+
*.vssscc
71+
.builds
72+
*.pidb
73+
*.svclog
74+
*.scc
75+
76+
# Chutzpah Test files
77+
_Chutzpah*
78+
79+
# Visual C++ cache files
80+
ipch/
81+
*.aps
82+
*.ncb
83+
*.opensdf
84+
*.sdf
85+
*.cachefile
86+
87+
# Visual Studio profiler
88+
*.psess
89+
*.vsp
90+
*.vspx
91+
92+
# TFS 2012 Local Workspace
93+
$tf/
94+
95+
# Guidance Automation Toolkit
96+
*.gpState
97+
98+
# ReSharper is a .NET coding add-in
99+
_ReSharper*/
100+
*.[Rr]e[Ss]harper
101+
*.DotSettings.user
102+
103+
# JustCode is a .NET coding add-in
104+
.JustCode
105+
106+
# TeamCity is a build add-in
107+
_TeamCity*
108+
109+
# DotCover is a Code Coverage Tool
110+
*.dotCover
111+
112+
# NCrunch
113+
_NCrunch_*
114+
.*crunch*.local.xml
115+
116+
# MightyMoose
117+
*.mm.*
118+
AutoTest.Net/
119+
120+
# Web workbench (sass)
121+
.sass-cache/
122+
123+
# Installshield output folder
124+
[Ee]xpress/
125+
126+
# DocProject is a documentation generator add-in
127+
DocProject/buildhelp/
128+
DocProject/Help/*.HxT
129+
DocProject/Help/*.HxC
130+
DocProject/Help/*.hhc
131+
DocProject/Help/*.hhk
132+
DocProject/Help/*.hhp
133+
DocProject/Help/Html2
134+
DocProject/Help/html
135+
136+
# Click-Once directory
137+
publish/
138+
139+
# Publish Web Output
140+
*.[Pp]ublish.xml
141+
*.azurePubxml
142+
## TODO: Comment the next line if you want to checkin your
143+
## web deploy settings but do note that will include unencrypted
144+
## passwords
145+
#*.pubxml
146+
147+
*.publishproj
148+
149+
# NuGet Packages
150+
*.nupkg
151+
# The packages folder can be ignored because of Package Restore
152+
**/packages/*
153+
# except build/, which is used as an MSBuild target.
154+
!**/packages/build/
155+
# Uncomment if necessary however generally it will be regenerated when needed
156+
#!**/packages/repositories.config
157+
158+
# Windows Azure Build Output
159+
csx/
160+
*.build.csdef
161+
162+
# Windows Store app package directory
163+
AppPackages/
164+
165+
# Visual Studio cache files
166+
# files ending in .cache can be ignored
167+
*.[Cc]ache
168+
# but keep track of directories ending in .cache
169+
!*.[Cc]ache/
170+
171+
# Others
172+
ClientBin/
173+
[Ss]tyle[Cc]op.*
174+
~$*
175+
*~
176+
*.dbmdl
177+
*.dbproj.schemaview
178+
*.pfx
179+
*.publishsettings
180+
node_modules/
181+
orleans.codegen.cs
182+
183+
# RIA/Silverlight projects
184+
Generated_Code/
185+
186+
# Backup & report files from converting an old project file
187+
# to a newer Visual Studio version. Backup files are not needed,
188+
# because we have git ;-)
189+
_UpgradeReport_Files/
190+
Backup*/
191+
UpgradeLog*.XML
192+
UpgradeLog*.htm
193+
194+
# SQL Server files
195+
*.mdf
196+
*.ldf
197+
198+
# Business Intelligence projects
199+
*.rdl.data
200+
*.bim.layout
201+
*.bim_*.settings
202+
203+
# Microsoft Fakes
204+
FakesAssemblies/
205+
206+
# Node.js Tools for Visual Studio
207+
.ntvs_analysis.dat
208+
209+
# Visual Studio 6 build log
210+
*.plg
211+
212+
# Visual Studio 6 workspace options file
213+
*.opt
214+
215+
# LightSwitch generated files
216+
GeneratedArtifacts/
217+
_Pvt_Extensions/
218+
ModelManifest.xml

‎ss-libev-gui/Form1.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ private void Form1_Load(object sender, EventArgs e)
2222
JSONIO.checkConfigExit();
2323
var server = JSONIO.LoadFromFile() ?? new ServerInfo();
2424
StopClient.Enabled = false;
25-
for(int i = 0; i < DStoCombobox.method.Count; i++) {
26-
methodBox.Items.Insert(i, DStoCombobox.method[i]);
25+
for(int i = 0; i < JSONIO.method.Count; i++) {
26+
methodBox.Items.Insert(i, JSONIO.method[i]);
2727
}
2828
methodBox.SelectedIndex = JSONIO.AEAD_MethodNum(server);
2929
methodBox.DropDownStyle = ComboBoxStyle.DropDownList;

‎ss-libev-gui/JSONIO.cs‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,9 @@ public string plugin_opts {
5454
}
5555
}
5656

57-
static class DStoCombobox
58-
{
59-
public static IReadOnlyList<string> method = new string[6] { "aes-128-cfb", "rc4-md5", "chacha20", "aes-128-ctr", "aes-128-gcm", "chacha20-ietf-poly1305" };
60-
}
61-
6257
static class JSONIO
6358
{
59+
public static IReadOnlyList<string> method = new string[6] { "aes-128-cfb", "rc4-md5", "chacha20", "aes-128-ctr", "aes-128-gcm", "chacha20-ietf-poly1305" };
6460
private static ThreadLocal<Regex> rx0 = new ThreadLocal<Regex>(() => new Regex("obfs=http;.*", RegexOptions.Compiled));
6561
private static ThreadLocal<Regex> rx1 = new ThreadLocal<Regex>(() => new Regex("obfs=tls;.*", RegexOptions.Compiled));
6662

@@ -92,8 +88,8 @@ public static int AEAD_MethodNum(ServerInfo s)
9288
if(s.method == null) {
9389
return 0;
9490
} else {
95-
for(var i = 0; i < DStoCombobox.method.Count; i++) {
96-
if(s.method == DStoCombobox.method[i]) {
91+
for(var i = 0; i < method.Count; i++) {
92+
if(s.method == method[i]) {
9793
return i;
9894
}
9995
}

0 commit comments

Comments
 (0)