This commit is contained in:
2dust 2019-07-30 11:53:58 +08:00
parent ab37076adc
commit cf6c20b12e
118 changed files with 34060 additions and 170 deletions

811
LICENSE
View file

@ -1,201 +1,674 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
1. Definitions.
Preamble
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
The precise terms and conditions for copying, distribution and
modification follow.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
TERMS AND CONDITIONS
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
0. Definitions.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
"This License" refers to version 3 of the GNU General Public License.
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
A "covered work" means either the unmodified Program or a work based
on the Program.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
1. Source Code.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
END OF TERMS AND CONDITIONS
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
APPENDIX: How to apply the Apache License to your work.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
Copyright [yyyy] [name of copyright owner]
The Corresponding Source for a work in source code form is that
same work.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
2. Basic Permissions.
http://www.apache.org/licenses/LICENSE-2.0
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View file

@ -1 +1,10 @@
# v2rayN
# v2rayN
### How to use
- Download exe from release download
- Also need to download v2ray core in the same folder
- Run v2rayN.exe
### Requirements
- Microsoft [.NET Framework 4.6](https://docs.microsoft.com/zh-cn/dotnet/framework/install/guide-for-developers) or higher
- Project V core [https://github.com/v2ray/v2ray-core/releases](https://github.com/v2ray/v2ray-core/releases)

30
v2rayN/v2rayN.sln Normal file
View file

@ -0,0 +1,30 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2050
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "v2rayN", "v2rayN\v2rayN.csproj", "{0A9785E6-D256-4B73-9757-4EF59955FD1E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0A9785E6-D256-4B73-9757-4EF59955FD1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A9785E6-D256-4B73-9757-4EF59955FD1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A9785E6-D256-4B73-9757-4EF59955FD1E}.Debug|x86.ActiveCfg = Debug|Any CPU
{0A9785E6-D256-4B73-9757-4EF59955FD1E}.Debug|x86.Build.0 = Debug|Any CPU
{0A9785E6-D256-4B73-9757-4EF59955FD1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A9785E6-D256-4B73-9757-4EF59955FD1E}.Release|Any CPU.Build.0 = Release|Any CPU
{0A9785E6-D256-4B73-9757-4EF59955FD1E}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {56B88873-C9CC-4069-A1E5-DABD6C6E865E}
EndGlobalSection
EndGlobal

BIN
v2rayN/v2rayN.v11.suo Normal file

Binary file not shown.

View file

@ -0,0 +1,140 @@
namespace v2rayN.Forms
{
partial class AddServer2Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddServer2Form));
this.btnClose = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtAddress = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.txtRemarks = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.btnOK = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.groupBox1.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// btnClose
//
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnClose.Name = "btnClose";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// groupBox1
//
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Controls.Add(this.txtAddress);
this.groupBox1.Controls.Add(this.label13);
this.groupBox1.Controls.Add(this.txtRemarks);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// txtAddress
//
resources.ApplyResources(this.txtAddress, "txtAddress");
this.txtAddress.Name = "txtAddress";
//
// label13
//
resources.ApplyResources(this.label13, "label13");
this.label13.Name = "label13";
//
// txtRemarks
//
resources.ApplyResources(this.txtRemarks, "txtRemarks");
this.txtRemarks.Name = "txtRemarks";
//
// label6
//
resources.ApplyResources(this.label6, "label6");
this.label6.Name = "label6";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// panel2
//
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK);
this.panel2.Name = "panel2";
//
// btnOK
//
resources.ApplyResources(this.btnOK, "btnOK");
this.btnOK.Name = "btnOK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// AddServer2Form
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "AddServer2Form";
this.Load += new System.EventHandler(this.AddServer2Form_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.TextBox txtRemarks;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtAddress;
}
}

View file

@ -0,0 +1,75 @@
using System;
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class AddServer2Form : BaseForm
{
public int EditIndex { get; set; }
VmessItem vmessItem;
public AddServer2Form()
{
InitializeComponent();
}
private void AddServer2Form_Load(object sender, EventArgs e)
{
if (EditIndex >= 0)
{
BindingServer();
}
else
{
ClearServer();
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindingServer()
{
vmessItem = config.vmess[EditIndex];
txtRemarks.Text = vmessItem.remarks;
txtAddress.Text = vmessItem.address;
txtAddress.ReadOnly = true;
}
/// <summary>
/// 清除设置
/// </summary>
private void ClearServer()
{
txtRemarks.Text = "";
}
private void btnOK_Click(object sender, EventArgs e)
{
string remarks = txtRemarks.Text;
if (Utils.IsNullOrEmpty(remarks))
{
UI.Show(UIRes.I18N("PleaseFillRemarks"));
return;
}
vmessItem.remarks = remarks;
if (ConfigHandler.EditCustomServer(ref config, vmessItem, EditIndex) == 0)
{
this.DialogResult = DialogResult.OK;
}
else
{
UI.Show(UIRes.I18N("OperationFailed"));
}
}
private void btnClose_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
}
}

View file

@ -0,0 +1,390 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="&gt;&gt;txtAddress.Name" xml:space="preserve">
<value>txtAddress</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Address</value>
</data>
<data name="&gt;&gt;txtAddress.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;label6.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="&gt;&gt;btnOK.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnOK.Name" xml:space="preserve">
<value>btnOK</value>
</data>
<data name="&gt;&gt;txtRemarks.Name" xml:space="preserve">
<value>txtRemarks</value>
</data>
<data name="&gt;&gt;panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>AddServer2Form</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;txtRemarks.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtRemarks.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;btnClose.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 27</value>
</data>
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="txtAddress.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
<value>313, 21</value>
</data>
<data name="&gt;&gt;label13.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value>
</data>
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Alias (remarks)</value>
</data>
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 23</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>Server</value>
</data>
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
<value>23</value>
</data>
<data name="&gt;&gt;btnClose.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>611, 60</value>
</data>
<data name="&gt;&gt;txtAddress.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Edit custom configuration server</value>
</data>
<data name="txtAddress.Size" type="System.Drawing.Size, System.Drawing">
<value>432, 104</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>611, 10</value>
</data>
<data name="&gt;&gt;groupBox1.Name" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>* Fill in manually</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="label6.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="&gt;&gt;txtRemarks.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;btnClose.Name" xml:space="preserve">
<value>btnClose</value>
</data>
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
<value>303, 17</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 211</value>
</data>
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="&gt;&gt;label13.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBox1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 10</value>
</data>
<data name="&gt;&gt;label6.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>611, 201</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="btnClose.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 62</value>
</data>
<data name="&gt;&gt;txtAddress.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="&gt;&gt;groupBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="btnClose.Text" xml:space="preserve">
<value>&amp;Cancel</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 62</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>&amp;OK</value>
</data>
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="label13.Location" type="System.Drawing.Point, System.Drawing">
<value>446, 26</value>
</data>
<data name="&gt;&gt;label6.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label6.Name" xml:space="preserve">
<value>label6</value>
</data>
<data name="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="&gt;&gt;btnOK.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;label13.Name" xml:space="preserve">
<value>label13</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="label13.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="&gt;&gt;label13.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
</data>
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>611, 271</value>
</data>
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;panel2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
<value>396, 17</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View file

@ -0,0 +1,141 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnClose.Text" xml:space="preserve">
<value>取消(&amp;C)</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>*手填,方便识别管理</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>别名(remarks)</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>地址(address)</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>服务器</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>编辑自定义配置服务器</value>
</data>
</root>

View file

@ -0,0 +1,231 @@
namespace v2rayN.Forms
{
partial class AddServer3Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddServer3Form));
this.btnClose = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label13 = new System.Windows.Forms.Label();
this.cmbSecurity = new System.Windows.Forms.ComboBox();
this.txtRemarks = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.txtId = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.txtPort = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtAddress = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.btnOK = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.menuServer = new System.Windows.Forms.MenuStrip();
this.MenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.menuItemImportClipboard = new System.Windows.Forms.ToolStripMenuItem();
this.groupBox1.SuspendLayout();
this.panel2.SuspendLayout();
this.menuServer.SuspendLayout();
this.SuspendLayout();
//
// btnClose
//
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.Name = "btnClose";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label13);
this.groupBox1.Controls.Add(this.cmbSecurity);
this.groupBox1.Controls.Add(this.txtRemarks);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.txtId);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.txtPort);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtAddress);
this.groupBox1.Controls.Add(this.label1);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// label13
//
resources.ApplyResources(this.label13, "label13");
this.label13.Name = "label13";
//
// cmbSecurity
//
this.cmbSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbSecurity.FormattingEnabled = true;
this.cmbSecurity.Items.AddRange(new object[] {
resources.GetString("cmbSecurity.Items"),
resources.GetString("cmbSecurity.Items1"),
resources.GetString("cmbSecurity.Items2"),
resources.GetString("cmbSecurity.Items3"),
resources.GetString("cmbSecurity.Items4"),
resources.GetString("cmbSecurity.Items5"),
resources.GetString("cmbSecurity.Items6"),
resources.GetString("cmbSecurity.Items7")});
resources.ApplyResources(this.cmbSecurity, "cmbSecurity");
this.cmbSecurity.Name = "cmbSecurity";
//
// txtRemarks
//
resources.ApplyResources(this.txtRemarks, "txtRemarks");
this.txtRemarks.Name = "txtRemarks";
//
// label6
//
resources.ApplyResources(this.label6, "label6");
this.label6.Name = "label6";
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// txtId
//
resources.ApplyResources(this.txtId, "txtId");
this.txtId.Name = "txtId";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// txtPort
//
resources.ApplyResources(this.txtPort, "txtPort");
this.txtPort.Name = "txtPort";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// txtAddress
//
resources.ApplyResources(this.txtAddress, "txtAddress");
this.txtAddress.Name = "txtAddress";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// panel2
//
this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2";
//
// btnOK
//
resources.ApplyResources(this.btnOK, "btnOK");
this.btnOK.Name = "btnOK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// menuServer
//
this.menuServer.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.MenuItem1});
resources.ApplyResources(this.menuServer, "menuServer");
this.menuServer.Name = "menuServer";
//
// MenuItem1
//
this.MenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuItemImportClipboard});
this.MenuItem1.Name = "MenuItem1";
resources.ApplyResources(this.MenuItem1, "MenuItem1");
//
// menuItemImportClipboard
//
this.menuItemImportClipboard.Name = "menuItemImportClipboard";
resources.ApplyResources(this.menuItemImportClipboard, "menuItemImportClipboard");
this.menuItemImportClipboard.Click += new System.EventHandler(this.menuItemImportClipboard_Click);
//
// AddServer3Form
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.menuServer);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MinimizeBox = true;
this.Name = "AddServer3Form";
this.Load += new System.EventHandler(this.AddServer3Form_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.panel2.ResumeLayout(false);
this.menuServer.ResumeLayout(false);
this.menuServer.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.TextBox txtRemarks;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtId;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtPort;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtAddress;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox cmbSecurity;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.MenuStrip menuServer;
private System.Windows.Forms.ToolStripMenuItem MenuItem1;
private System.Windows.Forms.ToolStripMenuItem menuItemImportClipboard;
}
}

View file

@ -0,0 +1,143 @@
using System;
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class AddServer3Form : BaseForm
{
public int EditIndex { get; set; }
VmessItem vmessItem = null;
public AddServer3Form()
{
InitializeComponent();
}
private void AddServer3Form_Load(object sender, EventArgs e)
{
if (EditIndex >= 0)
{
vmessItem = config.vmess[EditIndex];
BindingServer();
}
else
{
vmessItem = new VmessItem();
ClearServer();
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindingServer()
{
txtAddress.Text = vmessItem.address;
txtPort.Text = vmessItem.port.ToString();
txtId.Text = vmessItem.id;
cmbSecurity.Text = vmessItem.security;
txtRemarks.Text = vmessItem.remarks;
}
/// <summary>
/// 清除设置
/// </summary>
private void ClearServer()
{
txtAddress.Text = "";
txtPort.Text = "";
txtId.Text = "";
cmbSecurity.Text = Global.DefaultSecurity;
txtRemarks.Text = "";
}
private void btnOK_Click(object sender, EventArgs e)
{
string address = txtAddress.Text;
string port = txtPort.Text;
string id = txtId.Text;
string security = cmbSecurity.Text;
string remarks = txtRemarks.Text;
if (Utils.IsNullOrEmpty(address))
{
UI.Show(UIRes.I18N("FillServerAddress"));
return;
}
if (Utils.IsNullOrEmpty(port) || !Utils.IsNumberic(port))
{
UI.Show(UIRes.I18N("FillCorrectServerPort"));
return;
}
if (Utils.IsNullOrEmpty(id))
{
UI.Show(UIRes.I18N("FillPassword"));
return;
}
if (Utils.IsNullOrEmpty(security))
{
UI.Show(UIRes.I18N("PleaseSelectEncryption"));
return;
}
vmessItem.address = address;
vmessItem.port = Utils.ToInt(port);
vmessItem.id = id;
vmessItem.security = security;
vmessItem.remarks = remarks;
if (ConfigHandler.AddShadowsocksServer(ref config, vmessItem, EditIndex) == 0)
{
this.DialogResult = DialogResult.OK;
}
else
{
UI.Show(UIRes.I18N("OperationFailed"));
}
}
private void btnClose_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
#region
/// <summary>
/// 从剪贴板导入URL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void menuItemImportClipboard_Click(object sender, EventArgs e)
{
ImportConfig();
}
private void ImportConfig()
{
ClearServer();
string msg;
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out msg);
if (vmessItem == null)
{
UI.Show(msg);
return;
}
txtAddress.Text = vmessItem.address;
txtPort.Text = vmessItem.port.ToString();
cmbSecurity.Text = vmessItem.security;
txtId.Text = vmessItem.id;
txtRemarks.Text = vmessItem.remarks;
}
#endregion
}
}

View file

@ -0,0 +1,606 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
<value>396, 17</value>
</data>
<data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnClose.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="btnClose.Text" xml:space="preserve">
<value>&amp;Cancel</value>
</data>
<data name="&gt;&gt;btnClose.Name" xml:space="preserve">
<value>btnClose</value>
</data>
<data name="&gt;&gt;btnClose.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnClose.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label13.Location" type="System.Drawing.Point, System.Drawing">
<value>337, 158</value>
</data>
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>
<data name="label13.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>* Fill in manually</value>
</data>
<data name="&gt;&gt;label13.Name" xml:space="preserve">
<value>label13</value>
</data>
<data name="&gt;&gt;label13.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label13.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label13.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="cmbSecurity.Items" xml:space="preserve">
<value>aes-256-cfb</value>
</data>
<data name="cmbSecurity.Items1" xml:space="preserve">
<value>aes-128-cfb</value>
</data>
<data name="cmbSecurity.Items2" xml:space="preserve">
<value>chacha20</value>
</data>
<data name="cmbSecurity.Items3" xml:space="preserve">
<value>chacha20-ietf</value>
</data>
<data name="cmbSecurity.Items4" xml:space="preserve">
<value>aes-256-gcm</value>
</data>
<data name="cmbSecurity.Items5" xml:space="preserve">
<value>aes-128-gcm</value>
</data>
<data name="cmbSecurity.Items6" xml:space="preserve">
<value>chacha20-poly1305</value>
</data>
<data name="cmbSecurity.Items7" xml:space="preserve">
<value>chacha20-ietf-poly1305</value>
</data>
<data name="cmbSecurity.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 120</value>
</data>
<data name="cmbSecurity.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 20</value>
</data>
<data name="cmbSecurity.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="&gt;&gt;cmbSecurity.Name" xml:space="preserve">
<value>cmbSecurity</value>
</data>
<data name="&gt;&gt;cmbSecurity.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cmbSecurity.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;cmbSecurity.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 154</value>
</data>
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 21</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="&gt;&gt;txtRemarks.Name" xml:space="preserve">
<value>txtRemarks</value>
</data>
<data name="&gt;&gt;txtRemarks.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtRemarks.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtRemarks.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 158</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="label6.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Alias (remarks)</value>
</data>
<data name="&gt;&gt;label6.Name" xml:space="preserve">
<value>label6</value>
</data>
<data name="&gt;&gt;label6.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label6.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label6.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 124</value>
</data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label5.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>Encryption</value>
</data>
<data name="&gt;&gt;label5.Name" xml:space="preserve">
<value>label5</value>
</data>
<data name="&gt;&gt;label5.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label5.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label5.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="txtId.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 85</value>
</data>
<data name="txtId.PasswordChar" type="System.Char, mscorlib" xml:space="preserve">
<value>*</value>
</data>
<data name="txtId.Size" type="System.Drawing.Size, System.Drawing">
<value>278, 21</value>
</data>
<data name="txtId.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;txtId.Name" xml:space="preserve">
<value>txtId</value>
</data>
<data name="&gt;&gt;txtId.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtId.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtId.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 89</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 12</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Password</value>
</data>
<data name="&gt;&gt;label3.Name" xml:space="preserve">
<value>label3</value>
</data>
<data name="&gt;&gt;label3.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label3.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="txtPort.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 56</value>
</data>
<data name="txtPort.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 21</value>
</data>
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;txtPort.Name" xml:space="preserve">
<value>txtPort</value>
</data>
<data name="&gt;&gt;txtPort.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtPort.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtPort.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 60</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>71, 12</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Server port</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="&gt;&gt;label2.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 27</value>
</data>
<data name="txtAddress.Size" type="System.Drawing.Size, System.Drawing">
<value>359, 21</value>
</data>
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;txtAddress.Name" xml:space="preserve">
<value>txtAddress</value>
</data>
<data name="&gt;&gt;txtAddress.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtAddress.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtAddress.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 31</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Server address</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 35</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>547, 196</value>
</data>
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>Server</value>
</data>
<data name="&gt;&gt;groupBox1.Name" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;groupBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBox1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
<value>303, 17</value>
</data>
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>&amp;OK</value>
</data>
<data name="&gt;&gt;btnOK.Name" xml:space="preserve">
<value>btnOK</value>
</data>
<data name="&gt;&gt;btnOK.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnOK.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 231</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>547, 60</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 25</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>547, 10</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<metadata name="menuServer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="menuItemImportClipboard.Size" type="System.Drawing.Size, System.Drawing">
<value>235, 22</value>
</data>
<data name="menuItemImportClipboard.Text" xml:space="preserve">
<value>Import URL from clipboard</value>
</data>
<data name="MenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>162, 21</value>
</data>
<data name="MenuItem1.Text" xml:space="preserve">
<value>Import configuration file</value>
</data>
<data name="menuServer.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="menuServer.Size" type="System.Drawing.Size, System.Drawing">
<value>547, 25</value>
</data>
<data name="menuServer.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="&gt;&gt;menuServer.Name" xml:space="preserve">
<value>menuServer</value>
</data>
<data name="&gt;&gt;menuServer.Type" xml:space="preserve">
<value>System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;menuServer.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;menuServer.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>547, 291</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Edit or add a [Shadowsocks] server</value>
</data>
<data name="&gt;&gt;MenuItem1.Name" xml:space="preserve">
<value>MenuItem1</value>
</data>
<data name="&gt;&gt;MenuItem1.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;menuItemImportClipboard.Name" xml:space="preserve">
<value>menuItemImportClipboard</value>
</data>
<data name="&gt;&gt;menuItemImportClipboard.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>AddServer3Form</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View file

@ -0,0 +1,159 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnClose.Text" xml:space="preserve">
<value>取消(&amp;C)</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>*手填,方便识别管理</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>别名(remarks)</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>加密方式</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>密码</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>服务器端口</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>服务器地址</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>服务器</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value>
</data>
<data name="menuItemImportClipboard.Text" xml:space="preserve">
<value>从剪贴板导入URL</value>
</data>
<data name="menuItemScanScreen.Text" xml:space="preserve">
<value>扫描屏幕上的二维码</value>
</data>
<data name="MenuItem1.Text" xml:space="preserve">
<value>导入配置文件</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>编辑或添加[Shadowsocks]服务器</value>
</data>
</root>

View file

@ -0,0 +1,188 @@
namespace v2rayN.Forms
{
partial class AddServer4Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddServer4Form));
this.btnClose = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label13 = new System.Windows.Forms.Label();
this.txtRemarks = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.txtPort = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtAddress = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.btnOK = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.menuServer = new System.Windows.Forms.MenuStrip();
this.MenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.menuItemImportClipboard = new System.Windows.Forms.ToolStripMenuItem();
this.groupBox1.SuspendLayout();
this.panel2.SuspendLayout();
this.menuServer.SuspendLayout();
this.SuspendLayout();
//
// btnClose
//
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnClose.Name = "btnClose";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// groupBox1
//
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Controls.Add(this.label13);
this.groupBox1.Controls.Add(this.txtRemarks);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.txtPort);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtAddress);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// label13
//
resources.ApplyResources(this.label13, "label13");
this.label13.Name = "label13";
//
// txtRemarks
//
resources.ApplyResources(this.txtRemarks, "txtRemarks");
this.txtRemarks.Name = "txtRemarks";
//
// label6
//
resources.ApplyResources(this.label6, "label6");
this.label6.Name = "label6";
//
// txtPort
//
resources.ApplyResources(this.txtPort, "txtPort");
this.txtPort.Name = "txtPort";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// txtAddress
//
resources.ApplyResources(this.txtAddress, "txtAddress");
this.txtAddress.Name = "txtAddress";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// panel2
//
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK);
this.panel2.Name = "panel2";
//
// btnOK
//
resources.ApplyResources(this.btnOK, "btnOK");
this.btnOK.Name = "btnOK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// menuServer
//
resources.ApplyResources(this.menuServer, "menuServer");
this.menuServer.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.MenuItem1});
this.menuServer.Name = "menuServer";
//
// MenuItem1
//
resources.ApplyResources(this.MenuItem1, "MenuItem1");
this.MenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuItemImportClipboard});
this.MenuItem1.Name = "MenuItem1";
//
// menuItemImportClipboard
//
resources.ApplyResources(this.menuItemImportClipboard, "menuItemImportClipboard");
this.menuItemImportClipboard.Name = "menuItemImportClipboard";
this.menuItemImportClipboard.Click += new System.EventHandler(this.menuItemImportClipboard_Click);
//
// AddServer4Form
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.menuServer);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MinimizeBox = true;
this.Name = "AddServer4Form";
this.Load += new System.EventHandler(this.AddServer4Form_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.panel2.ResumeLayout(false);
this.menuServer.ResumeLayout(false);
this.menuServer.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.TextBox txtRemarks;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtPort;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtAddress;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.MenuStrip menuServer;
private System.Windows.Forms.ToolStripMenuItem MenuItem1;
private System.Windows.Forms.ToolStripMenuItem menuItemImportClipboard;
}
}

View file

@ -0,0 +1,122 @@
using System;
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class AddServer4Form : BaseForm
{
public int EditIndex { get; set; }
VmessItem vmessItem = null;
public AddServer4Form()
{
InitializeComponent();
}
private void AddServer4Form_Load(object sender, EventArgs e)
{
if (EditIndex >= 0)
{
vmessItem = config.vmess[EditIndex];
BindingServer();
}
else
{
vmessItem = new VmessItem();
ClearServer();
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindingServer()
{
txtAddress.Text = vmessItem.address;
txtPort.Text = vmessItem.port.ToString();
txtRemarks.Text = vmessItem.remarks;
}
/// <summary>
/// 清除设置
/// </summary>
private void ClearServer()
{
txtAddress.Text = "";
txtPort.Text = "";
txtRemarks.Text = "";
}
private void btnOK_Click(object sender, EventArgs e)
{
string address = txtAddress.Text;
string port = txtPort.Text;
string remarks = txtRemarks.Text;
if (Utils.IsNullOrEmpty(address))
{
UI.Show(UIRes.I18N("FillServerAddress"));
return;
}
if (Utils.IsNullOrEmpty(port) || !Utils.IsNumberic(port))
{
UI.Show(UIRes.I18N("FillCorrectServerPort"));
return;
}
vmessItem.address = address;
vmessItem.port = Utils.ToInt(port);
vmessItem.remarks = remarks;
if (ConfigHandler.AddSocksServer(ref config, vmessItem, EditIndex) == 0)
{
this.DialogResult = DialogResult.OK;
}
else
{
UI.Show(UIRes.I18N("OperationFailed"));
}
}
private void btnClose_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
#region
/// <summary>
/// 从剪贴板导入URL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void menuItemImportClipboard_Click(object sender, EventArgs e)
{
ImportConfig();
}
private void ImportConfig()
{
ClearServer();
string msg;
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out msg);
if (vmessItem == null)
{
UI.Show(msg);
return;
}
txtAddress.Text = vmessItem.address;
txtPort.Text = vmessItem.port.ToString();
txtRemarks.Text = vmessItem.remarks;
}
#endregion
}
}

View file

@ -0,0 +1,483 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="&gt;&gt;txtAddress.Name" xml:space="preserve">
<value>txtAddress</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Server address</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="txtPort.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;label6.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="&gt;&gt;txtPort.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="&gt;&gt;menuServer.Name" xml:space="preserve">
<value>menuServer</value>
</data>
<data name="&gt;&gt;btnOK.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnOK.Name" xml:space="preserve">
<value>btnOK</value>
</data>
<data name="&gt;&gt;txtRemarks.Name" xml:space="preserve">
<value>txtRemarks</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="txtPort.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 21</value>
</data>
<data name="&gt;&gt;panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>AddServer4Form</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;txtRemarks.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtRemarks.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;btnClose.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 158</value>
</data>
<data name="&gt;&gt;txtPort.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
<value>194, 21</value>
</data>
<data name="&gt;&gt;label13.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value>
</data>
<data name="menuServer.Size" type="System.Drawing.Size, System.Drawing">
<value>547, 25</value>
</data>
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Alias (remarks)</value>
</data>
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 154</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>
<data name="&gt;&gt;MenuItem1.Name" xml:space="preserve">
<value>MenuItem1</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>Server</value>
</data>
<data name="MenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>162, 21</value>
</data>
<data name="&gt;&gt;btnClose.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>547, 60</value>
</data>
<data name="&gt;&gt;txtAddress.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Edit or add a [Socks] server</value>
</data>
<data name="txtAddress.Size" type="System.Drawing.Size, System.Drawing">
<value>359, 21</value>
</data>
<data name="&gt;&gt;label2.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>547, 10</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>* Fill in manually</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="label6.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>71, 12</value>
</data>
<data name="&gt;&gt;label13.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 60</value>
</data>
<data name="&gt;&gt;txtRemarks.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;btnClose.Name" xml:space="preserve">
<value>btnClose</value>
</data>
<data name="&gt;&gt;label6.Name" xml:space="preserve">
<value>label6</value>
</data>
<data name="menuServer.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
<value>303, 17</value>
</data>
<data name="txtAddress.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 27</value>
</data>
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="&gt;&gt;label13.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBox1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 35</value>
</data>
<data name="&gt;&gt;label6.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;menuServer.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;btnOK.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>547, 196</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="menuItemImportClipboard.Size" type="System.Drawing.Size, System.Drawing">
<value>235, 22</value>
</data>
<data name="btnClose.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;txtAddress.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtPort.Name" xml:space="preserve">
<value>txtPort</value>
</data>
<data name="txtPort.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 56</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="&gt;&gt;groupBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="menuItemImportClipboard.Text" xml:space="preserve">
<value>Import URL from clipboard</value>
</data>
<data name="&gt;&gt;menuItemImportClipboard.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="btnClose.Text" xml:space="preserve">
<value>&amp;Cancel</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 31</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>&amp;OK</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Server port</value>
</data>
<data name="label13.Location" type="System.Drawing.Point, System.Drawing">
<value>337, 158</value>
</data>
<data name="&gt;&gt;label6.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="MenuItem1.Text" xml:space="preserve">
<value>Import configuration file</value>
</data>
<data name="menuServer.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="&gt;&gt;MenuItem1.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtAddress.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="&gt;&gt;menuServer.Type" xml:space="preserve">
<value>System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;menuServer.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 25</value>
</data>
<data name="txtAddress.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;label13.Name" xml:space="preserve">
<value>label13</value>
</data>
<data name="&gt;&gt;txtPort.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="&gt;&gt;groupBox1.Name" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 231</value>
</data>
<data name="label13.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>547, 291</value>
</data>
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;menuItemImportClipboard.Name" xml:space="preserve">
<value>menuItemImportClipboard</value>
</data>
<data name="&gt;&gt;panel2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
<value>396, 17</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="menuServer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View file

@ -0,0 +1,166 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnClose.Text" xml:space="preserve">
<value>取消(&amp;C)</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>服务器</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>*手填,方便识别管理</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>别名(remarks)</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>服务器端口</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>服务器地址</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value>
</data>
<data name="MenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>92, 21</value>
</data>
<data name="MenuItem1.Text" xml:space="preserve">
<value>导入配置文件</value>
</data>
<data name="menuItemImportClipboard.Size" type="System.Drawing.Size, System.Drawing">
<value>171, 22</value>
</data>
<data name="menuItemImportClipboard.Text" xml:space="preserve">
<value>从剪贴板导入URL</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>编辑或添加[Socks]服务器</value>
</data>
</root>

View file

@ -0,0 +1,516 @@
namespace v2rayN.Forms
{
partial class AddServerForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddServerForm));
this.btnClose = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnGUID = new System.Windows.Forms.Button();
this.label13 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label24 = new System.Windows.Forms.Label();
this.label23 = new System.Windows.Forms.Label();
this.panTlsMore = new System.Windows.Forms.Panel();
this.label22 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this.cmbAllowInsecure = new System.Windows.Forms.ComboBox();
this.label20 = new System.Windows.Forms.Label();
this.txtPath = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.cmbStreamSecurity = new System.Windows.Forms.ComboBox();
this.label12 = new System.Windows.Forms.Label();
this.txtRequestHost = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.cmbHeaderType = new System.Windows.Forms.ComboBox();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.cmbNetwork = new System.Windows.Forms.ComboBox();
this.label7 = new System.Windows.Forms.Label();
this.cmbSecurity = new System.Windows.Forms.ComboBox();
this.txtRemarks = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.txtAlterId = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.txtId = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.txtPort = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtAddress = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.btnOK = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.menuServer = new System.Windows.Forms.MenuStrip();
this.MenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.MenuItemImportClient = new System.Windows.Forms.ToolStripMenuItem();
this.MenuItemImportServer = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.MenuItemImportClipboard = new System.Windows.Forms.ToolStripMenuItem();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.panTlsMore.SuspendLayout();
this.panel2.SuspendLayout();
this.menuServer.SuspendLayout();
this.SuspendLayout();
//
// btnClose
//
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.Name = "btnClose";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.btnGUID);
this.groupBox1.Controls.Add(this.label13);
this.groupBox1.Controls.Add(this.groupBox2);
this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.cmbNetwork);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.cmbSecurity);
this.groupBox1.Controls.Add(this.txtRemarks);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.txtAlterId);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.txtId);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.txtPort);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtAddress);
this.groupBox1.Controls.Add(this.label1);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// btnGUID
//
resources.ApplyResources(this.btnGUID, "btnGUID");
this.btnGUID.Name = "btnGUID";
this.btnGUID.UseVisualStyleBackColor = true;
this.btnGUID.Click += new System.EventHandler(this.btnGUID_Click);
//
// label13
//
resources.ApplyResources(this.label13, "label13");
this.label13.Name = "label13";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.label24);
this.groupBox2.Controls.Add(this.label23);
this.groupBox2.Controls.Add(this.panTlsMore);
this.groupBox2.Controls.Add(this.label20);
this.groupBox2.Controls.Add(this.txtPath);
this.groupBox2.Controls.Add(this.label19);
this.groupBox2.Controls.Add(this.label18);
this.groupBox2.Controls.Add(this.label17);
this.groupBox2.Controls.Add(this.label16);
this.groupBox2.Controls.Add(this.label14);
this.groupBox2.Controls.Add(this.label15);
this.groupBox2.Controls.Add(this.cmbStreamSecurity);
this.groupBox2.Controls.Add(this.label12);
this.groupBox2.Controls.Add(this.txtRequestHost);
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Controls.Add(this.label10);
this.groupBox2.Controls.Add(this.cmbHeaderType);
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false;
//
// label24
//
resources.ApplyResources(this.label24, "label24");
this.label24.Name = "label24";
//
// label23
//
resources.ApplyResources(this.label23, "label23");
this.label23.Name = "label23";
//
// panTlsMore
//
this.panTlsMore.Controls.Add(this.label22);
this.panTlsMore.Controls.Add(this.label21);
this.panTlsMore.Controls.Add(this.cmbAllowInsecure);
resources.ApplyResources(this.panTlsMore, "panTlsMore");
this.panTlsMore.Name = "panTlsMore";
//
// label22
//
resources.ApplyResources(this.label22, "label22");
this.label22.Name = "label22";
//
// label21
//
resources.ApplyResources(this.label21, "label21");
this.label21.Name = "label21";
//
// cmbAllowInsecure
//
this.cmbAllowInsecure.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbAllowInsecure.FormattingEnabled = true;
this.cmbAllowInsecure.Items.AddRange(new object[] {
resources.GetString("cmbAllowInsecure.Items"),
resources.GetString("cmbAllowInsecure.Items1"),
resources.GetString("cmbAllowInsecure.Items2")});
resources.ApplyResources(this.cmbAllowInsecure, "cmbAllowInsecure");
this.cmbAllowInsecure.Name = "cmbAllowInsecure";
//
// label20
//
resources.ApplyResources(this.label20, "label20");
this.label20.Name = "label20";
//
// txtPath
//
resources.ApplyResources(this.txtPath, "txtPath");
this.txtPath.Name = "txtPath";
//
// label19
//
resources.ApplyResources(this.label19, "label19");
this.label19.Name = "label19";
//
// label18
//
resources.ApplyResources(this.label18, "label18");
this.label18.Name = "label18";
//
// label17
//
resources.ApplyResources(this.label17, "label17");
this.label17.Name = "label17";
//
// label16
//
resources.ApplyResources(this.label16, "label16");
this.label16.Name = "label16";
//
// label14
//
resources.ApplyResources(this.label14, "label14");
this.label14.Name = "label14";
//
// label15
//
resources.ApplyResources(this.label15, "label15");
this.label15.Name = "label15";
//
// cmbStreamSecurity
//
this.cmbStreamSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbStreamSecurity.FormattingEnabled = true;
this.cmbStreamSecurity.Items.AddRange(new object[] {
resources.GetString("cmbStreamSecurity.Items"),
resources.GetString("cmbStreamSecurity.Items1")});
resources.ApplyResources(this.cmbStreamSecurity, "cmbStreamSecurity");
this.cmbStreamSecurity.Name = "cmbStreamSecurity";
this.cmbStreamSecurity.SelectedIndexChanged += new System.EventHandler(this.cmbStreamSecurity_SelectedIndexChanged);
//
// label12
//
resources.ApplyResources(this.label12, "label12");
this.label12.Name = "label12";
//
// txtRequestHost
//
resources.ApplyResources(this.txtRequestHost, "txtRequestHost");
this.txtRequestHost.Name = "txtRequestHost";
//
// label11
//
resources.ApplyResources(this.label11, "label11");
this.label11.Name = "label11";
//
// label10
//
resources.ApplyResources(this.label10, "label10");
this.label10.Name = "label10";
//
// cmbHeaderType
//
this.cmbHeaderType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbHeaderType.FormattingEnabled = true;
this.cmbHeaderType.Items.AddRange(new object[] {
resources.GetString("cmbHeaderType.Items"),
resources.GetString("cmbHeaderType.Items1"),
resources.GetString("cmbHeaderType.Items2"),
resources.GetString("cmbHeaderType.Items3"),
resources.GetString("cmbHeaderType.Items4"),
resources.GetString("cmbHeaderType.Items5"),
resources.GetString("cmbHeaderType.Items6")});
resources.ApplyResources(this.cmbHeaderType, "cmbHeaderType");
this.cmbHeaderType.Name = "cmbHeaderType";
//
// label9
//
resources.ApplyResources(this.label9, "label9");
this.label9.Name = "label9";
//
// label8
//
resources.ApplyResources(this.label8, "label8");
this.label8.Name = "label8";
//
// cmbNetwork
//
this.cmbNetwork.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbNetwork.FormattingEnabled = true;
this.cmbNetwork.Items.AddRange(new object[] {
resources.GetString("cmbNetwork.Items"),
resources.GetString("cmbNetwork.Items1"),
resources.GetString("cmbNetwork.Items2"),
resources.GetString("cmbNetwork.Items3"),
resources.GetString("cmbNetwork.Items4")});
resources.ApplyResources(this.cmbNetwork, "cmbNetwork");
this.cmbNetwork.Name = "cmbNetwork";
this.cmbNetwork.SelectedIndexChanged += new System.EventHandler(this.cmbNetwork_SelectedIndexChanged);
//
// label7
//
resources.ApplyResources(this.label7, "label7");
this.label7.Name = "label7";
//
// cmbSecurity
//
this.cmbSecurity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbSecurity.FormattingEnabled = true;
this.cmbSecurity.Items.AddRange(new object[] {
resources.GetString("cmbSecurity.Items"),
resources.GetString("cmbSecurity.Items1"),
resources.GetString("cmbSecurity.Items2"),
resources.GetString("cmbSecurity.Items3")});
resources.ApplyResources(this.cmbSecurity, "cmbSecurity");
this.cmbSecurity.Name = "cmbSecurity";
//
// txtRemarks
//
resources.ApplyResources(this.txtRemarks, "txtRemarks");
this.txtRemarks.Name = "txtRemarks";
//
// label6
//
resources.ApplyResources(this.label6, "label6");
this.label6.Name = "label6";
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// txtAlterId
//
resources.ApplyResources(this.txtAlterId, "txtAlterId");
this.txtAlterId.Name = "txtAlterId";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// txtId
//
resources.ApplyResources(this.txtId, "txtId");
this.txtId.Name = "txtId";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// txtPort
//
resources.ApplyResources(this.txtPort, "txtPort");
this.txtPort.Name = "txtPort";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// txtAddress
//
resources.ApplyResources(this.txtAddress, "txtAddress");
this.txtAddress.Name = "txtAddress";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// panel2
//
this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2";
//
// btnOK
//
resources.ApplyResources(this.btnOK, "btnOK");
this.btnOK.Name = "btnOK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// menuServer
//
this.menuServer.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.MenuItem1});
resources.ApplyResources(this.menuServer, "menuServer");
this.menuServer.Name = "menuServer";
//
// MenuItem1
//
this.MenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.MenuItemImportClient,
this.MenuItemImportServer,
this.toolStripSeparator1,
this.MenuItemImportClipboard});
this.MenuItem1.Name = "MenuItem1";
resources.ApplyResources(this.MenuItem1, "MenuItem1");
//
// MenuItemImportClient
//
this.MenuItemImportClient.Name = "MenuItemImportClient";
resources.ApplyResources(this.MenuItemImportClient, "MenuItemImportClient");
this.MenuItemImportClient.Click += new System.EventHandler(this.MenuItemImportClient_Click);
//
// MenuItemImportServer
//
this.MenuItemImportServer.Name = "MenuItemImportServer";
resources.ApplyResources(this.MenuItemImportServer, "MenuItemImportServer");
this.MenuItemImportServer.Click += new System.EventHandler(this.MenuItemImportServer_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
//
// MenuItemImportClipboard
//
this.MenuItemImportClipboard.Name = "MenuItemImportClipboard";
resources.ApplyResources(this.MenuItemImportClipboard, "MenuItemImportClipboard");
this.MenuItemImportClipboard.Click += new System.EventHandler(this.MenuItemImportClipboard_Click);
//
// AddServerForm
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.menuServer);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "AddServerForm";
this.Load += new System.EventHandler(this.AddServerForm_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.panTlsMore.ResumeLayout(false);
this.panTlsMore.PerformLayout();
this.panel2.ResumeLayout(false);
this.menuServer.ResumeLayout(false);
this.menuServer.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.TextBox txtRemarks;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtAlterId;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtId;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtPort;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtAddress;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox cmbSecurity;
private System.Windows.Forms.ComboBox cmbNetwork;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.TextBox txtRequestHost;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.ComboBox cmbHeaderType;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.MenuStrip menuServer;
private System.Windows.Forms.ToolStripMenuItem MenuItem1;
private System.Windows.Forms.ToolStripMenuItem MenuItemImportClient;
private System.Windows.Forms.ToolStripMenuItem MenuItemImportServer;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.ComboBox cmbStreamSecurity;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem MenuItemImportClipboard;
private System.Windows.Forms.Button btnGUID;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.TextBox txtPath;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.ComboBox cmbAllowInsecure;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.Panel panTlsMore;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.Label label23;
}
}

View file

@ -0,0 +1,293 @@
using System;
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class AddServerForm : BaseForm
{
public int EditIndex { get; set; }
VmessItem vmessItem = null;
public AddServerForm()
{
InitializeComponent();
}
private void AddServerForm_Load(object sender, EventArgs e)
{
if (EditIndex >= 0)
{
vmessItem = config.vmess[EditIndex];
BindingServer();
}
else
{
vmessItem = new VmessItem();
ClearServer();
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindingServer()
{
txtAddress.Text = vmessItem.address;
txtPort.Text = vmessItem.port.ToString();
txtId.Text = vmessItem.id;
txtAlterId.Text = vmessItem.alterId.ToString();
cmbSecurity.Text = vmessItem.security;
cmbNetwork.Text = vmessItem.network;
txtRemarks.Text = vmessItem.remarks;
cmbHeaderType.Text = vmessItem.headerType;
txtRequestHost.Text = vmessItem.requestHost;
txtPath.Text = vmessItem.path;
cmbStreamSecurity.Text = vmessItem.streamSecurity;
cmbAllowInsecure.Text = vmessItem.allowInsecure;
}
/// <summary>
/// 清除设置
/// </summary>
private void ClearServer()
{
txtAddress.Text = "";
txtPort.Text = "";
txtId.Text = "";
txtAlterId.Text = "0";
cmbSecurity.Text = Global.DefaultSecurity;
cmbNetwork.Text = Global.DefaultNetwork;
txtRemarks.Text = "";
cmbHeaderType.Text = Global.None;
txtRequestHost.Text = "";
cmbStreamSecurity.Text = "";
cmbAllowInsecure.Text = "";
txtPath.Text = "";
}
private void cmbNetwork_SelectedIndexChanged(object sender, EventArgs e)
{
SetHeaderType();
}
/// <summary>
/// 设置伪装选项
/// </summary>
private void SetHeaderType()
{
cmbHeaderType.Items.Clear();
string network = cmbNetwork.Text;
if (Utils.IsNullOrEmpty(network))
{
cmbHeaderType.Items.Add(Global.None);
return;
}
cmbHeaderType.Items.Add(Global.None);
if (network.Equals(Global.DefaultNetwork))
{
cmbHeaderType.Items.Add(Global.TcpHeaderHttp);
}
else if (network.Equals("kcp") || network.Equals("quic"))
{
cmbHeaderType.Items.Add("srtp");
cmbHeaderType.Items.Add("utp");
cmbHeaderType.Items.Add("wechat-video");
cmbHeaderType.Items.Add("dtls");
cmbHeaderType.Items.Add("wireguard");
}
else
{
}
cmbHeaderType.Text = Global.None;
}
private void btnOK_Click(object sender, EventArgs e)
{
string address = txtAddress.Text;
string port = txtPort.Text;
string id = txtId.Text;
string alterId = txtAlterId.Text;
string security = cmbSecurity.Text;
string network = cmbNetwork.Text;
string remarks = txtRemarks.Text;
string headerType = cmbHeaderType.Text;
string requestHost = txtRequestHost.Text;
string path = txtPath.Text;
string streamSecurity = cmbStreamSecurity.Text;
string allowInsecure = cmbAllowInsecure.Text;
if (Utils.IsNullOrEmpty(address))
{
UI.Show(UIRes.I18N("FillServerAddress"));
return;
}
if (Utils.IsNullOrEmpty(port) || !Utils.IsNumberic(port))
{
UI.Show(UIRes.I18N("FillCorrectServerPort"));
return;
}
if (Utils.IsNullOrEmpty(id))
{
UI.Show(UIRes.I18N("FillUUID"));
return;
}
if (Utils.IsNullOrEmpty(alterId) || !Utils.IsNumberic(alterId))
{
UI.Show(UIRes.I18N("FillCorrectAlterId"));
return;
}
vmessItem.address = address;
vmessItem.port = Utils.ToInt(port);
vmessItem.id = id;
vmessItem.alterId = Utils.ToInt(alterId);
vmessItem.security = security;
vmessItem.network = network;
vmessItem.remarks = remarks;
vmessItem.headerType = headerType;
vmessItem.requestHost = requestHost.Replace(" ", "");
vmessItem.path = path.Replace(" ", "");
vmessItem.streamSecurity = streamSecurity;
vmessItem.allowInsecure = allowInsecure;
if (ConfigHandler.AddServer(ref config, vmessItem, EditIndex) == 0)
{
this.DialogResult = DialogResult.OK;
}
else
{
UI.Show(UIRes.I18N("OperationFailed"));
}
}
private void btnGUID_Click(object sender, EventArgs e)
{
txtId.Text = Utils.GetGUID();
}
private void btnClose_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
#region /
/// <summary>
/// 导入客户端
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void MenuItemImportClient_Click(object sender, EventArgs e)
{
MenuItemImport(1);
}
/// <summary>
/// 导入服务端
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void MenuItemImportServer_Click(object sender, EventArgs e)
{
MenuItemImport(2);
}
private void MenuItemImport(int type)
{
ClearServer();
OpenFileDialog fileDialog = new OpenFileDialog();
fileDialog.Multiselect = false;
fileDialog.Filter = "Config|*.json|All|*.*";
if (fileDialog.ShowDialog() != DialogResult.OK)
{
return;
}
string fileName = fileDialog.FileName;
if (Utils.IsNullOrEmpty(fileName))
{
return;
}
string msg;
VmessItem vmessItem;
if (type.Equals(1))
{
vmessItem = V2rayConfigHandler.ImportFromClientConfig(fileName, out msg);
}
else
{
vmessItem = V2rayConfigHandler.ImportFromServerConfig(fileName, out msg);
}
if (vmessItem == null)
{
UI.Show(msg);
return;
}
txtAddress.Text = vmessItem.address;
txtPort.Text = vmessItem.port.ToString();
txtId.Text = vmessItem.id;
txtAlterId.Text = vmessItem.alterId.ToString();
txtRemarks.Text = vmessItem.remarks;
cmbNetwork.Text = vmessItem.network;
cmbHeaderType.Text = vmessItem.headerType;
txtRequestHost.Text = vmessItem.requestHost;
txtPath.Text = vmessItem.path;
cmbStreamSecurity.Text = vmessItem.streamSecurity;
}
/// <summary>
/// 从剪贴板导入URL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void MenuItemImportClipboard_Click(object sender, EventArgs e)
{
ClearServer();
string msg;
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(Utils.GetClipboardData(), out msg);
if (vmessItem == null)
{
UI.Show(msg);
return;
}
txtAddress.Text = vmessItem.address;
txtPort.Text = vmessItem.port.ToString();
txtId.Text = vmessItem.id;
txtAlterId.Text = vmessItem.alterId.ToString();
txtRemarks.Text = vmessItem.remarks;
cmbNetwork.Text = vmessItem.network;
cmbHeaderType.Text = vmessItem.headerType;
txtRequestHost.Text = vmessItem.requestHost;
txtPath.Text = vmessItem.path;
cmbStreamSecurity.Text = vmessItem.streamSecurity;
}
#endregion
private void cmbStreamSecurity_SelectedIndexChanged(object sender, EventArgs e)
{
string security = cmbStreamSecurity.Text;
if (Utils.IsNullOrEmpty(security))
{
panTlsMore.Hide();
}
else
{
panTlsMore.Show();
}
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,301 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnClose.Text" xml:space="preserve">
<value>取消(&amp;C)</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>服务器</value>
</data>
<data name="btnGUID.Text" xml:space="preserve">
<value>生成(&amp;G)</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>*手填,方便识别管理</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>不清楚则保持默认值</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label24.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="label24.Text" xml:space="preserve">
<value>3)QUIC 加密密钥</value>
</data>
<data name="label23.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="label23.Text" xml:space="preserve">
<value>4)QUIC 加密方式</value>
</data>
<data name="label22.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 12</value>
</data>
<data name="label22.Text" xml:space="preserve">
<value>默认true</value>
</data>
<data name="label20.Size" type="System.Drawing.Size, System.Drawing">
<value>149, 12</value>
</data>
<data name="label20.Text" xml:space="preserve">
<value>3)h2 host中间逗号(,)隔开</value>
</data>
<data name="label19.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label19.Text" xml:space="preserve">
<value>路径(path)</value>
</data>
<data name="label14.Size" type="System.Drawing.Size, System.Drawing">
<value>161, 12</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>1)http host中间逗号(,)隔开</value>
</data>
<data name="label15.Size" type="System.Drawing.Size, System.Drawing">
<value>77, 12</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>底层传输安全</value>
</data>
<data name="label12.Size" type="System.Drawing.Size, System.Drawing">
<value>197, 12</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>*tcp或kcp或QUIC伪装类型,默认none</value>
</data>
<data name="txtRequestHost.Location" type="System.Drawing.Point, System.Drawing">
<value>124, 58</value>
</data>
<data name="txtRequestHost.Size" type="System.Drawing.Size, System.Drawing">
<value>334, 51</value>
</data>
<data name="label11.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="label11.Text" xml:space="preserve">
<value>伪装类型(type)</value>
</data>
<data name="label10.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 12</value>
</data>
<data name="label10.Text" xml:space="preserve">
<value>伪装域名(host)</value>
</data>
<data name="label9.Size" type="System.Drawing.Size, System.Drawing">
<value>143, 12</value>
</data>
<data name="label9.Text" xml:space="preserve">
<value>*默认tcp,选错会无法连接</value>
</data>
<data name="label8.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>
<data name="label8.Text" xml:space="preserve">
<value>*随便选,建议(auto)</value>
</data>
<data name="cmbNetwork.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 171</value>
</data>
<data name="cmbNetwork.Size" type="System.Drawing.Size, System.Drawing">
<value>211, 20</value>
</data>
<data name="label7.Size" type="System.Drawing.Size, System.Drawing">
<value>107, 12</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>传输协议(network)</value>
</data>
<data name="cmbSecurity.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 143</value>
</data>
<data name="cmbSecurity.Size" type="System.Drawing.Size, System.Drawing">
<value>211, 20</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>别名(remarks)</value>
</data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>113, 12</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>加密方式(security)</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>额外ID(alterId)</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>用户ID(id)</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>端口(port)</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>地址(address)</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value>
</data>
<data name="MenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>92, 21</value>
</data>
<data name="MenuItem1.Text" xml:space="preserve">
<value>导入配置文件</value>
</data>
<data name="MenuItemImportClient.Size" type="System.Drawing.Size, System.Drawing">
<value>171, 22</value>
</data>
<data name="MenuItemImportClient.Text" xml:space="preserve">
<value>导入客户端配置</value>
</data>
<data name="MenuItemImportServer.Size" type="System.Drawing.Size, System.Drawing">
<value>171, 22</value>
</data>
<data name="MenuItemImportServer.Text" xml:space="preserve">
<value>导入服务端配置</value>
</data>
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 6</value>
</data>
<data name="MenuItemImportClipboard.Size" type="System.Drawing.Size, System.Drawing">
<value>171, 22</value>
</data>
<data name="MenuItemImportClipboard.Text" xml:space="preserve">
<value>从剪贴板导入URL</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>编辑或添加[VMess]服务器</value>
</data>
</root>

51
v2rayN/v2rayN/Forms/BaseForm.Designer.cs generated Normal file
View file

@ -0,0 +1,51 @@
namespace v2rayN.Forms
{
partial class BaseForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BaseForm));
this.SuspendLayout();
//
// BaseForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(292, 273);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "BaseForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "BaseForm";
this.ResumeLayout(false);
}
#endregion
}
}

View file

@ -0,0 +1,39 @@
using System;
using System.Windows.Forms;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class BaseForm : Form
{
protected static Config config;
protected static System.Drawing.Icon icon;
public BaseForm()
{
InitializeComponent();
LoadCustomIcon();
}
private void LoadCustomIcon()
{
try
{
if (icon == null)
{
string file = Utils.GetPath(Global.CustomIconName);
if (!System.IO.File.Exists(file))
{
return;
}
icon = new System.Drawing.Icon(file);
}
this.Icon = icon;
}
catch (Exception e)
{
Utils.SaveLog($"Loading custom icon failed: {e.Message}");
}
}
}
}

File diff suppressed because it is too large Load diff

749
v2rayN/v2rayN/Forms/MainForm.Designer.cs generated Normal file
View file

@ -0,0 +1,749 @@
namespace v2rayN.Forms
{
partial class MainForm
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.lvServers = new System.Windows.Forms.ListView();
this.cmsLv = new System.Windows.Forms.ContextMenuStrip(this.components);
this.menuAddVmessServer = new System.Windows.Forms.ToolStripMenuItem();
this.menuAddShadowsocksServer = new System.Windows.Forms.ToolStripMenuItem();
this.menuAddSocksServer = new System.Windows.Forms.ToolStripMenuItem();
this.menuAddCustomServer = new System.Windows.Forms.ToolStripMenuItem();
this.menuAddServers = new System.Windows.Forms.ToolStripMenuItem();
this.menuScanScreen = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.menuRemoveServer = new System.Windows.Forms.ToolStripMenuItem();
this.menuCopyServer = new System.Windows.Forms.ToolStripMenuItem();
this.menuSetDefaultServer = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.menuMoveTop = new System.Windows.Forms.ToolStripMenuItem();
this.menuMoveUp = new System.Windows.Forms.ToolStripMenuItem();
this.menuMoveDown = new System.Windows.Forms.ToolStripMenuItem();
this.menuMoveBottom = new System.Windows.Forms.ToolStripMenuItem();
this.menuSelectAll = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
this.menuPingServer = new System.Windows.Forms.ToolStripMenuItem();
this.menuSpeedServer = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.menuExport2ClientConfig = new System.Windows.Forms.ToolStripMenuItem();
this.menuExport2ServerConfig = new System.Windows.Forms.ToolStripMenuItem();
this.menuExport2ShareUrl = new System.Windows.Forms.ToolStripMenuItem();
this.menuExport2SubContent = new System.Windows.Forms.ToolStripMenuItem();
this.tsbServer = new System.Windows.Forms.ToolStripDropDownButton();
this.qrCodeControl = new v2rayN.Forms.QRCodeControl();
this.notifyMain = new System.Windows.Forms.NotifyIcon(this.components);
this.cmsMain = new System.Windows.Forms.ContextMenuStrip(this.components);
this.menuSysAgentEnabled = new System.Windows.Forms.ToolStripMenuItem();
this.menuSysAgentMode = new System.Windows.Forms.ToolStripMenuItem();
this.menuGlobal = new System.Windows.Forms.ToolStripMenuItem();
this.menuGlobalPAC = new System.Windows.Forms.ToolStripMenuItem();
this.menuKeep = new System.Windows.Forms.ToolStripMenuItem();
this.menuKeepPAC = new System.Windows.Forms.ToolStripMenuItem();
this.menuServers = new System.Windows.Forms.ToolStripMenuItem();
this.menuAddServers2 = new System.Windows.Forms.ToolStripMenuItem();
this.menuScanScreen2 = new System.Windows.Forms.ToolStripMenuItem();
this.menuCopyPACUrl = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.menuExit = new System.Windows.Forms.ToolStripMenuItem();
this.bgwPing = new System.ComponentModel.BackgroundWorker();
this.bgwScan = new System.ComponentModel.BackgroundWorker();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.txtMsgBox = new System.Windows.Forms.TextBox();
this.panel1 = new System.Windows.Forms.Panel();
this.tsMain = new System.Windows.Forms.ToolStrip();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.tsbSub = new System.Windows.Forms.ToolStripDropDownButton();
this.tsbSubSetting = new System.Windows.Forms.ToolStripMenuItem();
this.tsbSubUpdate = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.tsbOptionSetting = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
this.tsbReload = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.tsbCheckUpdate = new System.Windows.Forms.ToolStripDropDownButton();
this.tsbCheckUpdateN = new System.Windows.Forms.ToolStripMenuItem();
this.tsbCheckUpdateCore = new System.Windows.Forms.ToolStripMenuItem();
this.tsbCheckUpdatePACList = new System.Windows.Forms.ToolStripMenuItem();
this.tsbCheckClearPACList = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
this.tsbHelp = new System.Windows.Forms.ToolStripDropDownButton();
this.tsbAbout = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
this.tsbLanguageDef = new System.Windows.Forms.ToolStripMenuItem();
this.tsbLanguageZhHans = new System.Windows.Forms.ToolStripMenuItem();
this.tsbPromotion = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
this.tsbClose = new System.Windows.Forms.ToolStripButton();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.cmsLv.SuspendLayout();
this.cmsMain.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.tsMain.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
resources.ApplyResources(this.splitContainer1, "splitContainer1");
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
resources.ApplyResources(this.splitContainer1.Panel1, "splitContainer1.Panel1");
this.splitContainer1.Panel1.Controls.Add(this.lvServers);
//
// splitContainer1.Panel2
//
resources.ApplyResources(this.splitContainer1.Panel2, "splitContainer1.Panel2");
this.splitContainer1.Panel2.Controls.Add(this.qrCodeControl);
this.splitContainer1.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splitContainer1_SplitterMoved);
//
// lvServers
//
resources.ApplyResources(this.lvServers, "lvServers");
this.lvServers.ContextMenuStrip = this.cmsLv;
this.lvServers.FullRowSelect = true;
this.lvServers.GridLines = true;
this.lvServers.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.lvServers.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
((System.Windows.Forms.ListViewItem)(resources.GetObject("lvServers.Items")))});
this.lvServers.MultiSelect = false;
this.lvServers.Name = "lvServers";
this.lvServers.UseCompatibleStateImageBehavior = false;
this.lvServers.View = System.Windows.Forms.View.Details;
this.lvServers.SelectedIndexChanged += new System.EventHandler(this.lvServers_SelectedIndexChanged);
this.lvServers.DoubleClick += new System.EventHandler(this.lvServers_DoubleClick);
this.lvServers.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lvServers_KeyDown);
//
// cmsLv
//
resources.ApplyResources(this.cmsLv, "cmsLv");
this.cmsLv.ImageScalingSize = new System.Drawing.Size(20, 20);
this.cmsLv.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuAddVmessServer,
this.menuAddShadowsocksServer,
this.menuAddSocksServer,
this.menuAddCustomServer,
this.menuAddServers,
this.menuScanScreen,
this.toolStripSeparator1,
this.menuRemoveServer,
this.menuCopyServer,
this.menuSetDefaultServer,
this.toolStripSeparator3,
this.menuMoveTop,
this.menuMoveUp,
this.menuMoveDown,
this.menuMoveBottom,
this.menuSelectAll,
this.toolStripSeparator9,
this.menuPingServer,
this.menuSpeedServer,
this.toolStripSeparator6,
this.menuExport2ClientConfig,
this.menuExport2ServerConfig,
this.menuExport2ShareUrl,
this.menuExport2SubContent});
this.cmsLv.Name = "cmsLv";
this.cmsLv.OwnerItem = this.tsbServer;
//
// menuAddVmessServer
//
resources.ApplyResources(this.menuAddVmessServer, "menuAddVmessServer");
this.menuAddVmessServer.Name = "menuAddVmessServer";
this.menuAddVmessServer.Click += new System.EventHandler(this.menuAddVmessServer_Click);
//
// menuAddShadowsocksServer
//
resources.ApplyResources(this.menuAddShadowsocksServer, "menuAddShadowsocksServer");
this.menuAddShadowsocksServer.Name = "menuAddShadowsocksServer";
this.menuAddShadowsocksServer.Click += new System.EventHandler(this.menuAddShadowsocksServer_Click);
//
// menuAddSocksServer
//
resources.ApplyResources(this.menuAddSocksServer, "menuAddSocksServer");
this.menuAddSocksServer.Name = "menuAddSocksServer";
this.menuAddSocksServer.Click += new System.EventHandler(this.menuAddSocksServer_Click);
//
// menuAddCustomServer
//
resources.ApplyResources(this.menuAddCustomServer, "menuAddCustomServer");
this.menuAddCustomServer.Name = "menuAddCustomServer";
this.menuAddCustomServer.Click += new System.EventHandler(this.menuAddCustomServer_Click);
//
// menuAddServers
//
resources.ApplyResources(this.menuAddServers, "menuAddServers");
this.menuAddServers.Name = "menuAddServers";
this.menuAddServers.Click += new System.EventHandler(this.menuAddServers_Click);
//
// menuScanScreen
//
resources.ApplyResources(this.menuScanScreen, "menuScanScreen");
this.menuScanScreen.Name = "menuScanScreen";
this.menuScanScreen.Click += new System.EventHandler(this.menuScanScreen_Click);
//
// toolStripSeparator1
//
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
this.toolStripSeparator1.Name = "toolStripSeparator1";
//
// menuRemoveServer
//
resources.ApplyResources(this.menuRemoveServer, "menuRemoveServer");
this.menuRemoveServer.Name = "menuRemoveServer";
this.menuRemoveServer.Click += new System.EventHandler(this.menuRemoveServer_Click);
//
// menuCopyServer
//
resources.ApplyResources(this.menuCopyServer, "menuCopyServer");
this.menuCopyServer.Name = "menuCopyServer";
this.menuCopyServer.Click += new System.EventHandler(this.menuCopyServer_Click);
//
// menuSetDefaultServer
//
resources.ApplyResources(this.menuSetDefaultServer, "menuSetDefaultServer");
this.menuSetDefaultServer.Name = "menuSetDefaultServer";
this.menuSetDefaultServer.Click += new System.EventHandler(this.menuSetDefaultServer_Click);
//
// toolStripSeparator3
//
resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3");
this.toolStripSeparator3.Name = "toolStripSeparator3";
//
// menuMoveTop
//
resources.ApplyResources(this.menuMoveTop, "menuMoveTop");
this.menuMoveTop.Name = "menuMoveTop";
this.menuMoveTop.Click += new System.EventHandler(this.menuMoveTop_Click);
//
// menuMoveUp
//
resources.ApplyResources(this.menuMoveUp, "menuMoveUp");
this.menuMoveUp.Name = "menuMoveUp";
this.menuMoveUp.Click += new System.EventHandler(this.menuMoveUp_Click);
//
// menuMoveDown
//
resources.ApplyResources(this.menuMoveDown, "menuMoveDown");
this.menuMoveDown.Name = "menuMoveDown";
this.menuMoveDown.Click += new System.EventHandler(this.menuMoveDown_Click);
//
// menuMoveBottom
//
resources.ApplyResources(this.menuMoveBottom, "menuMoveBottom");
this.menuMoveBottom.Name = "menuMoveBottom";
this.menuMoveBottom.Click += new System.EventHandler(this.menuMoveBottom_Click);
//
// menuSelectAll
//
resources.ApplyResources(this.menuSelectAll, "menuSelectAll");
this.menuSelectAll.Name = "menuSelectAll";
this.menuSelectAll.Click += new System.EventHandler(this.menuSelectAll_Click);
//
// toolStripSeparator9
//
resources.ApplyResources(this.toolStripSeparator9, "toolStripSeparator9");
this.toolStripSeparator9.Name = "toolStripSeparator9";
//
// menuPingServer
//
resources.ApplyResources(this.menuPingServer, "menuPingServer");
this.menuPingServer.Name = "menuPingServer";
this.menuPingServer.Click += new System.EventHandler(this.menuPingServer_Click);
//
// menuSpeedServer
//
resources.ApplyResources(this.menuSpeedServer, "menuSpeedServer");
this.menuSpeedServer.Name = "menuSpeedServer";
this.menuSpeedServer.Click += new System.EventHandler(this.menuSpeedServer_Click);
//
// toolStripSeparator6
//
resources.ApplyResources(this.toolStripSeparator6, "toolStripSeparator6");
this.toolStripSeparator6.Name = "toolStripSeparator6";
//
// menuExport2ClientConfig
//
resources.ApplyResources(this.menuExport2ClientConfig, "menuExport2ClientConfig");
this.menuExport2ClientConfig.Name = "menuExport2ClientConfig";
this.menuExport2ClientConfig.Click += new System.EventHandler(this.menuExport2ClientConfig_Click);
//
// menuExport2ServerConfig
//
resources.ApplyResources(this.menuExport2ServerConfig, "menuExport2ServerConfig");
this.menuExport2ServerConfig.Name = "menuExport2ServerConfig";
this.menuExport2ServerConfig.Click += new System.EventHandler(this.menuExport2ServerConfig_Click);
//
// menuExport2ShareUrl
//
resources.ApplyResources(this.menuExport2ShareUrl, "menuExport2ShareUrl");
this.menuExport2ShareUrl.Name = "menuExport2ShareUrl";
this.menuExport2ShareUrl.Click += new System.EventHandler(this.menuExport2ShareUrl_Click);
//
// menuExport2SubContent
//
resources.ApplyResources(this.menuExport2SubContent, "menuExport2SubContent");
this.menuExport2SubContent.Name = "menuExport2SubContent";
this.menuExport2SubContent.Click += new System.EventHandler(this.menuExport2SubContent_Click);
//
// tsbServer
//
resources.ApplyResources(this.tsbServer, "tsbServer");
this.tsbServer.DropDown = this.cmsLv;
this.tsbServer.Image = global::v2rayN.Properties.Resources.server;
this.tsbServer.Name = "tsbServer";
//
// qrCodeControl
//
resources.ApplyResources(this.qrCodeControl, "qrCodeControl");
this.qrCodeControl.Name = "qrCodeControl";
//
// notifyMain
//
resources.ApplyResources(this.notifyMain, "notifyMain");
this.notifyMain.ContextMenuStrip = this.cmsMain;
this.notifyMain.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyMain_MouseClick);
//
// cmsMain
//
resources.ApplyResources(this.cmsMain, "cmsMain");
this.cmsMain.ImageScalingSize = new System.Drawing.Size(20, 20);
this.cmsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuSysAgentEnabled,
this.menuSysAgentMode,
this.menuServers,
this.menuAddServers2,
this.menuScanScreen2,
this.menuCopyPACUrl,
this.toolStripSeparator2,
this.menuExit});
this.cmsMain.Name = "contextMenuStrip1";
this.cmsMain.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
this.cmsMain.ShowCheckMargin = true;
this.cmsMain.ShowImageMargin = false;
//
// menuSysAgentEnabled
//
resources.ApplyResources(this.menuSysAgentEnabled, "menuSysAgentEnabled");
this.menuSysAgentEnabled.Name = "menuSysAgentEnabled";
this.menuSysAgentEnabled.Click += new System.EventHandler(this.menuSysAgentEnabled_Click);
//
// menuSysAgentMode
//
resources.ApplyResources(this.menuSysAgentMode, "menuSysAgentMode");
this.menuSysAgentMode.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuGlobal,
this.menuGlobalPAC,
this.menuKeep,
this.menuKeepPAC});
this.menuSysAgentMode.Name = "menuSysAgentMode";
//
// menuGlobal
//
resources.ApplyResources(this.menuGlobal, "menuGlobal");
this.menuGlobal.Name = "menuGlobal";
this.menuGlobal.Click += new System.EventHandler(this.menuGlobal_Click);
//
// menuGlobalPAC
//
resources.ApplyResources(this.menuGlobalPAC, "menuGlobalPAC");
this.menuGlobalPAC.Name = "menuGlobalPAC";
this.menuGlobalPAC.Click += new System.EventHandler(this.menuGlobalPAC_Click);
//
// menuKeep
//
resources.ApplyResources(this.menuKeep, "menuKeep");
this.menuKeep.Name = "menuKeep";
this.menuKeep.Click += new System.EventHandler(this.menuKeep_Click);
//
// menuKeepPAC
//
resources.ApplyResources(this.menuKeepPAC, "menuKeepPAC");
this.menuKeepPAC.Name = "menuKeepPAC";
this.menuKeepPAC.Click += new System.EventHandler(this.menuKeepPAC_Click);
//
// menuServers
//
resources.ApplyResources(this.menuServers, "menuServers");
this.menuServers.Name = "menuServers";
//
// menuAddServers2
//
resources.ApplyResources(this.menuAddServers2, "menuAddServers2");
this.menuAddServers2.Name = "menuAddServers2";
this.menuAddServers2.Click += new System.EventHandler(this.menuAddServers_Click);
//
// menuScanScreen2
//
resources.ApplyResources(this.menuScanScreen2, "menuScanScreen2");
this.menuScanScreen2.Name = "menuScanScreen2";
this.menuScanScreen2.Click += new System.EventHandler(this.menuScanScreen_Click);
//
// menuCopyPACUrl
//
resources.ApplyResources(this.menuCopyPACUrl, "menuCopyPACUrl");
this.menuCopyPACUrl.Name = "menuCopyPACUrl";
this.menuCopyPACUrl.Click += new System.EventHandler(this.menuCopyPACUrl_Click);
//
// toolStripSeparator2
//
resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
this.toolStripSeparator2.Name = "toolStripSeparator2";
//
// menuExit
//
resources.ApplyResources(this.menuExit, "menuExit");
this.menuExit.Name = "menuExit";
this.menuExit.Click += new System.EventHandler(this.menuExit_Click);
//
// bgwPing
//
this.bgwPing.WorkerReportsProgress = true;
this.bgwPing.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bgwPing_DoWork);
this.bgwPing.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bgwPing_ProgressChanged);
//
// bgwScan
//
this.bgwScan.WorkerReportsProgress = true;
this.bgwScan.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bgwScan_DoWork);
this.bgwScan.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bgwScan_ProgressChanged);
//
// groupBox1
//
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Controls.Add(this.splitContainer1);
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// groupBox2
//
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Controls.Add(this.txtMsgBox);
this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false;
//
// txtMsgBox
//
resources.ApplyResources(this.txtMsgBox, "txtMsgBox");
this.txtMsgBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(49)))), ((int)(((byte)(52)))));
this.txtMsgBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtMsgBox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(226)))), ((int)(((byte)(228)))));
this.txtMsgBox.Name = "txtMsgBox";
this.txtMsgBox.ReadOnly = true;
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// tsMain
//
resources.ApplyResources(this.tsMain, "tsMain");
this.tsMain.ImageScalingSize = new System.Drawing.Size(32, 32);
this.tsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbServer,
this.toolStripSeparator4,
this.tsbSub,
this.toolStripSeparator8,
this.tsbOptionSetting,
this.toolStripSeparator5,
this.tsbReload,
this.toolStripSeparator7,
this.tsbCheckUpdate,
this.toolStripSeparator10,
this.tsbHelp,
this.tsbPromotion,
this.toolStripSeparator11,
this.tsbClose});
this.tsMain.Name = "tsMain";
//
// toolStripSeparator4
//
resources.ApplyResources(this.toolStripSeparator4, "toolStripSeparator4");
this.toolStripSeparator4.Name = "toolStripSeparator4";
//
// tsbSub
//
resources.ApplyResources(this.tsbSub, "tsbSub");
this.tsbSub.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbSubSetting,
this.tsbSubUpdate});
this.tsbSub.Image = global::v2rayN.Properties.Resources.sub;
this.tsbSub.Name = "tsbSub";
//
// tsbSubSetting
//
resources.ApplyResources(this.tsbSubSetting, "tsbSubSetting");
this.tsbSubSetting.Name = "tsbSubSetting";
this.tsbSubSetting.Click += new System.EventHandler(this.tsbSubSetting_Click);
//
// tsbSubUpdate
//
resources.ApplyResources(this.tsbSubUpdate, "tsbSubUpdate");
this.tsbSubUpdate.Name = "tsbSubUpdate";
this.tsbSubUpdate.Click += new System.EventHandler(this.tsbSubUpdate_Click);
//
// toolStripSeparator8
//
resources.ApplyResources(this.toolStripSeparator8, "toolStripSeparator8");
this.toolStripSeparator8.Name = "toolStripSeparator8";
//
// tsbOptionSetting
//
resources.ApplyResources(this.tsbOptionSetting, "tsbOptionSetting");
this.tsbOptionSetting.Image = global::v2rayN.Properties.Resources.option;
this.tsbOptionSetting.Name = "tsbOptionSetting";
this.tsbOptionSetting.Click += new System.EventHandler(this.tsbOptionSetting_Click);
//
// toolStripSeparator5
//
resources.ApplyResources(this.toolStripSeparator5, "toolStripSeparator5");
this.toolStripSeparator5.Name = "toolStripSeparator5";
//
// tsbReload
//
resources.ApplyResources(this.tsbReload, "tsbReload");
this.tsbReload.Name = "tsbReload";
this.tsbReload.Click += new System.EventHandler(this.tsbReload_Click);
//
// toolStripSeparator7
//
resources.ApplyResources(this.toolStripSeparator7, "toolStripSeparator7");
this.toolStripSeparator7.Name = "toolStripSeparator7";
//
// tsbCheckUpdate
//
resources.ApplyResources(this.tsbCheckUpdate, "tsbCheckUpdate");
this.tsbCheckUpdate.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbCheckUpdateN,
this.tsbCheckUpdateCore,
this.tsbCheckUpdatePACList,
this.tsbCheckClearPACList});
this.tsbCheckUpdate.Image = global::v2rayN.Properties.Resources.checkupdate;
this.tsbCheckUpdate.Name = "tsbCheckUpdate";
//
// tsbCheckUpdateN
//
resources.ApplyResources(this.tsbCheckUpdateN, "tsbCheckUpdateN");
this.tsbCheckUpdateN.Name = "tsbCheckUpdateN";
this.tsbCheckUpdateN.Click += new System.EventHandler(this.tsbCheckUpdateN_Click);
//
// tsbCheckUpdateCore
//
resources.ApplyResources(this.tsbCheckUpdateCore, "tsbCheckUpdateCore");
this.tsbCheckUpdateCore.Name = "tsbCheckUpdateCore";
this.tsbCheckUpdateCore.Click += new System.EventHandler(this.tsbCheckUpdateCore_Click);
//
// tsbCheckUpdatePACList
//
resources.ApplyResources(this.tsbCheckUpdatePACList, "tsbCheckUpdatePACList");
this.tsbCheckUpdatePACList.Name = "tsbCheckUpdatePACList";
this.tsbCheckUpdatePACList.Click += new System.EventHandler(this.tsbCheckUpdatePACList_Click);
//
// tsbCheckClearPACList
//
resources.ApplyResources(this.tsbCheckClearPACList, "tsbCheckClearPACList");
this.tsbCheckClearPACList.Name = "tsbCheckClearPACList";
this.tsbCheckClearPACList.Click += new System.EventHandler(this.tsbCheckClearPACList_Click);
//
// toolStripSeparator10
//
resources.ApplyResources(this.toolStripSeparator10, "toolStripSeparator10");
this.toolStripSeparator10.Name = "toolStripSeparator10";
//
// tsbHelp
//
resources.ApplyResources(this.tsbHelp, "tsbHelp");
this.tsbHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbAbout,
this.toolStripSeparator12,
this.tsbLanguageDef,
this.tsbLanguageZhHans});
this.tsbHelp.Image = global::v2rayN.Properties.Resources.help;
this.tsbHelp.Name = "tsbHelp";
//
// tsbAbout
//
resources.ApplyResources(this.tsbAbout, "tsbAbout");
this.tsbAbout.Name = "tsbAbout";
this.tsbAbout.Click += new System.EventHandler(this.tsbAbout_Click);
//
// toolStripSeparator12
//
resources.ApplyResources(this.toolStripSeparator12, "toolStripSeparator12");
this.toolStripSeparator12.Name = "toolStripSeparator12";
//
// tsbLanguageDef
//
resources.ApplyResources(this.tsbLanguageDef, "tsbLanguageDef");
this.tsbLanguageDef.Name = "tsbLanguageDef";
this.tsbLanguageDef.Click += new System.EventHandler(this.tsbLanguageDef_Click);
//
// tsbLanguageZhHans
//
resources.ApplyResources(this.tsbLanguageZhHans, "tsbLanguageZhHans");
this.tsbLanguageZhHans.Name = "tsbLanguageZhHans";
this.tsbLanguageZhHans.Click += new System.EventHandler(this.tsbLanguageZhHans_Click);
//
// tsbPromotion
//
resources.ApplyResources(this.tsbPromotion, "tsbPromotion");
this.tsbPromotion.ForeColor = System.Drawing.Color.Black;
this.tsbPromotion.Image = global::v2rayN.Properties.Resources.promotion;
this.tsbPromotion.Name = "tsbPromotion";
this.tsbPromotion.Click += new System.EventHandler(this.tsbPromotion_Click);
//
// toolStripSeparator11
//
resources.ApplyResources(this.toolStripSeparator11, "toolStripSeparator11");
this.toolStripSeparator11.Name = "toolStripSeparator11";
//
// tsbClose
//
resources.ApplyResources(this.tsbClose, "tsbClose");
this.tsbClose.Name = "tsbClose";
this.tsbClose.Click += new System.EventHandler(this.tsbClose_Click);
//
// MainForm
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.tsMain);
this.MaximizeBox = true;
this.MinimizeBox = true;
this.Name = "MainForm";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
this.Load += new System.EventHandler(this.MainForm_Load);
this.Shown += new System.EventHandler(this.MainForm_Shown);
this.Resize += new System.EventHandler(this.MainForm_Resize);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.cmsLv.ResumeLayout(false);
this.cmsMain.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.tsMain.ResumeLayout(false);
this.tsMain.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TextBox txtMsgBox;
private System.Windows.Forms.ListView lvServers;
private System.Windows.Forms.NotifyIcon notifyMain;
private System.Windows.Forms.ContextMenuStrip cmsMain;
private System.Windows.Forms.ToolStripMenuItem menuExit;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.ToolStripMenuItem menuServers;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.ComponentModel.BackgroundWorker bgwPing;
private System.Windows.Forms.ContextMenuStrip cmsLv;
private System.Windows.Forms.ToolStripMenuItem menuAddVmessServer;
private System.Windows.Forms.ToolStripMenuItem menuRemoveServer;
private System.Windows.Forms.ToolStripMenuItem menuSetDefaultServer;
private System.Windows.Forms.ToolStripMenuItem menuCopyServer;
private System.Windows.Forms.ToolStripMenuItem menuPingServer;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripMenuItem menuExport2ClientConfig;
private System.Windows.Forms.ToolStripMenuItem menuExport2ServerConfig;
private System.Windows.Forms.ToolStrip tsMain;
private System.Windows.Forms.ToolStripDropDownButton tsbServer;
private System.Windows.Forms.ToolStripButton tsbOptionSetting;
private System.Windows.Forms.ToolStripButton tsbReload;
private System.Windows.Forms.ToolStripButton tsbClose;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
private System.Windows.Forms.ToolStripMenuItem menuMoveTop;
private System.Windows.Forms.ToolStripMenuItem menuMoveUp;
private System.Windows.Forms.ToolStripMenuItem menuMoveDown;
private System.Windows.Forms.ToolStripMenuItem menuMoveBottom;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
private System.Windows.Forms.ToolStripMenuItem menuSysAgentMode;
private System.Windows.Forms.ToolStripMenuItem menuGlobal;
private System.Windows.Forms.ToolStripMenuItem menuGlobalPAC;
private System.Windows.Forms.ToolStripMenuItem menuKeep;
private System.Windows.Forms.ToolStripMenuItem menuSysAgentEnabled;
private System.Windows.Forms.ToolStripMenuItem menuCopyPACUrl;
private System.Windows.Forms.ToolStripMenuItem menuAddCustomServer;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem menuAddShadowsocksServer;
private System.Windows.Forms.SplitContainer splitContainer1;
private QRCodeControl qrCodeControl;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;
private System.Windows.Forms.ToolStripDropDownButton tsbCheckUpdate;
private System.Windows.Forms.ToolStripMenuItem tsbCheckUpdateN;
private System.Windows.Forms.ToolStripMenuItem tsbCheckUpdateCore;
private System.Windows.Forms.ToolStripMenuItem tsbCheckUpdatePACList;
private System.Windows.Forms.ToolStripMenuItem menuAddServers;
private System.Windows.Forms.ToolStripMenuItem menuExport2ShareUrl;
private System.Windows.Forms.ToolStripMenuItem menuSpeedServer;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator11;
private System.Windows.Forms.ToolStripDropDownButton tsbHelp;
private System.Windows.Forms.ToolStripMenuItem tsbAbout;
private System.Windows.Forms.ToolStripMenuItem menuAddServers2;
private System.ComponentModel.BackgroundWorker bgwScan;
private System.Windows.Forms.ToolStripMenuItem menuScanScreen;
private System.Windows.Forms.ToolStripMenuItem menuScanScreen2;
private System.Windows.Forms.ToolStripDropDownButton tsbSub;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
private System.Windows.Forms.ToolStripMenuItem tsbSubSetting;
private System.Windows.Forms.ToolStripMenuItem tsbSubUpdate;
private System.Windows.Forms.ToolStripMenuItem tsbCheckClearPACList;
private System.Windows.Forms.ToolStripMenuItem menuKeepPAC;
private System.Windows.Forms.ToolStripMenuItem menuSelectAll;
private System.Windows.Forms.ToolStripMenuItem menuExport2SubContent;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator12;
private System.Windows.Forms.ToolStripMenuItem tsbLanguageDef;
private System.Windows.Forms.ToolStripMenuItem tsbLanguageZhHans;
private System.Windows.Forms.ToolStripButton tsbPromotion;
private System.Windows.Forms.ToolStripMenuItem menuAddSocksServer;
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,453 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="menuAddVmessServer.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuAddVmessServer.Text" xml:space="preserve">
<value>添加[VMess]服务器</value>
</data>
<data name="menuAddShadowsocksServer.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuAddShadowsocksServer.Text" xml:space="preserve">
<value>添加[Shadowsocks]服务器</value>
</data>
<data name="menuAddSocksServer.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuAddSocksServer.Text" xml:space="preserve">
<value>添加[Socks]服务器</value>
</data>
<data name="menuAddCustomServer.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuAddCustomServer.Text" xml:space="preserve">
<value>添加自定义配置服务器</value>
</data>
<data name="menuAddServers.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuAddServers.Text" xml:space="preserve">
<value>从剪贴板导入批量URL</value>
</data>
<data name="menuScanScreen.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuScanScreen.Text" xml:space="preserve">
<value>扫描屏幕上的二维码</value>
</data>
<data name="toolStripSeparator1.Size" type="System.Drawing.Size, System.Drawing">
<value>249, 6</value>
</data>
<data name="menuRemoveServer.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuRemoveServer.Text" xml:space="preserve">
<value>移除所选服务器(多选) (Delete)</value>
</data>
<data name="menuCopyServer.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuCopyServer.Text" xml:space="preserve">
<value>复制所选服务器</value>
</data>
<data name="menuSetDefaultServer.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuSetDefaultServer.Text" xml:space="preserve">
<value>设为活动服务器 (Enter)</value>
</data>
<data name="toolStripSeparator3.Size" type="System.Drawing.Size, System.Drawing">
<value>249, 6</value>
</data>
<data name="menuMoveTop.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuMoveTop.Text" xml:space="preserve">
<value>上移至顶</value>
</data>
<data name="menuMoveUp.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuMoveUp.Text" xml:space="preserve">
<value>上移 (U)</value>
</data>
<data name="menuMoveDown.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuMoveDown.Text" xml:space="preserve">
<value>下移 (D)</value>
</data>
<data name="menuMoveBottom.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuMoveBottom.Text" xml:space="preserve">
<value>下移至底</value>
</data>
<data name="menuSelectAll.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuSelectAll.Text" xml:space="preserve">
<value>全选 (Ctrl+A)</value>
</data>
<data name="toolStripSeparator9.Size" type="System.Drawing.Size, System.Drawing">
<value>249, 6</value>
</data>
<data name="menuPingServer.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuPingServer.Text" xml:space="preserve">
<value>测试服务器延迟(多选)</value>
</data>
<data name="menuSpeedServer.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuSpeedServer.Text" xml:space="preserve">
<value>测试服务器速度(多选)</value>
</data>
<data name="toolStripSeparator6.Size" type="System.Drawing.Size, System.Drawing">
<value>249, 6</value>
</data>
<data name="menuExport2ClientConfig.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuExport2ClientConfig.Text" xml:space="preserve">
<value>导出所选服务器为客户端配置</value>
</data>
<data name="menuExport2ServerConfig.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuExport2ServerConfig.Text" xml:space="preserve">
<value>导出所选服务器为服务端配置</value>
</data>
<data name="menuExport2ShareUrl.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuExport2ShareUrl.Text" xml:space="preserve">
<value>批量导出分享URL至剪贴板(多选)</value>
</data>
<data name="menuExport2SubContent.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 22</value>
</data>
<data name="menuExport2SubContent.Text" xml:space="preserve">
<value>批量导出订阅内容至剪贴板(多选)</value>
</data>
<data name="tsbServer.Size" type="System.Drawing.Size, System.Drawing">
<value>73, 53</value>
</data>
<data name="tsbServer.Text" xml:space="preserve">
<value> 服务器 </value>
</data>
<data name="cmsLv.Size" type="System.Drawing.Size, System.Drawing">
<value>253, 468</value>
</data>
<data name="lvServers.Items" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkMAwAAAFFTeXN0
ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2Vu
PWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACFTeXN0ZW0uV2luZG93cy5Gb3Jtcy5MaXN0Vmlld0l0ZW0HAAAA
BFRleHQKSW1hZ2VJbmRleAlCYWNrQ29sb3IHQ2hlY2tlZARGb250CUZvcmVDb2xvchdVc2VJdGVtU3R5
bGVGb3JTdWJJdGVtcwEABAAEBAAIFFN5c3RlbS5EcmF3aW5nLkNvbG9yAwAAAAETU3lzdGVtLkRyYXdp
bmcuRm9udAMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAAQIAAAAGBAAAAAD/////Bfv///8UU3lz
dGVtLkRyYXdpbmcuQ29sb3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xvcgVzdGF0ZQEAAAAJBwcDAAAA
CgAAAAAAAAAAGAABAAAJBgAAAAH5////+////woAAAAAAAAAABoAAQABBQYAAAATU3lzdGVtLkRyYXdp
bmcuRm9udAQAAAAETmFtZQRTaXplBVN0eWxlBFVuaXQBAAQECxhTeXN0ZW0uRHJhd2luZy5Gb250U3R5
bGUDAAAAG1N5c3RlbS5EcmF3aW5nLkdyYXBoaWNzVW5pdAMAAAADAAAABggAAAAG5a6L5L2TAAAQQQX3
////GFN5c3RlbS5EcmF3aW5nLkZvbnRTdHlsZQEAAAAHdmFsdWVfXwAIAwAAAAAAAAAF9v///xtTeXN0
ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAADAAAACw==
</value>
</data>
<data name="menuSysAgentEnabled.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
</data>
<data name="menuSysAgentEnabled.Text" xml:space="preserve">
<value>启用Http代理</value>
</data>
<data name="menuGlobal.Size" type="System.Drawing.Size, System.Drawing">
<value>340, 22</value>
</data>
<data name="menuGlobal.Text" xml:space="preserve">
<value>开启Http代理,并自动配置代理服务器(全局模式)</value>
</data>
<data name="menuGlobalPAC.Size" type="System.Drawing.Size, System.Drawing">
<value>340, 22</value>
</data>
<data name="menuGlobalPAC.Text" xml:space="preserve">
<value>开启PAC,并自动配置PAC(PAC模式)</value>
</data>
<data name="menuKeep.Size" type="System.Drawing.Size, System.Drawing">
<value>340, 22</value>
</data>
<data name="menuKeep.Text" xml:space="preserve">
<value>仅开启Http代理,不自动配置代理服务器(直连模式)</value>
</data>
<data name="menuKeepPAC.Size" type="System.Drawing.Size, System.Drawing">
<value>340, 22</value>
</data>
<data name="menuKeepPAC.Text" xml:space="preserve">
<value>仅开启PAC,不自动配置PAC</value>
</data>
<data name="menuSysAgentMode.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
</data>
<data name="menuSysAgentMode.Text" xml:space="preserve">
<value>Http代理模式</value>
</data>
<data name="menuServers.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
</data>
<data name="menuServers.Text" xml:space="preserve">
<value>服务器</value>
</data>
<data name="menuAddServers2.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
</data>
<data name="menuAddServers2.Text" xml:space="preserve">
<value>从剪贴板导入批量URL</value>
</data>
<data name="menuScanScreen2.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
</data>
<data name="menuScanScreen2.Text" xml:space="preserve">
<value>扫描屏幕上的二维码</value>
</data>
<data name="menuCopyPACUrl.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
</data>
<data name="menuCopyPACUrl.Text" xml:space="preserve">
<value>复制本地PAC网址</value>
</data>
<data name="toolStripSeparator2.Size" type="System.Drawing.Size, System.Drawing">
<value>192, 6</value>
</data>
<data name="menuExit.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
</data>
<data name="menuExit.Text" xml:space="preserve">
<value>退出</value>
</data>
<data name="cmsMain.Size" type="System.Drawing.Size, System.Drawing">
<value>196, 164</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>服务器列表</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>信息</value>
</data>
<data name="tsbSubSetting.Size" type="System.Drawing.Size, System.Drawing">
<value>124, 22</value>
</data>
<data name="tsbSubSetting.Text" xml:space="preserve">
<value>订阅设置</value>
</data>
<data name="tsbSubUpdate.Size" type="System.Drawing.Size, System.Drawing">
<value>124, 22</value>
</data>
<data name="tsbSubUpdate.Text" xml:space="preserve">
<value>更新订阅</value>
</data>
<data name="tsbSub.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 53</value>
</data>
<data name="tsbSub.Text" xml:space="preserve">
<value> 订阅 </value>
</data>
<data name="tsbOptionSetting.Size" type="System.Drawing.Size, System.Drawing">
<value>76, 53</value>
</data>
<data name="tsbOptionSetting.Text" xml:space="preserve">
<value> 参数设置 </value>
</data>
<data name="tsbReload.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE3SURBVFhH7ZaBDQIhDEVvBEdwBDfQDXQER3AD3cARdAPd
QDfSDbQvuSb1AicFjJrwkxcN0FIolOuamv5VE2E+gLaPayWchEcE+hhTXVPhIoQmDcFYbKpoJtwEdX4X
jgIrXfTwnzb6dBw22BaJVdjJmWQs1/SdBRtE0U5cBXW2oSFRO0HtSEeW2FZ1wsq9sjuRdTDVAXnNuWLY
6JnAl0sYa/Q5q1dhq35ci+Bkq2HJvbZpxGeybAAuw4Fq+cnW1wPITgHFYxvBUw+qHEIL1yq1vDKhVlH3
NQwF4JkcFRWiUAB7IVW2FFPO3YqlgPd+LJf02e8Fdi3rMdIAcLDuf9UpeT0IS0G/hvhPm305vSl7EQFY
B6zCvozvYGzRM8zEoeg5TPZwDaGvpHQni1yzSxbXPW9q+hF13ROHuJnQcjbhtQAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsbReload.Size" type="System.Drawing.Size, System.Drawing">
<value>76, 53</value>
</data>
<data name="tsbReload.Text" xml:space="preserve">
<value> 重启服务 </value>
</data>
<data name="tsbCheckUpdateN.Size" type="System.Drawing.Size, System.Drawing">
<value>232, 22</value>
</data>
<data name="tsbCheckUpdateN.Text" xml:space="preserve">
<value>检查更新v2rayN</value>
</data>
<data name="tsbCheckUpdateCore.Size" type="System.Drawing.Size, System.Drawing">
<value>232, 22</value>
</data>
<data name="tsbCheckUpdateCore.Text" xml:space="preserve">
<value>检查更新v2rayCore</value>
</data>
<data name="tsbCheckUpdatePACList.Size" type="System.Drawing.Size, System.Drawing">
<value>232, 22</value>
</data>
<data name="tsbCheckUpdatePACList.Text" xml:space="preserve">
<value>检查更新PAC (需要Http代理)</value>
</data>
<data name="tsbCheckClearPACList.Size" type="System.Drawing.Size, System.Drawing">
<value>232, 22</value>
</data>
<data name="tsbCheckClearPACList.Text" xml:space="preserve">
<value>简化PAC (请设置Core路由)</value>
</data>
<data name="tsbCheckUpdate.Size" type="System.Drawing.Size, System.Drawing">
<value>85, 53</value>
</data>
<data name="tsbCheckUpdate.Text" xml:space="preserve">
<value> 检查更新 </value>
</data>
<data name="tsbAbout.Text" xml:space="preserve">
<value>关于</value>
</data>
<data name="tsbHelp.Size" type="System.Drawing.Size, System.Drawing">
<value>69, 53</value>
</data>
<data name="tsbHelp.Text" xml:space="preserve">
<value> 帮助 </value>
</data>
<data name="tsbPromotion.Size" type="System.Drawing.Size, System.Drawing">
<value>68, 53</value>
</data>
<data name="tsbPromotion.Text" xml:space="preserve">
<value> 推广 </value>
</data>
<data name="tsbClose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAySURBVFhH7c6xDQAgCEVBRnVTHU2ZABuMxV3yOvJDAAA/
GqfZVG6X8mg1dfUAAPBQxAZd0SJruVXHWwAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsbClose.Text" xml:space="preserve">
<value> 关闭 </value>
</data>
</root>

View file

@ -0,0 +1,623 @@
namespace v2rayN.Forms
{
partial class OptionSettingForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OptionSettingForm));
this.btnClose = new System.Windows.Forms.Button();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.chksniffingEnabled2 = new System.Windows.Forms.CheckBox();
this.chksniffingEnabled = new System.Windows.Forms.CheckBox();
this.txtremoteDNS = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.chkmuxEnabled = new System.Windows.Forms.CheckBox();
this.chkAllowIn2 = new System.Windows.Forms.CheckBox();
this.chkudpEnabled2 = new System.Windows.Forms.CheckBox();
this.cmbprotocol2 = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.txtlocalPort2 = new System.Windows.Forms.TextBox();
this.cmbprotocol = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.chkudpEnabled = new System.Windows.Forms.CheckBox();
this.chklogEnabled = new System.Windows.Forms.CheckBox();
this.cmbloglevel = new System.Windows.Forms.ComboBox();
this.label5 = new System.Windows.Forms.Label();
this.txtlocalPort = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.tabControl2 = new System.Windows.Forms.TabControl();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.txtUseragent = new System.Windows.Forms.TextBox();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.txtUserdirect = new System.Windows.Forms.TextBox();
this.tabPage5 = new System.Windows.Forms.TabPage();
this.txtUserblock = new System.Windows.Forms.TextBox();
this.panel3 = new System.Windows.Forms.Panel();
this.btnSetDefRountingRule = new System.Windows.Forms.Button();
this.cmbdomainStrategy = new System.Windows.Forms.ComboBox();
this.labRoutingTips = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.cmbroutingMode = new System.Windows.Forms.ComboBox();
this.tabPage6 = new System.Windows.Forms.TabPage();
this.chkKcpcongestion = new System.Windows.Forms.CheckBox();
this.txtKcpwriteBufferSize = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.txtKcpreadBufferSize = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.txtKcpdownlinkCapacity = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.txtKcpuplinkCapacity = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.txtKcptti = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.txtKcpmtu = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.tabPage7 = new System.Windows.Forms.TabPage();
this.chkAllowLANConn = new System.Windows.Forms.CheckBox();
this.txturlGFWList = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.chkAutoRun = new System.Windows.Forms.CheckBox();
this.panel2 = new System.Windows.Forms.Panel();
this.btnOK = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.groupBox2.SuspendLayout();
this.tabControl2.SuspendLayout();
this.tabPage3.SuspendLayout();
this.tabPage4.SuspendLayout();
this.tabPage5.SuspendLayout();
this.panel3.SuspendLayout();
this.tabPage6.SuspendLayout();
this.tabPage7.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// btnClose
//
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.Name = "btnClose";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage6);
this.tabControl1.Controls.Add(this.tabPage7);
resources.ApplyResources(this.tabControl1, "tabControl1");
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.groupBox1);
resources.ApplyResources(this.tabPage1, "tabPage1");
this.tabPage1.Name = "tabPage1";
this.tabPage1.UseVisualStyleBackColor = true;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.chksniffingEnabled2);
this.groupBox1.Controls.Add(this.chksniffingEnabled);
this.groupBox1.Controls.Add(this.txtremoteDNS);
this.groupBox1.Controls.Add(this.label14);
this.groupBox1.Controls.Add(this.chkmuxEnabled);
this.groupBox1.Controls.Add(this.chkAllowIn2);
this.groupBox1.Controls.Add(this.chkudpEnabled2);
this.groupBox1.Controls.Add(this.cmbprotocol2);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.txtlocalPort2);
this.groupBox1.Controls.Add(this.cmbprotocol);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.chkudpEnabled);
this.groupBox1.Controls.Add(this.chklogEnabled);
this.groupBox1.Controls.Add(this.cmbloglevel);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.txtlocalPort);
this.groupBox1.Controls.Add(this.label2);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// chksniffingEnabled2
//
resources.ApplyResources(this.chksniffingEnabled2, "chksniffingEnabled2");
this.chksniffingEnabled2.Name = "chksniffingEnabled2";
this.chksniffingEnabled2.UseVisualStyleBackColor = true;
//
// chksniffingEnabled
//
resources.ApplyResources(this.chksniffingEnabled, "chksniffingEnabled");
this.chksniffingEnabled.Name = "chksniffingEnabled";
this.chksniffingEnabled.UseVisualStyleBackColor = true;
//
// txtremoteDNS
//
resources.ApplyResources(this.txtremoteDNS, "txtremoteDNS");
this.txtremoteDNS.Name = "txtremoteDNS";
//
// label14
//
resources.ApplyResources(this.label14, "label14");
this.label14.Name = "label14";
//
// chkmuxEnabled
//
resources.ApplyResources(this.chkmuxEnabled, "chkmuxEnabled");
this.chkmuxEnabled.Name = "chkmuxEnabled";
this.chkmuxEnabled.UseVisualStyleBackColor = true;
//
// chkAllowIn2
//
resources.ApplyResources(this.chkAllowIn2, "chkAllowIn2");
this.chkAllowIn2.Name = "chkAllowIn2";
this.chkAllowIn2.UseVisualStyleBackColor = true;
this.chkAllowIn2.CheckedChanged += new System.EventHandler(this.chkAllowIn2_CheckedChanged);
//
// chkudpEnabled2
//
resources.ApplyResources(this.chkudpEnabled2, "chkudpEnabled2");
this.chkudpEnabled2.Name = "chkudpEnabled2";
this.chkudpEnabled2.UseVisualStyleBackColor = true;
//
// cmbprotocol2
//
this.cmbprotocol2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbprotocol2.FormattingEnabled = true;
this.cmbprotocol2.Items.AddRange(new object[] {
resources.GetString("cmbprotocol2.Items"),
resources.GetString("cmbprotocol2.Items1")});
resources.ApplyResources(this.cmbprotocol2, "cmbprotocol2");
this.cmbprotocol2.Name = "cmbprotocol2";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// txtlocalPort2
//
resources.ApplyResources(this.txtlocalPort2, "txtlocalPort2");
this.txtlocalPort2.Name = "txtlocalPort2";
//
// cmbprotocol
//
this.cmbprotocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
resources.ApplyResources(this.cmbprotocol, "cmbprotocol");
this.cmbprotocol.FormattingEnabled = true;
this.cmbprotocol.Items.AddRange(new object[] {
resources.GetString("cmbprotocol.Items"),
resources.GetString("cmbprotocol.Items1")});
this.cmbprotocol.Name = "cmbprotocol";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// chkudpEnabled
//
resources.ApplyResources(this.chkudpEnabled, "chkudpEnabled");
this.chkudpEnabled.Name = "chkudpEnabled";
this.chkudpEnabled.UseVisualStyleBackColor = true;
//
// chklogEnabled
//
resources.ApplyResources(this.chklogEnabled, "chklogEnabled");
this.chklogEnabled.Name = "chklogEnabled";
this.chklogEnabled.UseVisualStyleBackColor = true;
//
// cmbloglevel
//
this.cmbloglevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbloglevel.FormattingEnabled = true;
this.cmbloglevel.Items.AddRange(new object[] {
resources.GetString("cmbloglevel.Items"),
resources.GetString("cmbloglevel.Items1"),
resources.GetString("cmbloglevel.Items2"),
resources.GetString("cmbloglevel.Items3"),
resources.GetString("cmbloglevel.Items4")});
resources.ApplyResources(this.cmbloglevel, "cmbloglevel");
this.cmbloglevel.Name = "cmbloglevel";
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// txtlocalPort
//
resources.ApplyResources(this.txtlocalPort, "txtlocalPort");
this.txtlocalPort.Name = "txtlocalPort";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// tabPage2
//
this.tabPage2.Controls.Add(this.groupBox2);
resources.ApplyResources(this.tabPage2, "tabPage2");
this.tabPage2.Name = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.tabControl2);
this.groupBox2.Controls.Add(this.panel3);
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false;
//
// tabControl2
//
this.tabControl2.Controls.Add(this.tabPage3);
this.tabControl2.Controls.Add(this.tabPage4);
this.tabControl2.Controls.Add(this.tabPage5);
resources.ApplyResources(this.tabControl2, "tabControl2");
this.tabControl2.Name = "tabControl2";
this.tabControl2.SelectedIndex = 0;
//
// tabPage3
//
this.tabPage3.Controls.Add(this.txtUseragent);
resources.ApplyResources(this.tabPage3, "tabPage3");
this.tabPage3.Name = "tabPage3";
this.tabPage3.UseVisualStyleBackColor = true;
//
// txtUseragent
//
resources.ApplyResources(this.txtUseragent, "txtUseragent");
this.txtUseragent.Name = "txtUseragent";
//
// tabPage4
//
this.tabPage4.Controls.Add(this.txtUserdirect);
resources.ApplyResources(this.tabPage4, "tabPage4");
this.tabPage4.Name = "tabPage4";
this.tabPage4.UseVisualStyleBackColor = true;
//
// txtUserdirect
//
resources.ApplyResources(this.txtUserdirect, "txtUserdirect");
this.txtUserdirect.Name = "txtUserdirect";
//
// tabPage5
//
this.tabPage5.Controls.Add(this.txtUserblock);
resources.ApplyResources(this.tabPage5, "tabPage5");
this.tabPage5.Name = "tabPage5";
this.tabPage5.UseVisualStyleBackColor = true;
//
// txtUserblock
//
resources.ApplyResources(this.txtUserblock, "txtUserblock");
this.txtUserblock.Name = "txtUserblock";
//
// panel3
//
this.panel3.Controls.Add(this.btnSetDefRountingRule);
this.panel3.Controls.Add(this.cmbdomainStrategy);
this.panel3.Controls.Add(this.labRoutingTips);
this.panel3.Controls.Add(this.label15);
this.panel3.Controls.Add(this.label12);
this.panel3.Controls.Add(this.cmbroutingMode);
resources.ApplyResources(this.panel3, "panel3");
this.panel3.Name = "panel3";
//
// btnSetDefRountingRule
//
resources.ApplyResources(this.btnSetDefRountingRule, "btnSetDefRountingRule");
this.btnSetDefRountingRule.Name = "btnSetDefRountingRule";
this.btnSetDefRountingRule.UseVisualStyleBackColor = true;
this.btnSetDefRountingRule.Click += new System.EventHandler(this.btnSetDefRountingRule_Click);
//
// cmbdomainStrategy
//
this.cmbdomainStrategy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbdomainStrategy.FormattingEnabled = true;
this.cmbdomainStrategy.Items.AddRange(new object[] {
resources.GetString("cmbdomainStrategy.Items"),
resources.GetString("cmbdomainStrategy.Items1"),
resources.GetString("cmbdomainStrategy.Items2")});
resources.ApplyResources(this.cmbdomainStrategy, "cmbdomainStrategy");
this.cmbdomainStrategy.Name = "cmbdomainStrategy";
//
// labRoutingTips
//
this.labRoutingTips.ForeColor = System.Drawing.Color.Brown;
resources.ApplyResources(this.labRoutingTips, "labRoutingTips");
this.labRoutingTips.Name = "labRoutingTips";
//
// label15
//
resources.ApplyResources(this.label15, "label15");
this.label15.Name = "label15";
//
// label12
//
resources.ApplyResources(this.label12, "label12");
this.label12.Name = "label12";
//
// cmbroutingMode
//
this.cmbroutingMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbroutingMode.FormattingEnabled = true;
this.cmbroutingMode.Items.AddRange(new object[] {
resources.GetString("cmbroutingMode.Items"),
resources.GetString("cmbroutingMode.Items1"),
resources.GetString("cmbroutingMode.Items2"),
resources.GetString("cmbroutingMode.Items3")});
resources.ApplyResources(this.cmbroutingMode, "cmbroutingMode");
this.cmbroutingMode.Name = "cmbroutingMode";
//
// tabPage6
//
this.tabPage6.Controls.Add(this.chkKcpcongestion);
this.tabPage6.Controls.Add(this.txtKcpwriteBufferSize);
this.tabPage6.Controls.Add(this.label10);
this.tabPage6.Controls.Add(this.txtKcpreadBufferSize);
this.tabPage6.Controls.Add(this.label11);
this.tabPage6.Controls.Add(this.txtKcpdownlinkCapacity);
this.tabPage6.Controls.Add(this.label8);
this.tabPage6.Controls.Add(this.txtKcpuplinkCapacity);
this.tabPage6.Controls.Add(this.label9);
this.tabPage6.Controls.Add(this.txtKcptti);
this.tabPage6.Controls.Add(this.label7);
this.tabPage6.Controls.Add(this.txtKcpmtu);
this.tabPage6.Controls.Add(this.label6);
resources.ApplyResources(this.tabPage6, "tabPage6");
this.tabPage6.Name = "tabPage6";
this.tabPage6.UseVisualStyleBackColor = true;
//
// chkKcpcongestion
//
resources.ApplyResources(this.chkKcpcongestion, "chkKcpcongestion");
this.chkKcpcongestion.Name = "chkKcpcongestion";
this.chkKcpcongestion.UseVisualStyleBackColor = true;
//
// txtKcpwriteBufferSize
//
resources.ApplyResources(this.txtKcpwriteBufferSize, "txtKcpwriteBufferSize");
this.txtKcpwriteBufferSize.Name = "txtKcpwriteBufferSize";
//
// label10
//
resources.ApplyResources(this.label10, "label10");
this.label10.Name = "label10";
//
// txtKcpreadBufferSize
//
resources.ApplyResources(this.txtKcpreadBufferSize, "txtKcpreadBufferSize");
this.txtKcpreadBufferSize.Name = "txtKcpreadBufferSize";
//
// label11
//
resources.ApplyResources(this.label11, "label11");
this.label11.Name = "label11";
//
// txtKcpdownlinkCapacity
//
resources.ApplyResources(this.txtKcpdownlinkCapacity, "txtKcpdownlinkCapacity");
this.txtKcpdownlinkCapacity.Name = "txtKcpdownlinkCapacity";
//
// label8
//
resources.ApplyResources(this.label8, "label8");
this.label8.Name = "label8";
//
// txtKcpuplinkCapacity
//
resources.ApplyResources(this.txtKcpuplinkCapacity, "txtKcpuplinkCapacity");
this.txtKcpuplinkCapacity.Name = "txtKcpuplinkCapacity";
//
// label9
//
resources.ApplyResources(this.label9, "label9");
this.label9.Name = "label9";
//
// txtKcptti
//
resources.ApplyResources(this.txtKcptti, "txtKcptti");
this.txtKcptti.Name = "txtKcptti";
//
// label7
//
resources.ApplyResources(this.label7, "label7");
this.label7.Name = "label7";
//
// txtKcpmtu
//
resources.ApplyResources(this.txtKcpmtu, "txtKcpmtu");
this.txtKcpmtu.Name = "txtKcpmtu";
//
// label6
//
resources.ApplyResources(this.label6, "label6");
this.label6.Name = "label6";
//
// tabPage7
//
this.tabPage7.Controls.Add(this.chkAllowLANConn);
this.tabPage7.Controls.Add(this.txturlGFWList);
this.tabPage7.Controls.Add(this.label13);
this.tabPage7.Controls.Add(this.chkAutoRun);
resources.ApplyResources(this.tabPage7, "tabPage7");
this.tabPage7.Name = "tabPage7";
this.tabPage7.UseVisualStyleBackColor = true;
//
// chkAllowLANConn
//
resources.ApplyResources(this.chkAllowLANConn, "chkAllowLANConn");
this.chkAllowLANConn.Name = "chkAllowLANConn";
this.chkAllowLANConn.UseVisualStyleBackColor = true;
//
// txturlGFWList
//
resources.ApplyResources(this.txturlGFWList, "txturlGFWList");
this.txturlGFWList.Name = "txturlGFWList";
//
// label13
//
resources.ApplyResources(this.label13, "label13");
this.label13.Name = "label13";
//
// chkAutoRun
//
resources.ApplyResources(this.chkAutoRun, "chkAutoRun");
this.chkAutoRun.Name = "chkAutoRun";
this.chkAutoRun.UseVisualStyleBackColor = true;
//
// panel2
//
this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2";
//
// btnOK
//
resources.ApplyResources(this.btnOK, "btnOK");
this.btnOK.Name = "btnOK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// OptionSettingForm
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "OptionSettingForm";
this.Load += new System.EventHandler(this.OptionSettingForm_Load);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.tabPage2.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.tabControl2.ResumeLayout(false);
this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout();
this.tabPage4.ResumeLayout(false);
this.tabPage4.PerformLayout();
this.tabPage5.ResumeLayout(false);
this.tabPage5.PerformLayout();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.tabPage6.ResumeLayout(false);
this.tabPage6.PerformLayout();
this.tabPage7.ResumeLayout(false);
this.tabPage7.PerformLayout();
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.ComboBox cmbloglevel;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtlocalPort;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.CheckBox chklogEnabled;
private System.Windows.Forms.CheckBox chkudpEnabled;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.ComboBox cmbprotocol;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox cmbprotocol2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtlocalPort2;
private System.Windows.Forms.CheckBox chkudpEnabled2;
private System.Windows.Forms.CheckBox chkAllowIn2;
private System.Windows.Forms.CheckBox chkmuxEnabled;
private System.Windows.Forms.TabControl tabControl2;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.TabPage tabPage4;
private System.Windows.Forms.Label labRoutingTips;
private System.Windows.Forms.TextBox txtUseragent;
private System.Windows.Forms.TabPage tabPage5;
private System.Windows.Forms.TextBox txtUserdirect;
private System.Windows.Forms.TextBox txtUserblock;
private System.Windows.Forms.TabPage tabPage6;
private System.Windows.Forms.TextBox txtKcpmtu;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtKcptti;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox txtKcpwriteBufferSize;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtKcpreadBufferSize;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox txtKcpdownlinkCapacity;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox txtKcpuplinkCapacity;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.CheckBox chkKcpcongestion;
private System.Windows.Forms.TabPage tabPage7;
private System.Windows.Forms.CheckBox chkAutoRun;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txturlGFWList;
private System.Windows.Forms.CheckBox chkAllowLANConn;
private System.Windows.Forms.TextBox txtremoteDNS;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.ComboBox cmbdomainStrategy;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.ComboBox cmbroutingMode;
private System.Windows.Forms.CheckBox chksniffingEnabled;
private System.Windows.Forms.CheckBox chksniffingEnabled2;
private System.Windows.Forms.Button btnSetDefRountingRule;
}
}

View file

@ -0,0 +1,361 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Text;
using System.Windows.Forms;
using v2rayN.Handler;
namespace v2rayN.Forms
{
public partial class OptionSettingForm : BaseForm
{
public OptionSettingForm()
{
InitializeComponent();
}
private void OptionSettingForm_Load(object sender, EventArgs e)
{
InitBase();
InitRouting();
InitKCP();
InitGUI();
}
/// <summary>
/// 初始化基础设置
/// </summary>
private void InitBase()
{
//日志
chklogEnabled.Checked = config.logEnabled;
cmbloglevel.Text = config.loglevel;
//Mux
chkmuxEnabled.Checked = config.muxEnabled;
//本地监听
if (config.inbound.Count > 0)
{
txtlocalPort.Text = config.inbound[0].localPort.ToString();
cmbprotocol.Text = config.inbound[0].protocol.ToString();
chkudpEnabled.Checked = config.inbound[0].udpEnabled;
chksniffingEnabled.Checked = config.inbound[0].sniffingEnabled;
if (config.inbound.Count > 1)
{
txtlocalPort2.Text = config.inbound[1].localPort.ToString();
cmbprotocol2.Text = config.inbound[1].protocol.ToString();
chkudpEnabled2.Checked = config.inbound[1].udpEnabled;
chksniffingEnabled2.Checked = config.inbound[1].sniffingEnabled;
chkAllowIn2.Checked = true;
}
else
{
chkAllowIn2.Checked = false;
}
chkAllowIn2State();
}
//remoteDNS
txtremoteDNS.Text = config.remoteDNS;
}
/// <summary>
/// 初始化路由设置
/// </summary>
private void InitRouting()
{
//路由
cmbdomainStrategy.Text = config.domainStrategy;
int routingMode = 0;
int.TryParse(config.routingMode, out routingMode);
cmbroutingMode.SelectedIndex = routingMode;
txtUseragent.Text = Utils.List2String(config.useragent, true);
txtUserdirect.Text = Utils.List2String(config.userdirect, true);
txtUserblock.Text = Utils.List2String(config.userblock, true);
}
/// <summary>
/// 初始化KCP设置
/// </summary>
private void InitKCP()
{
txtKcpmtu.Text = config.kcpItem.mtu.ToString();
txtKcptti.Text = config.kcpItem.tti.ToString();
txtKcpuplinkCapacity.Text = config.kcpItem.uplinkCapacity.ToString();
txtKcpdownlinkCapacity.Text = config.kcpItem.downlinkCapacity.ToString();
txtKcpreadBufferSize.Text = config.kcpItem.readBufferSize.ToString();
txtKcpwriteBufferSize.Text = config.kcpItem.writeBufferSize.ToString();
chkKcpcongestion.Checked = config.kcpItem.congestion;
}
/// <summary>
/// 初始化v2rayN GUI设置
/// </summary>
private void InitGUI()
{
//开机自动启动
chkAutoRun.Checked = Utils.IsAutoRun();
//自定义GFWList
txturlGFWList.Text = config.urlGFWList;
chkAllowLANConn.Checked = config.allowLANConn;
}
private void btnOK_Click(object sender, EventArgs e)
{
if (SaveBase() != 0)
{
return;
}
if (SaveRouting() != 0)
{
return;
}
if (SaveKCP() != 0)
{
return;
}
if (SaveGUI() != 0)
{
return;
}
if (ConfigHandler.SaveConfig(ref config) == 0)
{
this.DialogResult = DialogResult.OK;
}
else
{
UI.Show(UIRes.I18N("OperationFailed"));
}
}
/// <summary>
/// 保存基础设置
/// </summary>
/// <returns></returns>
private int SaveBase()
{
//日志
bool logEnabled = chklogEnabled.Checked;
string loglevel = cmbloglevel.Text.Trim();
//Mux
bool muxEnabled = chkmuxEnabled.Checked;
//本地监听
string localPort = txtlocalPort.Text.Trim();
string protocol = cmbprotocol.Text.Trim();
bool udpEnabled = chkudpEnabled.Checked;
bool sniffingEnabled = chksniffingEnabled.Checked;
if (Utils.IsNullOrEmpty(localPort) || !Utils.IsNumberic(localPort))
{
UI.Show(UIRes.I18N("FillLocalListeningPort"));
return -1;
}
if (Utils.IsNullOrEmpty(protocol))
{
UI.Show(UIRes.I18N("PleaseSelectProtocol"));
return -1;
}
config.inbound[0].localPort = Utils.ToInt(localPort);
config.inbound[0].protocol = protocol;
config.inbound[0].udpEnabled = udpEnabled;
config.inbound[0].sniffingEnabled = sniffingEnabled;
//本地监听2
string localPort2 = txtlocalPort2.Text.Trim();
string protocol2 = cmbprotocol2.Text.Trim();
bool udpEnabled2 = chkudpEnabled2.Checked;
bool sniffingEnabled2 = chksniffingEnabled2.Checked;
if (chkAllowIn2.Checked)
{
if (Utils.IsNullOrEmpty(localPort2) || !Utils.IsNumberic(localPort2))
{
UI.Show(UIRes.I18N("FillLocalListeningPort"));
return -1;
}
if (Utils.IsNullOrEmpty(protocol2))
{
UI.Show(UIRes.I18N("PleaseSelectProtocol"));
return -1;
}
if (config.inbound.Count < 2)
{
config.inbound.Add(new Mode.InItem());
}
config.inbound[1].localPort = Utils.ToInt(localPort2);
config.inbound[1].protocol = protocol2;
config.inbound[1].udpEnabled = udpEnabled2;
config.inbound[1].sniffingEnabled = sniffingEnabled2;
}
else
{
if (config.inbound.Count > 1)
{
config.inbound.RemoveAt(1);
}
}
//日志
config.logEnabled = logEnabled;
config.loglevel = loglevel;
//Mux
config.muxEnabled = muxEnabled;
//remoteDNS
config.remoteDNS = txtremoteDNS.Text.Trim();
return 0;
}
/// <summary>
/// 保存路由设置
/// </summary>
/// <returns></returns>
private int SaveRouting()
{
//路由
string domainStrategy = cmbdomainStrategy.Text;
string routingMode = cmbroutingMode.SelectedIndex.ToString();
string useragent = txtUseragent.Text.Trim();
string userdirect = txtUserdirect.Text.Trim();
string userblock = txtUserblock.Text.Trim();
config.domainStrategy = domainStrategy;
config.routingMode = routingMode;
config.useragent = Utils.String2List(useragent);
config.userdirect = Utils.String2List(userdirect);
config.userblock = Utils.String2List(userblock);
return 0;
}
/// <summary>
/// 保存KCP设置
/// </summary>
/// <returns></returns>
private int SaveKCP()
{
string mtu = txtKcpmtu.Text.Trim();
string tti = txtKcptti.Text.Trim();
string uplinkCapacity = txtKcpuplinkCapacity.Text.Trim();
string downlinkCapacity = txtKcpdownlinkCapacity.Text.Trim();
string readBufferSize = txtKcpreadBufferSize.Text.Trim();
string writeBufferSize = txtKcpwriteBufferSize.Text.Trim();
bool congestion = chkKcpcongestion.Checked;
if (Utils.IsNullOrEmpty(mtu) || !Utils.IsNumberic(mtu)
|| Utils.IsNullOrEmpty(tti) || !Utils.IsNumberic(tti)
|| Utils.IsNullOrEmpty(uplinkCapacity) || !Utils.IsNumberic(uplinkCapacity)
|| Utils.IsNullOrEmpty(downlinkCapacity) || !Utils.IsNumberic(downlinkCapacity)
|| Utils.IsNullOrEmpty(readBufferSize) || !Utils.IsNumberic(readBufferSize)
|| Utils.IsNullOrEmpty(writeBufferSize) || !Utils.IsNumberic(writeBufferSize))
{
UI.Show(UIRes.I18N("FillKcpParameters"));
return -1;
}
config.kcpItem.mtu = Utils.ToInt(mtu);
config.kcpItem.tti = Utils.ToInt(tti);
config.kcpItem.uplinkCapacity = Utils.ToInt(uplinkCapacity);
config.kcpItem.downlinkCapacity = Utils.ToInt(downlinkCapacity);
config.kcpItem.readBufferSize = Utils.ToInt(readBufferSize);
config.kcpItem.writeBufferSize = Utils.ToInt(writeBufferSize);
config.kcpItem.congestion = congestion;
return 0;
}
/// <summary>
/// 保存GUI设置
/// </summary>
/// <returns></returns>
private int SaveGUI()
{
//开机自动启动
Utils.SetAutoRun(chkAutoRun.Checked);
//自定义GFWList
config.urlGFWList = txturlGFWList.Text.Trim();
config.allowLANConn = chkAllowLANConn.Checked;
return 0;
}
private void btnClose_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
private void chkAllowIn2_CheckedChanged(object sender, EventArgs e)
{
chkAllowIn2State();
}
private void chkAllowIn2State()
{
bool blAllow2 = chkAllowIn2.Checked;
txtlocalPort2.Enabled =
cmbprotocol2.Enabled =
chkudpEnabled2.Enabled = blAllow2;
}
private void btnSetDefRountingRule_Click(object sender, EventArgs e)
{
var lstUrl = new List<string>();
lstUrl.Add(Global.CustomRoutingListUrl + "proxy");
lstUrl.Add(Global.CustomRoutingListUrl + "direct");
lstUrl.Add(Global.CustomRoutingListUrl + "block");
var lstTxt = new List<TextBox>();
lstTxt.Add(txtUseragent);
lstTxt.Add(txtUserdirect);
lstTxt.Add(txtUserblock);
for (int k = 0; k < lstUrl.Count; k++)
{
var txt = lstTxt[k];
V2rayUpdateHandle v2rayUpdateHandle3 = new V2rayUpdateHandle();
v2rayUpdateHandle3.UpdateCompleted += (sender2, args) =>
{
if (args.Success)
{
var result = args.Msg;
if (Utils.IsNullOrEmpty(result))
{
return;
}
txt.Text = result;
}
else
{
AppendText(false, args.Msg);
}
};
v2rayUpdateHandle3.Error += (sender2, args) =>
{
AppendText(true, args.GetException().Message);
};
v2rayUpdateHandle3.WebDownloadString(lstUrl[k]);
}
}
void AppendText(bool notify, string text)
{
labRoutingTips.Text = text;
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,291 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnClose.Text" xml:space="preserve">
<value>取消(&amp;C)</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="chksniffingEnabled2.Size" type="System.Drawing.Size, System.Drawing">
<value>96, 16</value>
</data>
<data name="chksniffingEnabled2.Text" xml:space="preserve">
<value>开启流量探测</value>
</data>
<data name="chksniffingEnabled.Size" type="System.Drawing.Size, System.Drawing">
<value>96, 16</value>
</data>
<data name="chksniffingEnabled.Text" xml:space="preserve">
<value>开启流量探测</value>
</data>
<data name="label14.Size" type="System.Drawing.Size, System.Drawing">
<value>191, 12</value>
</data>
<data name="label14.Text" xml:space="preserve">
<value>自定义DNS(可多个,用逗号(,)隔开)</value>
</data>
<data name="chkmuxEnabled.Text" xml:space="preserve">
<value>开启Mux多路复用(默认开启)</value>
</data>
<data name="chkAllowIn2.Size" type="System.Drawing.Size, System.Drawing">
<value>102, 16</value>
</data>
<data name="chkAllowIn2.Text" xml:space="preserve">
<value>本地监听端口2</value>
</data>
<data name="chkudpEnabled2.Size" type="System.Drawing.Size, System.Drawing">
<value>66, 16</value>
</data>
<data name="chkudpEnabled2.Text" xml:space="preserve">
<value>开启UDP</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>协议</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>协议</value>
</data>
<data name="chkudpEnabled.Size" type="System.Drawing.Size, System.Drawing">
<value>66, 16</value>
</data>
<data name="chkudpEnabled.Text" xml:space="preserve">
<value>开启UDP</value>
</data>
<data name="chklogEnabled.Size" type="System.Drawing.Size, System.Drawing">
<value>156, 16</value>
</data>
<data name="chklogEnabled.Text" xml:space="preserve">
<value>记录本地日志(默认关闭)</value>
</data>
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 12</value>
</data>
<data name="label5.Text" xml:space="preserve">
<value>日志等级</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>77, 12</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>本地监听端口</value>
</data>
<data name="tabPage1.Text" xml:space="preserve">
<value> Core:基础设置 </value>
</data>
<data name="tabPage3.Text" xml:space="preserve">
<value> 代理的Domain或IP </value>
</data>
<data name="tabPage4.Text" xml:space="preserve">
<value> 直连的Domain或IP </value>
</data>
<data name="tabPage5.Text" xml:space="preserve">
<value> 阻止的Domain或IP </value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnSetDefRountingRule.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnSetDefRountingRule.Location" type="System.Drawing.Point, System.Drawing">
<value>381, 43</value>
</data>
<data name="btnSetDefRountingRule.Size" type="System.Drawing.Size, System.Drawing">
<value>201, 23</value>
</data>
<data name="btnSetDefRountingRule.Text" xml:space="preserve">
<value>一键设置默认自定义路由规则</value>
</data>
<data name="cmbdomainStrategy.Size" type="System.Drawing.Size, System.Drawing">
<value>232, 20</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="labRoutingTips.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="labRoutingTips.Size" type="System.Drawing.Size, System.Drawing">
<value>383, 12</value>
</data>
<data name="labRoutingTips.Text" xml:space="preserve">
<value>*设置的规则,用逗号(,)隔开;支持Domain(纯字符串/正则/子域名)和IP</value>
</data>
<data name="label15.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 12</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>域名策略</value>
</data>
<data name="label12.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 12</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>路由模式</value>
</data>
<data name="cmbroutingMode.Items" xml:space="preserve">
<value>全局</value>
</data>
<data name="cmbroutingMode.Items1" xml:space="preserve">
<value>绕过局域网地址</value>
</data>
<data name="cmbroutingMode.Items2" xml:space="preserve">
<value>绕过大陆地址</value>
</data>
<data name="cmbroutingMode.Items3" xml:space="preserve">
<value>绕过局域网及大陆地址</value>
</data>
<data name="cmbroutingMode.Size" type="System.Drawing.Size, System.Drawing">
<value>232, 20</value>
</data>
<data name="tabPage2.Text" xml:space="preserve">
<value> Core:路由设置 </value>
</data>
<data name="tabPage6.Text" xml:space="preserve">
<value> Core:KCP设置 </value>
</data>
<data name="chkAllowLANConn.Size" type="System.Drawing.Size, System.Drawing">
<value>144, 16</value>
</data>
<data name="chkAllowLANConn.Text" xml:space="preserve">
<value>允许来自局域网的连接</value>
</data>
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 12</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>自定义GFWList地址(不需自定义请填空白)</value>
</data>
<data name="chkAutoRun.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 16</value>
</data>
<data name="chkAutoRun.Text" xml:space="preserve">
<value>开机自动启动(可能会不成功)</value>
</data>
<data name="tabPage7.Text" xml:space="preserve">
<value> v2rayN设置 </value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>参数设置</value>
</data>
</root>

View file

@ -0,0 +1,78 @@
namespace v2rayN.Forms
{
partial class QRCodeControl
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(QRCodeControl));
this.txtUrl = new System.Windows.Forms.TextBox();
this.picQRCode = new System.Windows.Forms.PictureBox();
this.chkShow = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.picQRCode)).BeginInit();
this.SuspendLayout();
//
// txtUrl
//
resources.ApplyResources(this.txtUrl, "txtUrl");
this.txtUrl.Name = "txtUrl";
this.txtUrl.ReadOnly = true;
//
// picQRCode
//
resources.ApplyResources(this.picQRCode, "picQRCode");
this.picQRCode.Name = "picQRCode";
this.picQRCode.TabStop = false;
//
// chkShow
//
resources.ApplyResources(this.chkShow, "chkShow");
this.chkShow.Name = "chkShow";
this.chkShow.UseVisualStyleBackColor = true;
this.chkShow.CheckedChanged += new System.EventHandler(this.chkShow_CheckedChanged);
//
// QRCodeControl
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.picQRCode);
this.Controls.Add(this.txtUrl);
this.Controls.Add(this.chkShow);
this.Name = "QRCodeControl";
this.Load += new System.EventHandler(this.QRCodeControl_Load);
((System.ComponentModel.ISupportInitialize)(this.picQRCode)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox txtUrl;
private System.Windows.Forms.PictureBox picQRCode;
private System.Windows.Forms.CheckBox chkShow;
}
}

View file

@ -0,0 +1,47 @@
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class QRCodeControl : UserControl
{
public QRCodeControl()
{
InitializeComponent();
}
private void QRCodeControl_Load(object sender, System.EventArgs e)
{
chkShow_CheckedChanged(null, null);
txtUrl.MouseUp += txtUrl_MouseUp;
}
void txtUrl_MouseUp(object sender, MouseEventArgs e)
{
txtUrl.SelectAll();
}
public void showQRCode(int Index, Config config)
{
if (Index >= 0)
{
string url = ConfigHandler.GetVmessQRCode(config, Index);
if (string.IsNullOrEmpty(url))
{
picQRCode.Image = null;
txtUrl.Text = string.Empty;
return;
}
picQRCode.Image = QRCodeHelper.GetQRCode(url);
txtUrl.Text = url;
}
}
private void chkShow_CheckedChanged(object sender, System.EventArgs e)
{
picQRCode.Visible =
txtUrl.Visible = chkShow.Checked;
}
}
}

View file

@ -0,0 +1,222 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="&gt;&gt;picQRCode.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>356, 441</value>
</data>
<data name="chkShow.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="txtUrl.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="chkShow.Text" xml:space="preserve">
<value>Show shared content</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="chkShow.Size" type="System.Drawing.Size, System.Drawing">
<value>356, 16</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>QRCodeControl</value>
</data>
<data name="picQRCode.Size" type="System.Drawing.Size, System.Drawing">
<value>356, 355</value>
</data>
<data name="txtUrl.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 371</value>
</data>
<data name="&gt;&gt;chkShow.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;picQRCode.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="txtUrl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="picQRCode.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
</data>
<data name="chkShow.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="picQRCode.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="txtUrl.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="picQRCode.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="&gt;&gt;txtUrl.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtUrl.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;chkShow.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="picQRCode.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 16</value>
</data>
<data name="&gt;&gt;txtUrl.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;chkShow.Name" xml:space="preserve">
<value>chkShow</value>
</data>
<data name="&gt;&gt;picQRCode.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;txtUrl.Name" xml:space="preserve">
<value>txtUrl</value>
</data>
<data name="&gt;&gt;chkShow.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;picQRCode.Name" xml:space="preserve">
<value>picQRCode</value>
</data>
<data name="txtUrl.Size" type="System.Drawing.Size, System.Drawing">
<value>356, 70</value>
</data>
<data name="chkShow.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
</data>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value>
</data>
<data name="chkShow.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View file

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="chkShow.Text" xml:space="preserve">
<value>显示分享内容</value>
</data>
</root>

View file

@ -0,0 +1,94 @@
namespace v2rayN.Forms
{
partial class QRCodeForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.picQRCode = new System.Windows.Forms.PictureBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtUrl = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.picQRCode)).BeginInit();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// picQRCode
//
this.picQRCode.Dock = System.Windows.Forms.DockStyle.Fill;
this.picQRCode.Location = new System.Drawing.Point(0, 0);
this.picQRCode.Name = "picQRCode";
this.picQRCode.Size = new System.Drawing.Size(482, 483);
this.picQRCode.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.picQRCode.TabIndex = 23;
this.picQRCode.TabStop = false;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.txtUrl);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.groupBox1.Location = new System.Drawing.Point(0, 483);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(482, 90);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "URL";
//
// txtUrl
//
this.txtUrl.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtUrl.Location = new System.Drawing.Point(3, 17);
this.txtUrl.Multiline = true;
this.txtUrl.Name = "txtUrl";
this.txtUrl.ReadOnly = true;
this.txtUrl.Size = new System.Drawing.Size(476, 70);
this.txtUrl.TabIndex = 0;
//
// QRCodeForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(482, 573);
this.Controls.Add(this.picQRCode);
this.Controls.Add(this.groupBox1);
this.Name = "QRCodeForm";
this.Text = "服务器配置二维码和URL";
this.Load += new System.EventHandler(this.QRCodeForm_Load);
this.Shown += new System.EventHandler(this.QRCodeForm_Shown);
((System.ComponentModel.ISupportInitialize)(this.picQRCode)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox txtUrl;
private System.Windows.Forms.PictureBox picQRCode;
}
}

View file

@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class QRCodeForm : BaseForm
{
public int Index { get; set; }
public QRCodeForm()
{
InitializeComponent();
}
private void QRCodeForm_Load(object sender, EventArgs e)
{
txtUrl.MouseUp += txtUrl_MouseUp;
}
void txtUrl_MouseUp(object sender, MouseEventArgs e)
{
txtUrl.SelectAll();
}
private void QRCodeForm_Shown(object sender, EventArgs e)
{
if (Index >= 0)
{
VmessQRCode vmessQRCode = null;
if (ConfigHandler.GetVmessQRCode(config, Index, ref vmessQRCode) != 0)
{
return;
}
string url = Utils.ToJson(vmessQRCode);
url = Utils.Base64Encode(url);
url = string.Format("{0}{1}", Global.vmessProtocol, url);
picQRCode.Image = QRCodeHelper.GetQRCode(url);
txtUrl.Text = url;
}
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,113 @@
namespace v2rayN.Forms
{
partial class SubSettingControl
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SubSettingControl));
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.chkEnabled = new System.Windows.Forms.CheckBox();
this.btnRemove = new System.Windows.Forms.Button();
this.txtUrl = new System.Windows.Forms.TextBox();
this.txtRemarks = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// groupBox2
//
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Controls.Add(this.chkEnabled);
this.groupBox2.Controls.Add(this.btnRemove);
this.groupBox2.Controls.Add(this.txtUrl);
this.groupBox2.Controls.Add(this.txtRemarks);
this.groupBox2.Controls.Add(this.label2);
this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false;
//
// chkEnabled
//
resources.ApplyResources(this.chkEnabled, "chkEnabled");
this.chkEnabled.Name = "chkEnabled";
this.chkEnabled.UseVisualStyleBackColor = true;
this.chkEnabled.Leave += new System.EventHandler(this.txtRemarks_Leave);
//
// btnRemove
//
resources.ApplyResources(this.btnRemove, "btnRemove");
this.btnRemove.Name = "btnRemove";
this.btnRemove.UseVisualStyleBackColor = true;
this.btnRemove.Click += new System.EventHandler(this.btnRemove_Click);
//
// txtUrl
//
resources.ApplyResources(this.txtUrl, "txtUrl");
this.txtUrl.Name = "txtUrl";
this.txtUrl.Leave += new System.EventHandler(this.txtRemarks_Leave);
//
// txtRemarks
//
resources.ApplyResources(this.txtRemarks, "txtRemarks");
this.txtRemarks.Name = "txtRemarks";
this.txtRemarks.Leave += new System.EventHandler(this.txtRemarks_Leave);
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// SubSettingControl
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.groupBox2);
this.Name = "SubSettingControl";
this.Load += new System.EventHandler(this.SubSettingControl_Load);
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TextBox txtUrl;
private System.Windows.Forms.TextBox txtRemarks;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button btnRemove;
private System.Windows.Forms.CheckBox chkEnabled;
}
}

View file

@ -0,0 +1,62 @@
using System;
using System.Windows.Forms;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public delegate void ChangeEventHandler(object sender, EventArgs e);
public partial class SubSettingControl : UserControl
{
public event ChangeEventHandler OnButtonClicked;
public SubItem subItem { get; set; }
public SubSettingControl()
{
InitializeComponent();
}
private void SubSettingControl_Load(object sender, EventArgs e)
{
BindingSub();
}
private void BindingSub()
{
if (subItem != null)
{
txtRemarks.Text = subItem.remarks.ToString();
txtUrl.Text = subItem.url.ToString();
chkEnabled.Checked = subItem.enabled;
}
}
private void EndBindingSub()
{
if (subItem != null)
{
subItem.remarks = txtRemarks.Text.Trim();
subItem.url = txtUrl.Text.Trim();
subItem.enabled = chkEnabled.Checked;
}
}
private void txtRemarks_Leave(object sender, EventArgs e)
{
EndBindingSub();
}
private void btnRemove_Click(object sender, EventArgs e)
{
if (subItem != null)
{
subItem.remarks = string.Empty;
subItem.url = string.Empty;
}
if (OnButtonClicked != null)
{
OnButtonClicked(sender, e);
}
}
}
}

View file

@ -0,0 +1,330 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="&gt;&gt;txtUrl.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="chkEnabled.Size" type="System.Drawing.Size, System.Drawing">
<value>60, 16</value>
</data>
<data name="&gt;&gt;txtUrl.Name" xml:space="preserve">
<value>txtUrl</value>
</data>
<data name="btnRemove.Text" xml:space="preserve">
<value>&amp;Remove</value>
</data>
<data name="btnRemove.Location" type="System.Drawing.Point, System.Drawing">
<value>484, 21</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnRemove.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
</data>
<data name="txtUrl.Size" type="System.Drawing.Size, System.Drawing">
<value>432, 46</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>SubSettingControl</value>
</data>
<data name="&gt;&gt;txtRemarks.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="txtUrl.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="&gt;&gt;txtRemarks.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>83, 12</value>
</data>
<data name="&gt;&gt;groupBox2.Name" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value>
</data>
<data name="&gt;&gt;label3.Name" xml:space="preserve">
<value>label3</value>
</data>
<data name="txtRemarks.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 21</value>
</data>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="&gt;&gt;chkEnabled.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 55</value>
</data>
<data name="txtUrl.Location" type="System.Drawing.Point, System.Drawing">
<value>127, 55</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="groupBox2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="&gt;&gt;label2.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtUrl.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;chkEnabled.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>47, 12</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>Subscription details</value>
</data>
<data name="groupBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 9</value>
</data>
<data name="chkEnabled.Text" xml:space="preserve">
<value>Enable</value>
</data>
<data name="&gt;&gt;chkEnabled.Name" xml:space="preserve">
<value>chkEnabled</value>
</data>
<data name="&gt;&gt;txtRemarks.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="btnRemove.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Address (url)</value>
</data>
<data name="chkEnabled.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
</data>
<data name="txtUrl.TabIndex" type="System.Int32, mscorlib">
<value>23</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="&gt;&gt;btnRemove.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="chkEnabled.Location" type="System.Drawing.Point, System.Drawing">
<value>406, 23</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="chkEnabled.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="&gt;&gt;btnRemove.Name" xml:space="preserve">
<value>btnRemove</value>
</data>
<data name="label3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="&gt;&gt;groupBox2.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>584, 110</value>
</data>
<data name="chkEnabled.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>584, 119</value>
</data>
<data name="txtRemarks.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Remarks</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 25</value>
</data>
<data name="btnRemove.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="&gt;&gt;label3.Parent" xml:space="preserve">
<value>groupBox2</value>
</data>
<data name="txtRemarks.Size" type="System.Drawing.Size, System.Drawing">
<value>265, 21</value>
</data>
<data name="groupBox2.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="&gt;&gt;txtUrl.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnRemove.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;groupBox2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;btnRemove.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBox2.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;txtRemarks.Name" xml:space="preserve">
<value>txtRemarks</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="&gt;&gt;chkEnabled.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label3.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>zh-Hans</value>
</metadata>
</root>

View file

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="chkEnabled.Size" type="System.Drawing.Size, System.Drawing">
<value>48, 16</value>
</data>
<data name="chkEnabled.Text" xml:space="preserve">
<value>启用</value>
</data>
<data name="btnRemove.Text" xml:space="preserve">
<value>移除</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 12</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>备注</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 12</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>地址 (url)</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>订阅详情</value>
</data>
</root>

View file

@ -0,0 +1,97 @@
namespace v2rayN.Forms
{
partial class SubSettingForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SubSettingForm));
this.btnClose = new System.Windows.Forms.Button();
this.panCon = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.btnAdd = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// btnClose
//
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.Name = "btnClose";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// panCon
//
resources.ApplyResources(this.panCon, "panCon");
this.panCon.Name = "panCon";
//
// panel2
//
this.panel2.Controls.Add(this.btnAdd);
this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2";
//
// btnAdd
//
resources.ApplyResources(this.btnAdd, "btnAdd");
this.btnAdd.Name = "btnAdd";
this.btnAdd.UseVisualStyleBackColor = true;
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// btnOK
//
resources.ApplyResources(this.btnOK, "btnOK");
this.btnOK.Name = "btnOK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// SubSettingForm
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.Controls.Add(this.panCon);
this.Controls.Add(this.panel2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "SubSettingForm";
this.Load += new System.EventHandler(this.SubSettingForm_Load);
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button btnAdd;
private System.Windows.Forms.Panel panCon;
}
}

View file

@ -0,0 +1,109 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.Mode;
namespace v2rayN.Forms
{
public partial class SubSettingForm : BaseForm
{
List<SubSettingControl> lstControls = new List<SubSettingControl>();
public SubSettingForm()
{
InitializeComponent();
}
private void SubSettingForm_Load(object sender, EventArgs e)
{
if (config.subItem == null)
{
config.subItem = new List<SubItem>();
}
RefreshSubsView();
}
/// <summary>
/// 刷新列表
/// </summary>
private void RefreshSubsView()
{
panCon.Controls.Clear();
lstControls.Clear();
for (int k = config.subItem.Count - 1; k >= 0; k--)
{
var item = config.subItem[k];
if (Utils.IsNullOrEmpty(item.remarks)
&& Utils.IsNullOrEmpty(item.url))
{
if (!Utils.IsNullOrEmpty(item.id))
{
ConfigHandler.RemoveServerViaSubid(ref config, item.id);
}
config.subItem.RemoveAt(k);
}
}
for (int k = 0; k < config.subItem.Count; k++)
{
var item = config.subItem[k];
SubSettingControl control = new SubSettingControl();
control.OnButtonClicked += Control_OnButtonClicked;
control.subItem = item;
control.Dock = DockStyle.Top;
panCon.Controls.Add(control);
panCon.Controls.SetChildIndex(control, 0);
lstControls.Add(control);
}
}
private void Control_OnButtonClicked(object sender, EventArgs e)
{
RefreshSubsView();
}
private void btnOK_Click(object sender, EventArgs e)
{
if (config.subItem.Count <= 0)
{
AddSub();
}
if (ConfigHandler.SaveSubItem(ref config) == 0)
{
this.DialogResult = DialogResult.OK;
}
else
{
UI.Show(UIRes.I18N("OperationFailed"));
}
}
private void btnClose_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
private void btnAdd_Click(object sender, EventArgs e)
{
AddSub();
RefreshSubsView();
}
private void AddSub()
{
var subItem = new SubItem();
subItem.id = string.Empty;
subItem.remarks = "remarks";
subItem.url = "url";
config.subItem.Add(subItem);
}
}
}

View file

@ -0,0 +1,273 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnClose.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
<value>448, 17</value>
</data>
<data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnClose.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="btnClose.Text" xml:space="preserve">
<value>&amp;Cancel</value>
</data>
<data name="&gt;&gt;btnClose.Name" xml:space="preserve">
<value>btnClose</value>
</data>
<data name="&gt;&gt;btnClose.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnClose.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panCon.AutoScroll" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="panCon.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="panCon.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="panCon.Size" type="System.Drawing.Size, System.Drawing">
<value>581, 569</value>
</data>
<data name="panCon.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="&gt;&gt;panCon.Name" xml:space="preserve">
<value>panCon</value>
</data>
<data name="&gt;&gt;panCon.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panCon.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panCon.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="btnAdd.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnAdd.Location" type="System.Drawing.Point, System.Drawing">
<value>47, 17</value>
</data>
<data name="btnAdd.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="btnAdd.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="btnAdd.Text" xml:space="preserve">
<value>&amp;Add</value>
</data>
<data name="&gt;&gt;btnAdd.Name" xml:space="preserve">
<value>btnAdd</value>
</data>
<data name="&gt;&gt;btnAdd.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnAdd.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;btnAdd.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="btnOK.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
<value>355, 17</value>
</data>
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>&amp;OK</value>
</data>
<data name="&gt;&gt;btnOK.Name" xml:space="preserve">
<value>btnOK</value>
</data>
<data name="&gt;&gt;btnOK.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnOK.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 569</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>581, 60</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>581, 629</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Subscription settings</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>SubSettingForm</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
</root>

View file

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnClose.Text" xml:space="preserve">
<value>取消(&amp;C)</value>
</data>
<data name="btnAdd.Text" xml:space="preserve">
<value>添加(&amp;A)</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>确定(&amp;O)</value>
</data>
<data name="lvSubs.Items" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkMAwAAAFFTeXN0
ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2Vu
PWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACFTeXN0ZW0uV2luZG93cy5Gb3Jtcy5MaXN0Vmlld0l0ZW0HAAAA
BFRleHQKSW1hZ2VJbmRleAlCYWNrQ29sb3IHQ2hlY2tlZARGb250CUZvcmVDb2xvchdVc2VJdGVtU3R5
bGVGb3JTdWJJdGVtcwEABAAEBAAIFFN5c3RlbS5EcmF3aW5nLkNvbG9yAwAAAAETU3lzdGVtLkRyYXdp
bmcuRm9udAMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAAQIAAAAGBAAAAAD/////Bfv///8UU3lz
dGVtLkRyYXdpbmcuQ29sb3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xvcgVzdGF0ZQEAAAAJBwcDAAAA
CgAAAAAAAAAAGAABAAAJBgAAAAH5////+////woAAAAAAAAAABoAAQABBQYAAAATU3lzdGVtLkRyYXdp
bmcuRm9udAQAAAAETmFtZQRTaXplBVN0eWxlBFVuaXQBAAQECxhTeXN0ZW0uRHJhd2luZy5Gb250U3R5
bGUDAAAAG1N5c3RlbS5EcmF3aW5nLkdyYXBoaWNzVW5pdAMAAAADAAAABggAAAAG5a6L5L2TAAAQQQX3
////GFN5c3RlbS5EcmF3aW5nLkZvbnRTdHlsZQEAAAAHdmFsdWVfXwAIAwAAAAAAAAAF9v///xtTeXN0
ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAADAAAACw==
</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>订阅设置</value>
</data>
</root>

170
v2rayN/v2rayN/Global.cs Normal file
View file

@ -0,0 +1,170 @@

namespace v2rayN
{
class Global
{
#region
/// <summary>
/// 更新链接
/// </summary>
public const string UpdateUrl = @"https://github.com/2dust/v2rayN/releases";
/// <summary>
/// 关于链接
/// </summary>
public const string AboutUrl = @"https://github.com/2dust/v2rayN";
/// <summary>
/// SpeedTestUrl
/// </summary>
public const string SpeedTestUrl = @"http://speedtest-sfo2.digitalocean.com/10mb.test";
/// <summary>
/// CustomRoutingListUrl
/// </summary>
public const string CustomRoutingListUrl = @"https://raw.githubusercontent.com/2dust/v2rayCustomRoutingList/master/";
/// <summary>
/// PromotionUrl
/// </summary>
public const string PromotionUrl = @"https://1.2345345.xyz/ads.html";
/// <summary>
/// 本软件配置文件名
/// </summary>
public const string ConfigFileName = "guiNConfig.json";
/// <summary>
/// v2ray配置文件名
/// </summary>
public const string v2rayConfigFileName = "config.json";
/// <summary>
/// v2ray客户端配置样例文件名
/// </summary>
public const string v2raySampleClient = "v2rayN.Sample.SampleClientConfig.txt";
/// <summary>
/// v2ray服务端配置样例文件名
/// </summary>
public const string v2raySampleServer = "v2rayN.Sample.SampleServerConfig.txt";
/// <summary>
/// v2ray配置Httprequest文件名
/// </summary>
public const string v2raySampleHttprequestFileName = "v2rayN.Sample.SampleHttprequest.txt";
/// <summary>
/// v2ray配置Httpresponse文件名
/// </summary>
public const string v2raySampleHttpresponseFileName = "v2rayN.Sample.SampleHttpresponse.txt";
/// <summary>
/// 空白的pac文件
/// </summary>
public const string BlankPacFileName = "v2rayN.Sample.BlankPac.txt";
/// <summary>
/// 默认加密方式
/// </summary>
public const string DefaultSecurity = "auto";
/// <summary>
/// 默认传输协议
/// </summary>
public const string DefaultNetwork = "tcp";
/// <summary>
/// Tcp伪装http
/// </summary>
public const string TcpHeaderHttp = "http";
/// <summary>
/// None值
/// </summary>
public const string None = "none";
/// <summary>
/// 代理 tag值
/// </summary>
public const string agentTag = "proxy";
/// <summary>
/// 直连 tag值
/// </summary>
public const string directTag = "direct";
/// <summary>
/// 阻止 tag值
/// </summary>
public const string blockTag = "block";
/// <summary>
/// vmess
/// </summary>
public const string vmessProtocol = "vmess://";
/// <summary>
/// shadowsocks
/// </summary>
public const string ssProtocol = "ss://";
/// <summary>
/// socks
/// </summary>
public const string socksProtocol = "socks://";
/// <summary>
/// pac
/// </summary>
public const string pacFILE = "pac.txt";
/// <summary>
/// email
/// </summary>
public const string userEMail = "t@t.tt";
/// <summary>
/// MyRegPath
/// </summary>
public const string MyRegPath = "Software\\v2rayNGUI";
/// <summary>
/// Language
/// </summary>
public const string MyRegKeyLanguage = "CurrentLanguage";
/// <summary>
/// Icon
/// </summary>
public const string CustomIconName = "v2rayN.ico";
#endregion
#region
/// <summary>
/// 是否需要重启服务V2ray
/// </summary>
public static bool reloadV2ray { get; set; }
/// <summary>
/// 是否开启全局代理(http)
/// </summary>
public static bool sysAgent { get; set; }
/// <summary>
/// socks端口号
/// </summary>
public static int socksPort { get; set; }
/// <summary>
/// 全局代理端口(http)
/// </summary>
public static int sysAgentPort { get; set; }
/// <summary>
/// PAC监听端口号
/// </summary>
public static int pacPort { get; set; }
#endregion
}
}

View file

@ -0,0 +1,784 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using v2rayN.Mode;
namespace v2rayN.Handler
{
/// <summary>
/// 本软件配置文件处理类
/// </summary>
class ConfigHandler
{
private static string configRes = Global.ConfigFileName;
/// <summary>
/// 载入配置文件
/// </summary>
/// <param name="config"></param>
/// <returns></returns>
public static int LoadConfig(ref Config config)
{
//载入配置文件
string result = Utils.LoadResource(Utils.GetPath(configRes));
if (!Utils.IsNullOrEmpty(result))
{
//转成Json
config = Utils.FromJson<Config>(result);
}
if (config == null)
{
config = new Config();
config.index = -1;
config.logEnabled = false;
config.loglevel = "warning";
config.vmess = new List<VmessItem>();
//Mux
config.muxEnabled = true;
////默认监听端口
//config.pacPort = 8888;
}
//本地监听
if (config.inbound == null)
{
config.inbound = new List<InItem>();
InItem inItem = new InItem();
inItem.protocol = "socks";
inItem.localPort = 10808;
inItem.udpEnabled = true;
inItem.sniffingEnabled = true;
config.inbound.Add(inItem);
//inItem = new InItem();
//inItem.protocol = "http";
//inItem.localPort = 1081;
//inItem.udpEnabled = true;
//config.inbound.Add(inItem);
}
else
{
//http协议不由core提供,只保留socks
if (config.inbound.Count > 0)
{
config.inbound[0].protocol = "socks";
}
}
//路由规则
if (Utils.IsNullOrEmpty(config.domainStrategy))
{
config.domainStrategy = "IPIfNonMatch";
}
if (Utils.IsNullOrEmpty(config.routingMode))
{
config.routingMode = "0";
}
if (config.useragent == null)
{
config.useragent = new List<string>();
}
if (config.userdirect == null)
{
config.userdirect = new List<string>();
}
if (config.userblock == null)
{
config.userblock = new List<string>();
}
//kcp
if (config.kcpItem == null)
{
config.kcpItem = new KcpItem();
config.kcpItem.mtu = 1350;
config.kcpItem.tti = 50;
config.kcpItem.uplinkCapacity = 12;
config.kcpItem.downlinkCapacity = 100;
config.kcpItem.readBufferSize = 2;
config.kcpItem.writeBufferSize = 2;
config.kcpItem.congestion = false;
}
if (config.uiItem == null)
{
config.uiItem = new UIItem();
}
//// 如果是用户升级首次会有端口号为0的情况不可用这里处理
//if (config.pacPort == 0)
//{
// config.pacPort = 8888;
//}
if (config == null
|| config.index < 0
|| config.vmess.Count <= 0
|| config.index > config.vmess.Count - 1
)
{
Global.reloadV2ray = false;
}
else
{
Global.reloadV2ray = true;
//版本升级
for (int i = 0; i < config.vmess.Count; i++)
{
VmessItem vmessItem = config.vmess[i];
UpgradeServerVersion(ref vmessItem);
}
}
return 0;
}
/// <summary>
/// 添加服务器或编辑
/// </summary>
/// <param name="config"></param>
/// <param name="vmessItem"></param>
/// <param name="index"></param>
/// <returns></returns>
public static int AddServer(ref Config config, VmessItem vmessItem, int index)
{
vmessItem.configVersion = 2;
vmessItem.configType = (int)EConfigType.Vmess;
if (index >= 0)
{
//修改
config.vmess[index] = vmessItem;
if (config.index.Equals(index))
{
Global.reloadV2ray = true;
}
}
else
{
//添加
config.vmess.Add(vmessItem);
if (config.vmess.Count == 1)
{
config.index = 0;
Global.reloadV2ray = true;
}
}
ToJsonFile(config);
return 0;
}
/// <summary>
/// 移除服务器
/// </summary>
/// <param name="config"></param>
/// <param name="index"></param>
/// <returns></returns>
public static int RemoveServer(ref Config config, int index)
{
if (index < 0 || index > config.vmess.Count - 1)
{
return -1;
}
//删除
config.vmess.RemoveAt(index);
//移除的是活动的
if (config.index.Equals(index))
{
if (config.vmess.Count > 0)
{
config.index = 0;
}
else
{
config.index = -1;
}
Global.reloadV2ray = true;
}
else if (index < config.index)//移除活动之前的
{
config.index--;
Global.reloadV2ray = true;
}
ToJsonFile(config);
return 0;
}
/// <summary>
/// 复制服务器
/// </summary>
/// <param name="config"></param>
/// <param name="index"></param>
/// <returns></returns>
public static int CopyServer(ref Config config, int index)
{
if (index < 0 || index > config.vmess.Count - 1)
{
return -1;
}
VmessItem vmessItem = new VmessItem();
vmessItem.configVersion = config.vmess[index].configVersion;
vmessItem.configType = config.vmess[index].configType;
vmessItem.address = config.vmess[index].address;
vmessItem.port = config.vmess[index].port;
vmessItem.id = config.vmess[index].id;
vmessItem.alterId = config.vmess[index].alterId;
vmessItem.security = config.vmess[index].security;
vmessItem.network = config.vmess[index].network;
vmessItem.headerType = config.vmess[index].headerType;
vmessItem.requestHost = config.vmess[index].requestHost;
vmessItem.path = config.vmess[index].path;
vmessItem.streamSecurity = config.vmess[index].streamSecurity;
vmessItem.remarks = string.Format("{0}-clone", config.vmess[index].remarks);
config.vmess.Add(vmessItem);
ToJsonFile(config);
return 0;
}
/// <summary>
/// 设置活动服务器
/// </summary>
/// <param name="config"></param>
/// <param name="index"></param>
/// <returns></returns>
public static int SetDefaultServer(ref Config config, int index)
{
if (index < 0 || index > config.vmess.Count - 1)
{
return -1;
}
////和现在相同
//if (config.index.Equals(index))
//{
// return -1;
//}
config.index = index;
Global.reloadV2ray = true;
ToJsonFile(config);
return 0;
}
/// <summary>
/// 保参数
/// </summary>
/// <param name="config"></param>
/// <returns></returns>
public static int SaveConfig(ref Config config)
{
Global.reloadV2ray = true;
ToJsonFile(config);
return 0;
}
/// <summary>
/// 存储文件
/// </summary>
/// <param name="config"></param>
public static void ToJsonFile(Config config)
{
Utils.ToJsonFile(config, Utils.GetPath(configRes));
}
/// <summary>
/// 取得服务器QRCode配置
/// </summary>
/// <param name="config"></param>
/// <param name="index"></param>
/// <returns></returns>
public static string GetVmessQRCode(Config config, int index)
{
try
{
string url = string.Empty;
VmessItem vmessItem = config.vmess[index];
if (vmessItem.configType == (int)EConfigType.Vmess)
{
VmessQRCode vmessQRCode = new VmessQRCode();
vmessQRCode.v = vmessItem.configVersion.ToString();
vmessQRCode.ps = vmessItem.remarks.Trim(); //备注也许很长 ;
vmessQRCode.add = vmessItem.address;
vmessQRCode.port = vmessItem.port.ToString();
vmessQRCode.id = vmessItem.id;
vmessQRCode.aid = vmessItem.alterId.ToString();
vmessQRCode.net = vmessItem.network;
vmessQRCode.type = vmessItem.headerType;
vmessQRCode.host = vmessItem.requestHost;
vmessQRCode.path = vmessItem.path;
vmessQRCode.tls = vmessItem.streamSecurity;
url = Utils.ToJson(vmessQRCode);
url = Utils.Base64Encode(url);
url = string.Format("{0}{1}", Global.vmessProtocol, url);
}
else if (vmessItem.configType == (int)EConfigType.Shadowsocks)
{
var remark = string.Empty;
if (!Utils.IsNullOrEmpty(vmessItem.remarks))
{
remark = "#" + WebUtility.UrlEncode(vmessItem.remarks);
}
url = string.Format("{0}:{1}@{2}:{3}",
vmessItem.security,
vmessItem.id,
vmessItem.address,
vmessItem.port);
url = Utils.Base64Encode(url);
url = string.Format("{0}{1}{2}", Global.ssProtocol, url, remark);
}
else if (vmessItem.configType == (int)EConfigType.Socks)
{
var remark = string.Empty;
if (!Utils.IsNullOrEmpty(vmessItem.remarks))
{
remark = "#" + WebUtility.UrlEncode(vmessItem.remarks);
}
url = string.Format("{0}:{1}",
vmessItem.address,
vmessItem.port);
url = Utils.Base64Encode(url);
url = string.Format("{0}{1}{2}", Global.socksProtocol, url, remark);
}
else
{
}
return url;
}
catch
{
return "";
}
}
/// <summary>
/// 移动服务器
/// </summary>
/// <param name="config"></param>
/// <param name="index"></param>
/// <param name="eMove"></param>
/// <returns></returns>
public static int MoveServer(ref Config config, int index, EMove eMove)
{
int count = config.vmess.Count;
if (index < 0 || index > config.vmess.Count - 1)
{
return -1;
}
switch (eMove)
{
case EMove.Top:
{
if (index == 0)
{
return 0;
}
VmessItem vmess = Utils.DeepCopy<VmessItem>(config.vmess[index]);
config.vmess.RemoveAt(index);
config.vmess.Insert(0, vmess);
if (index < config.index)
{
//
}
else if (config.index == index)
{
config.index = 0;
}
else
{
config.index++;
}
break;
}
case EMove.Up:
{
if (index == 0)
{
return 0;
}
VmessItem vmess = Utils.DeepCopy<VmessItem>(config.vmess[index]);
config.vmess.RemoveAt(index);
config.vmess.Insert(index - 1, vmess);
if (index == config.index + 1)
{
config.index++;
}
else if (config.index == index)
{
config.index--;
}
break;
}
case EMove.Down:
{
if (index == count - 1)
{
return 0;
}
VmessItem vmess = Utils.DeepCopy<VmessItem>(config.vmess[index]);
config.vmess.RemoveAt(index);
config.vmess.Insert(index + 1, vmess);
if (index == config.index - 1)
{
config.index--;
}
else if (config.index == index)
{
config.index++;
}
break;
}
case EMove.Bottom:
{
if (index == count - 1)
{
return 0;
}
VmessItem vmess = Utils.DeepCopy<VmessItem>(config.vmess[index]);
config.vmess.RemoveAt(index);
config.vmess.Add(vmess);
if (index < config.index)
{
config.index--;
}
else if (config.index == index)
{
config.index = count - 1;
}
else
{
//
}
break;
}
}
Global.reloadV2ray = true;
ToJsonFile(config);
return 0;
}
/// <summary>
/// 添加自定义服务器
/// </summary>
/// <param name="config"></param>
/// <param name="fileName"></param>
/// <returns></returns>
public static int AddCustomServer(ref Config config, string fileName)
{
string newFileName = string.Empty;
newFileName = string.Format("{0}.json", Utils.GetGUID());
newFileName = Path.Combine(Utils.GetTempPath(), newFileName);
try
{
File.Copy(fileName, newFileName);
}
catch
{
return -1;
}
VmessItem vmessItem = new VmessItem();
vmessItem.address = newFileName;
vmessItem.configType = (int)EConfigType.Custom;
vmessItem.remarks = string.Format("import custom@{0}", DateTime.Now.ToShortDateString());
config.vmess.Add(vmessItem);
if (config.vmess.Count == 1)
{
config.index = 0;
Global.reloadV2ray = true;
}
ToJsonFile(config);
return 0;
}
/// <summary>
/// 添加服务器或编辑
/// </summary>
/// <param name="config"></param>
/// <param name="vmessItem"></param>
/// <param name="index"></param>
/// <returns></returns>
public static int EditCustomServer(ref Config config, VmessItem vmessItem, int index)
{
//修改
config.vmess[index] = vmessItem;
if (config.index.Equals(index))
{
Global.reloadV2ray = true;
}
ToJsonFile(config);
return 0;
}
/// <summary>
/// 添加服务器或编辑
/// </summary>
/// <param name="config"></param>
/// <param name="vmessItem"></param>
/// <param name="index"></param>
/// <returns></returns>
public static int AddShadowsocksServer(ref Config config, VmessItem vmessItem, int index)
{
vmessItem.configVersion = 2;
vmessItem.configType = (int)EConfigType.Shadowsocks;
if (index >= 0)
{
//修改
config.vmess[index] = vmessItem;
if (config.index.Equals(index))
{
Global.reloadV2ray = true;
}
}
else
{
//添加
config.vmess.Add(vmessItem);
if (config.vmess.Count == 1)
{
config.index = 0;
Global.reloadV2ray = true;
}
}
ToJsonFile(config);
return 0;
}
/// <summary>
/// 添加服务器或编辑
/// </summary>
/// <param name="config"></param>
/// <param name="vmessItem"></param>
/// <param name="index"></param>
/// <returns></returns>
public static int AddSocksServer(ref Config config, VmessItem vmessItem, int index)
{
vmessItem.configVersion = 2;
vmessItem.configType = (int)EConfigType.Socks;
if (index >= 0)
{
//修改
config.vmess[index] = vmessItem;
if (config.index.Equals(index))
{
Global.reloadV2ray = true;
}
}
else
{
//添加
config.vmess.Add(vmessItem);
if (config.vmess.Count == 1)
{
config.index = 0;
Global.reloadV2ray = true;
}
}
ToJsonFile(config);
return 0;
}
/// <summary>
/// 配置文件版本升级
/// </summary>
/// <param name="vmessItem"></param>
/// <returns></returns>
public static int UpgradeServerVersion(ref VmessItem vmessItem)
{
try
{
if (vmessItem == null
|| vmessItem.configVersion == 2)
{
return 0;
}
if (vmessItem.configType == (int)EConfigType.Vmess)
{
string path = "";
string host = "";
string[] arrParameter;
switch (vmessItem.network)
{
case "kcp":
break;
case "ws":
//*ws(path+host),它们中间分号(;)隔开
arrParameter = vmessItem.requestHost.Replace(" ", "").Split(';');
if (arrParameter.Length > 0)
{
path = arrParameter[0];
}
if (arrParameter.Length > 1)
{
path = arrParameter[0];
host = arrParameter[1];
}
vmessItem.path = path;
vmessItem.requestHost = host;
break;
case "h2":
//*h2 path
arrParameter = vmessItem.requestHost.Replace(" ", "").Split(';');
if (arrParameter.Length > 0)
{
path = arrParameter[0];
}
if (arrParameter.Length > 1)
{
path = arrParameter[0];
host = arrParameter[1];
}
vmessItem.path = path;
vmessItem.requestHost = host;
break;
default:
break;
}
}
vmessItem.configVersion = 2;
}
catch
{
}
return 0;
}
/// <summary>
/// 批量添加服务器
/// </summary>
/// <param name="config"></param>
/// <param name="clipboardData"></param>
/// <param name="subid"></param>
/// <returns></returns>
public static int AddBatchServers(ref Config config, string clipboardData, string subid = "")
{
if (Utils.IsNullOrEmpty(clipboardData))
{
return -1;
}
//if (clipboardData.IndexOf("vmess") >= 0 && clipboardData.IndexOf("vmess") == clipboardData.LastIndexOf("vmess"))
//{
// clipboardData = clipboardData.Replace("\r\n", "").Replace("\n", "");
//}
int countServers = 0;
//string[] arrData = clipboardData.Split(new string[] { "\r\n" }, StringSplitOptions.None);
string[] arrData = clipboardData.Split(Environment.NewLine.ToCharArray());
foreach (string str in arrData)
{
string msg;
VmessItem vmessItem = V2rayConfigHandler.ImportFromClipboardConfig(str, out msg);
if (vmessItem == null)
{
continue;
}
vmessItem.subid = subid;
if (vmessItem.configType == (int)EConfigType.Vmess)
{
if (AddServer(ref config, vmessItem, -1) == 0)
{
countServers++;
}
}
else if (vmessItem.configType == (int)EConfigType.Shadowsocks)
{
if (AddShadowsocksServer(ref config, vmessItem, -1) == 0)
{
countServers++;
}
}
else if (vmessItem.configType == (int)EConfigType.Socks)
{
if (AddSocksServer(ref config, vmessItem, -1) == 0)
{
countServers++;
}
}
}
if (countServers > 0)
{
return 0;
}
return -1;
}
/// <summary>
/// save sub
/// </summary>
/// <param name="config"></param>
/// <returns></returns>
public static int SaveSubItem(ref Config config)
{
if (config.subItem == null || config.subItem.Count <= 0)
{
return -1;
}
foreach (SubItem sub in config.subItem)
{
if (Utils.IsNullOrEmpty(sub.id))
{
sub.id = Utils.GetGUID();
}
}
ToJsonFile(config);
return 0;
}
/// <summary>
/// 移除服务器
/// </summary>
/// <param name="config"></param>
/// <param name="subid"></param>
/// <returns></returns>
public static int RemoveServerViaSubid(ref Config config, string subid)
{
if (Utils.IsNullOrEmpty(subid) || config.vmess.Count <= 0)
{
return -1;
}
for (int k = config.vmess.Count - 1; k >= 0; k--)
{
if (config.vmess[k].subid.Equals(subid))
{
config.vmess.RemoveAt(k);
}
}
ToJsonFile(config);
return 0;
}
}
}

View file

@ -0,0 +1,190 @@
using System;
using Microsoft.Win32;
using System.Runtime.InteropServices;
namespace v2rayN.Handler
{
/// <summary>
/// 设置系统代理类
/// </summary>
class ProxySetting
{
public static bool UnsetProxy()
{
return SetProxy(null, null);
}
public static bool SetProxy(string strProxy)
{
return SetProxy(strProxy, null);
}
public static bool SetProxy(string strProxy, string exceptions)
{
InternetPerConnOptionList list = new InternetPerConnOptionList();
int optionCount = string.IsNullOrEmpty(strProxy) ? 1 : (string.IsNullOrEmpty(exceptions) ? 2 : 3);
InternetConnectionOption[] options = new InternetConnectionOption[optionCount];
// USE a proxy server ...
options[0].m_Option = PerConnOption.INTERNET_PER_CONN_FLAGS;
options[0].m_Value.m_Int = (int)((optionCount < 2) ? PerConnFlags.PROXY_TYPE_DIRECT : (PerConnFlags.PROXY_TYPE_DIRECT | PerConnFlags.PROXY_TYPE_PROXY));
// use THIS proxy server
if (optionCount > 1)
{
options[1].m_Option = PerConnOption.INTERNET_PER_CONN_PROXY_SERVER;
options[1].m_Value.m_StringPtr = Marshal.StringToHGlobalAuto(strProxy);
// except for these addresses ...
if (optionCount > 2)
{
options[2].m_Option = PerConnOption.INTERNET_PER_CONN_PROXY_BYPASS;
options[2].m_Value.m_StringPtr = Marshal.StringToHGlobalAuto(exceptions);
}
}
// default stuff
list.dwSize = Marshal.SizeOf(list);
list.szConnection = IntPtr.Zero;
list.dwOptionCount = options.Length;
list.dwOptionError = 0;
int optSize = Marshal.SizeOf(typeof(InternetConnectionOption));
// make a pointer out of all that ...
IntPtr optionsPtr = Marshal.AllocCoTaskMem(optSize * options.Length);
// copy the array over into that spot in memory ...
for (int i = 0; i < options.Length; ++i)
{
IntPtr opt = new IntPtr(optionsPtr.ToInt32() + (i * optSize));
Marshal.StructureToPtr(options[i], opt, false);
}
list.options = optionsPtr;
// and then make a pointer out of the whole list
IntPtr ipcoListPtr = Marshal.AllocCoTaskMem((Int32)list.dwSize);
Marshal.StructureToPtr(list, ipcoListPtr, false);
// and finally, call the API method!
int returnvalue = NativeMethods.InternetSetOption(IntPtr.Zero,
InternetOption.INTERNET_OPTION_PER_CONNECTION_OPTION,
ipcoListPtr, list.dwSize) ? -1 : 0;
if (returnvalue == 0)
{ // get the error codes, they might be helpful
returnvalue = Marshal.GetLastWin32Error();
}
// FREE the data ASAP
Marshal.FreeCoTaskMem(optionsPtr);
Marshal.FreeCoTaskMem(ipcoListPtr);
if (returnvalue > 0)
{ // throw the error codes, they might be helpful
//throw new Win32Exception(Marshal.GetLastWin32Error());
}
return (returnvalue < 0);
}
#region WinInet structures
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
public struct InternetPerConnOptionList
{
public int dwSize; // size of the INTERNET_PER_CONN_OPTION_LIST struct
public IntPtr szConnection; // connection name to set/query options
public int dwOptionCount; // number of options to set/query
public int dwOptionError; // on error, which option failed
//[MarshalAs(UnmanagedType.)]
public IntPtr options;
};
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
public struct InternetConnectionOption
{
static readonly int Size;
public PerConnOption m_Option;
public InternetConnectionOptionValue m_Value;
static InternetConnectionOption()
{
InternetConnectionOption.Size = Marshal.SizeOf(typeof(InternetConnectionOption));
}
// Nested Types
[StructLayout(LayoutKind.Explicit)]
public struct InternetConnectionOptionValue
{
// Fields
[FieldOffset(0)]
public System.Runtime.InteropServices.ComTypes.FILETIME m_FileTime;
[FieldOffset(0)]
public int m_Int;
[FieldOffset(0)]
public IntPtr m_StringPtr;
}
}
#endregion
#region WinInet enums
//
// options manifests for Internet{Query|Set}Option
//
public enum InternetOption : uint
{
INTERNET_OPTION_PER_CONNECTION_OPTION = 75
}
//
// Options used in INTERNET_PER_CONN_OPTON struct
//
public enum PerConnOption
{
INTERNET_PER_CONN_FLAGS = 1, // Sets or retrieves the connection type. The Value member will contain one or more of the values from PerConnFlags
INTERNET_PER_CONN_PROXY_SERVER = 2, // Sets or retrieves a string containing the proxy servers.
INTERNET_PER_CONN_PROXY_BYPASS = 3, // Sets or retrieves a string containing the URLs that do not use the proxy server.
INTERNET_PER_CONN_AUTOCONFIG_URL = 4//, // Sets or retrieves a string containing the URL to the automatic configuration script.
}
//
// PER_CONN_FLAGS
//
[Flags]
public enum PerConnFlags
{
PROXY_TYPE_DIRECT = 0x00000001, // direct to net
PROXY_TYPE_PROXY = 0x00000002, // via named proxy
PROXY_TYPE_AUTO_PROXY_URL = 0x00000004, // autoproxy URL
PROXY_TYPE_AUTO_DETECT = 0x00000008 // use autoproxy detection
}
#endregion
internal static class NativeMethods
{
[DllImport("WinInet.dll", SetLastError = true, CharSet = CharSet.Auto)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool InternetSetOption(IntPtr hInternet, InternetOption dwOption, IntPtr lpBuffer, int dwBufferLength);
}
//判断是否使用代理
public static bool UsedProxy()
{
RegistryKey rk = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings", true);
if (rk.GetValue("ProxyEnable").ToString() == "1")
{
rk.Close();
return true;
}
else
{
rk.Close();
return false;
}
}
//获得代理的IP和端口
public static string GetProxyProxyServer()
{
RegistryKey rk = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings", true);
string ProxyServer = rk.GetValue("ProxyServer").ToString();
rk.Close();
return ProxyServer;
}
}
}

View file

@ -0,0 +1,41 @@
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using ZXing;
using ZXing.QrCode;
namespace v2rayN.Handler
{
/// <summary>
/// 含有QR码的描述类和包装编码和渲染
/// </summary>
public class QRCodeHelper
{
public static Image GetQRCode(string strContent)
{
Image img = null;
try
{
QrCodeEncodingOptions options = new QrCodeEncodingOptions();
options.CharacterSet = "UTF-8";
options.DisableECI = true; // Extended Channel Interpretation (ECI) 主要用于特殊的字符集。并不是所有的扫描器都支持这种编码。
options.ErrorCorrection = ZXing.QrCode.Internal.ErrorCorrectionLevel.M; // 纠错级别
options.Width = 500;
options.Height = 500;
options.Margin = 1;
// options.Hints更多属性也可以在这里添加。
BarcodeWriter writer = new BarcodeWriter();
writer.Format = BarcodeFormat.QR_CODE;
writer.Options = options;
Bitmap bmp = writer.Write(strContent);
img = (Image)bmp;
return img;
}
catch
{
return img;
}
}
}
}

View file

@ -0,0 +1,53 @@
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace v2rayN.Handler
{
/// <summary>
/// 路由规则文件处理类
/// </summary>
class RoutingRuleHandler
{
/// <summary>
/// Parse Pac to v2ray rule
/// </summary>
/// <param name="filePath"></param>
/// <returns></returns>
public static List<string> ParsePac(string filePath)
{
string result = Utils.LoadResource(filePath);
if (Utils.IsNullOrEmpty(result))
{
return null;
}
//取得rule
string pattern = @"(?is)(?<=\[)(.*)(?=\])";
Regex rgx = new Regex(pattern);
result = rgx.Match(result).Value;
int index = result.IndexOf("];");
result = result.Substring(0, index);
if (Utils.IsNullOrEmpty(result))
{
return null;
}
string[] arrPac = result.Split(',');
List<string> lstPac = new List<string>();
foreach (string str in arrPac)
{
//处理有效值
if (Utils.IsNullOrEmpty(str)
|| str.Length <= 3)
{
continue;
}
string value = str.Replace("\",", "").Replace("\"", "").Replace(",", "").Replace("\r\n", "").Replace(" ", "");
lstPac.Add(value);
}
return lstPac;
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,165 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using v2rayN.Mode;
namespace v2rayN.Handler
{
/// <summary>
/// 消息委托
/// </summary>
/// <param name="notify">是否显示在托盘区</param>
/// <param name="msg">内容</param>
public delegate void ProcessDelegate(bool notify, string msg);
/// <summary>
/// v2ray进程处理类
/// </summary>
class V2rayHandler
{
private static string v2rayConfigRes = Global.v2rayConfigFileName;
private List<string> lstV2ray;
public event ProcessDelegate ProcessEvent;
private int processId = 0;
public V2rayHandler()
{
lstV2ray = new List<string>();
lstV2ray.Add("wv2ray");
lstV2ray.Add("v2ray");
}
/// <summary>
/// 载入V2ray
/// </summary>
public void LoadV2ray(Config config)
{
if (Global.reloadV2ray)
{
string msg = string.Empty;
string fileName = Utils.GetPath(v2rayConfigRes);
if (V2rayConfigHandler.GenerateClientConfig(config, fileName, false, out msg) != 0)
{
ShowMsg(false, msg);
}
else
{
ShowMsg(true, msg);
V2rayRestart();
}
}
}
/// <summary>
/// V2ray重启
/// </summary>
private void V2rayRestart()
{
V2rayStop();
V2rayStart();
}
/// <summary>
/// V2ray停止
/// </summary>
public void V2rayStop()
{
try
{
bool blExist = true;
if (processId > 0)
{
Process p1 = Process.GetProcessById(processId);
if (p1 != null)
{
p1.Kill();
blExist = false;
}
}
if (blExist)
{
foreach (string vName in lstV2ray)
{
Process[] killPro = Process.GetProcessesByName(vName);
foreach (Process p in killPro)
{
p.Kill();
}
}
}
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
}
}
/// <summary>
/// V2ray启动
/// </summary>
private void V2rayStart()
{
ShowMsg(false, string.Format(UIRes.I18N("StartService"), DateTime.Now.ToString()));
try
{
//查找v2ray文件是否存在
string fileName = string.Empty;
for (int k = 0; k < lstV2ray.Count; k++)
{
string vName = string.Format("{0}.exe", lstV2ray[k]);
vName = Utils.GetPath(vName);
if (File.Exists(vName))
{
fileName = vName;
break;
}
}
if (Utils.IsNullOrEmpty(fileName))
{
string msg = string.Format(UIRes.I18N("NotFoundCore"), @"https://github.com/v2ray/v2ray-core/releases");
ShowMsg(true, msg);
return;
}
Process p = new Process();
p.StartInfo.FileName = fileName;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = true;
p.OutputDataReceived += new DataReceivedEventHandler((sender, e) =>
{
if (!String.IsNullOrEmpty(e.Data))
{
string msg = e.Data + Environment.NewLine;
ShowMsg(false, msg);
}
});
p.Start();
p.BeginOutputReadLine();
processId = p.Id;
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
string msg = ex.Message;
ShowMsg(true, msg);
}
}
/// <summary>
/// 消息委托
/// </summary>
/// <param name="notify"></param>
/// <param name="msg"></param>
private void ShowMsg(bool notify, string msg)
{
if (ProcessEvent != null)
{
ProcessEvent(notify, msg);
}
}
}
}

View file

@ -0,0 +1,214 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using Newtonsoft.Json;
using v2rayN.Mode;
using v2rayN.Properties;
using v2rayN.HttpProxyHandler;
namespace v2rayN.Handler
{
/// <summary>
///Update V2ray Core
/// </summary>
class V2rayUpdateHandle
{
public event EventHandler<ResultEventArgs> AbsoluteCompleted;
public event EventHandler<ResultEventArgs> UpdateCompleted;
public event ErrorEventHandler Error;
public string DownloadFileName
{
get { return "v2ray-windows.zip"; }
}
public class ResultEventArgs : EventArgs
{
public bool Success;
public string Msg;
public ResultEventArgs(bool success, string msg)
{
this.Success = success;
this.Msg = msg;
}
}
private string latestUrl = "https://github.com/v2ray/v2ray-core/releases/latest";
private const string coreURL = "https://github.com/v2ray/v2ray-core/releases/download/{0}/v2ray-windows-{1}.zip";
private int progressPercentage = -1;
private bool blFirst = true;
private long totalBytesToReceive = 0;
private DateTime totalDatetime = new DateTime();
public void AbsoluteV2rayCore(Config config)
{
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; //TLS 1.2
ServicePointManager.DefaultConnectionLimit = 256;
WebRequest request = WebRequest.Create(latestUrl);
request.BeginGetResponse(new AsyncCallback(OnResponse), request);
}
private void OnResponse(IAsyncResult ar)
{
try
{
HttpWebRequest request = (HttpWebRequest)ar.AsyncState;
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(ar);
string redirectUrl = response.ResponseUri.AbsoluteUri;
string version = redirectUrl.Substring(redirectUrl.LastIndexOf("/", StringComparison.Ordinal) + 1);
string osBit = string.Empty;
if (Environment.Is64BitProcess)
{
osBit = "64";
}
else
{
osBit = "32";
}
string url = string.Format(coreURL, version, osBit);
if (AbsoluteCompleted != null)
{
AbsoluteCompleted(this, new ResultEventArgs(true, url));
}
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
if (Error != null)
Error(this, new ErrorEventArgs(ex));
}
}
public void DownloadFileAsync(Config config, string url)
{
try
{
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; //TLS 1.2
ServicePointManager.DefaultConnectionLimit = 256;
if (UpdateCompleted != null)
{
UpdateCompleted(this, new ResultEventArgs(false, url));
}
progressPercentage = -1;
WebClientEx ws = new WebClientEx();
ws.DownloadFileCompleted += ws_DownloadFileCompleted;
ws.DownloadProgressChanged += ws_DownloadProgressChanged;
ws.DownloadFileAsync(new Uri(url), Utils.GetPath(DownloadFileName));
blFirst = true;
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
if (Error != null)
Error(this, new ErrorEventArgs(ex));
}
}
void ws_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
if (blFirst)
{
totalBytesToReceive = e.TotalBytesToReceive - e.BytesReceived;
totalDatetime = DateTime.Now;
blFirst = false;
}
if (UpdateCompleted != null)
{
if (progressPercentage != e.ProgressPercentage && e.ProgressPercentage % 10 == 0)
{
progressPercentage = e.ProgressPercentage;
string msg = string.Format("......{0}%", e.ProgressPercentage);
UpdateCompleted(this, new ResultEventArgs(false, msg));
}
}
}
void ws_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
try
{
if (e.Error == null
|| Utils.IsNullOrEmpty(e.Error.ToString()))
{
if (UpdateCompleted != null)
{
TimeSpan ts = (DateTime.Now - totalDatetime);
string speed = string.Format("{0} M/s", (totalBytesToReceive / ts.TotalMilliseconds / 1000).ToString("#0.##"));
UpdateCompleted(this, new ResultEventArgs(true, speed));
}
}
else
{
throw e.Error;
}
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
if (Error != null)
Error(this, new ErrorEventArgs(ex));
}
}
/// <summary>
/// DownloadString
/// </summary>
/// <param name="url"></param>
public void WebDownloadString(string url)
{
string source = string.Empty;
try
{
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; //TLS 1.2
ServicePointManager.DefaultConnectionLimit = 256;
WebClientEx ws = new WebClientEx();
ws.DownloadStringCompleted += Ws_DownloadStringCompleted;
ws.DownloadStringAsync(new Uri(url));
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
}
}
private void Ws_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
try
{
if (e.Error == null
|| Utils.IsNullOrEmpty(e.Error.ToString()))
{
string source = e.Result;
if (UpdateCompleted != null)
{
UpdateCompleted(this, new ResultEventArgs(true, source));
}
}
else
{
throw e.Error;
}
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
if (Error != null)
Error(this, new ErrorEventArgs(ex));
}
}
}
}

View file

@ -0,0 +1,177 @@
using System;
using v2rayN.Mode;
namespace v2rayN.HttpProxyHandler
{
/// <summary>
/// 系统代理(http)总处理
/// 启动privoxy提供http协议
/// 使用SysProxy设置IE系统代理或者PAC模式
/// </summary>
class HttpProxyHandle
{
private static string GetTimestamp(DateTime value)
{
return value.ToString("yyyyMMddHHmmssfff");
}
public static void ReSetPACProxy(Config config)
{
if (config.listenerType == 2)
{
//SysProxyHandle.SetIEProxy(false, false, null, null);
//PACServerHandle.Stop();
}
Update(config, false);
}
public static bool Update(Config config, bool forceDisable)
{
int type = config.listenerType;
if (forceDisable)
{
type = 0;
}
try
{
if (type != 0)
{
var port = Global.sysAgentPort;
if (port <= 0)
{
return false;
}
if (type == 1)
{
PACServerHandle.Stop();
PACFileWatcherHandle.StopWatch();
SysProxyHandle.SetIEProxy(true, true, "127.0.0.1:" + port, null);
}
else if (type == 2)
{
string pacUrl = GetPacUrl();
SysProxyHandle.SetIEProxy(true, false, null, pacUrl);
PACServerHandle.Stop();
PACServerHandle.Init(config);
PACFileWatcherHandle.StartWatch(config);
}
else if (type == 3)
{
PACServerHandle.Stop();
PACFileWatcherHandle.StopWatch();
SysProxyHandle.SetIEProxy(false, false, null, null);
}
else if (type == 4)
{
string pacUrl = GetPacUrl();
SysProxyHandle.SetIEProxy(false, false, null, null);
PACServerHandle.Stop();
PACServerHandle.Init(config);
PACFileWatcherHandle.StartWatch(config);
}
}
else
{
SysProxyHandle.SetIEProxy(false, false, null, null);
PACServerHandle.Stop();
PACFileWatcherHandle.StopWatch();
}
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
}
return true;
}
/// <summary>
/// 启用系统代理(http)
/// </summary>
/// <param name="config"></param>
public static void StartHttpAgent(Config config)
{
try
{
int localPort = config.GetLocalPort("socks");
if (localPort > 0)
{
PrivoxyHandler.Instance.Start(localPort, config);
if (PrivoxyHandler.Instance.RunningPort > 0)
{
Global.sysAgent = true;
Global.socksPort = localPort;
Global.sysAgentPort = PrivoxyHandler.Instance.RunningPort;
Global.pacPort = Global.sysAgentPort + 1;
}
}
}
catch
{
}
}
/// <summary>
/// 关闭系统代理
/// </summary>
/// <param name="config"></param>
public static void CloseHttpAgent(Config config)
{
try
{
////开启全局代理则关闭
//if (Global.sysAgent)
//{
PrivoxyHandler.Instance.Stop();
Global.sysAgent = false;
Global.socksPort = 0;
Global.sysAgentPort = 0;
Global.pacPort = 0;
//}
}
catch
{
}
}
/// <summary>
/// 重启系统代理(http)
/// </summary>
/// <param name="config"></param>
/// <param name="forced"></param>
public static bool RestartHttpAgent(Config config, bool forced)
{
bool isRestart = false;
//强制重启或者socks端口变化
if (forced)
{
isRestart = true;
}
else
{
int localPort = config.GetLocalPort("socks");
if (localPort != Global.socksPort)
{
isRestart = true;
}
}
if (isRestart)
{
CloseHttpAgent(config);
StartHttpAgent(config);
return true;
}
return false;
}
public static string GetPacUrl()
{
string pacUrl = string.Format("http://127.0.0.1:{0}/pac/?t={1}", Global.pacPort,
GetTimestamp(DateTime.Now));
return pacUrl;
}
}
}

View file

@ -0,0 +1,98 @@
using System;
using System.Net;
using System.Text;
using System.Threading;
namespace v2rayN.HttpProxyHandler
{
public class HttpWebServer
{
private HttpListener _listener;
private Func<HttpListenerRequest, string> _responderMethod;
public HttpWebServer(string[] prefixes, Func<HttpListenerRequest, string> method)
{
try
{
_listener = new HttpListener();
if (!HttpListener.IsSupported)
throw new NotSupportedException(
"Needs Windows XP SP2, Server 2003 or later.");
// URI prefixes are required, for example
// "http://localhost:8080/index/".
if (prefixes == null || prefixes.Length == 0)
throw new ArgumentException("prefixes");
// A responder method is required
if (method == null)
throw new ArgumentException("method");
foreach (string s in prefixes)
_listener.Prefixes.Add(s);
_responderMethod = method;
_listener.Start();
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
}
}
public HttpWebServer(Func<HttpListenerRequest, string> method, params string[] prefixes)
: this(prefixes, method) { }
public void Run()
{
ThreadPool.QueueUserWorkItem((o) =>
{
Utils.SaveLog("Webserver running...");
try
{
while (_listener.IsListening)
{
ThreadPool.QueueUserWorkItem((c) =>
{
var ctx = c as HttpListenerContext;
try
{
string rstr = _responderMethod(ctx.Request);
byte[] buf = Encoding.UTF8.GetBytes(rstr);
ctx.Response.StatusCode = 200;
ctx.Response.ContentType = "application/x-ns-proxy-autoconfig";
ctx.Response.ContentLength64 = buf.Length;
ctx.Response.OutputStream.Write(buf, 0, buf.Length);
}
catch
{
} // suppress any exceptions
finally
{
// always close the stream
ctx.Response.OutputStream.Close();
}
}, _listener.GetContext());
}
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
} // suppress any exceptions
});
}
public void Stop()
{
if (_listener != null)
{
_listener.Stop();
_listener.Close();
_listener = null;
}
}
}
}

View file

@ -0,0 +1,45 @@
using System.IO;
using System.Windows.Forms;
using v2rayN.Mode;
namespace v2rayN.HttpProxyHandler
{
/// <summary>
/// 提供PAC功能支持
/// </summary>
class PACFileWatcherHandle
{
private static FileSystemWatcher fileSystemWatcher;
private static long fileSize;
public static void StartWatch(Config config)
{
if (fileSystemWatcher == null)
{
fileSystemWatcher = new FileSystemWatcher(Utils.StartupPath());
fileSystemWatcher.Filter = "pac.txt";
fileSystemWatcher.NotifyFilter = NotifyFilters.Size;
fileSystemWatcher.Changed += (sender, args) =>
{
var fileInfo = new FileInfo(args.FullPath);
if (fileSize != fileInfo.Length)
{
fileSize = fileInfo.Length;
HttpProxyHandle.ReSetPACProxy(config);
}
};
}
fileSystemWatcher.EnableRaisingEvents = true;
}
public static void StopWatch()
{
if (fileSystemWatcher != null)
{
fileSystemWatcher.EnableRaisingEvents = false;
}
}
}
}

View file

@ -0,0 +1,92 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using Newtonsoft.Json;
using v2rayN.Mode;
using v2rayN.Properties;
namespace v2rayN.HttpProxyHandler
{
/// <summary>
/// 提供PAC功能支持
/// </summary>
class PACListHandle
{
public event EventHandler<ResultEventArgs> UpdateCompleted;
public event ErrorEventHandler Error;
public class ResultEventArgs : EventArgs
{
public bool Success;
public ResultEventArgs(bool success)
{
this.Success = success;
}
}
private const string GFWLIST_URL = "https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt";
private static readonly IEnumerable<char> IgnoredLineBegins = new[] { '!', '[' };
public void UpdatePACFromGFWList(Config config)
{
string url = GFWLIST_URL;
if (!Utils.IsNullOrEmpty(config.urlGFWList))
{
url = config.urlGFWList;
}
//默认用户已开启系统代理
//var httpProxy = config.inbound.FirstOrDefault(x => x.protocol=="http");
//if (httpProxy == null)
//{
// throw new Exception("未发现HTTP代理无法设置代理更新");
//}
WebClient http = new WebClient();
//http.Headers.Add("Connection", "Close");
//http.Proxy = new WebProxy(IPAddress.Loopback.ToString(), httpProxy.localPort);
http.DownloadStringCompleted += http_DownloadStringCompleted;
http.DownloadStringAsync(new Uri(url));
}
private void http_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
try
{
File.WriteAllText(Utils.GetTempPath("gfwlist.txt"), e.Result, Encoding.UTF8);
List<string> lines = ParseResult(e.Result);
string abpContent = Utils.UnGzip(Resources.abp_js);
abpContent = abpContent.Replace("__RULES__", JsonConvert.SerializeObject(lines, Formatting.Indented));
File.WriteAllText(Utils.GetPath(Global.pacFILE), abpContent, Encoding.UTF8);
if (UpdateCompleted != null) UpdateCompleted(this, new ResultEventArgs(true));
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
if (Error != null) Error(this, new ErrorEventArgs(ex));
}
}
public static List<string> ParseResult(string response)
{
byte[] bytes = Convert.FromBase64String(response);
string content = Encoding.ASCII.GetString(bytes);
List<string> valid_lines = new List<string>();
using (var sr = new StringReader(content))
{
foreach (var line in sr.NonWhiteSpaceLines())
{
if (line.BeginWithAny(IgnoredLineBegins))
continue;
valid_lines.Add(line);
}
}
return valid_lines;
}
}
}

View file

@ -0,0 +1,133 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using v2rayN.Mode;
using v2rayN.Properties;
using v2rayN.Tool;
namespace v2rayN.HttpProxyHandler
{
/// <summary>
/// 提供PAC功能支持
/// </summary>
class PACServerHandle
{
private static Hashtable httpWebServer = new Hashtable();
private static Hashtable pacList = new Hashtable();
public static void Init(Config config)
{
InitServer("127.0.0.1");
if (config.allowLANConn)
{
List<string> lstIPAddress = Utils.GetHostIPAddress();
if (lstIPAddress.Count <= 0)
{
return;
}
foreach (string str in lstIPAddress)
{
InitServer(str);
}
}
}
public static void InitServer(string address)
{
try
{
if (!pacList.ContainsKey(address))
{
pacList.Add(address, GetPacList(address));
}
string prefixes = string.Format("http://{0}:{1}/pac/", address, Global.pacPort);
Utils.SaveLog("Webserver prefixes " + prefixes);
HttpWebServer ws = new HttpWebServer(SendResponse, prefixes);
ws.Run();
if (!httpWebServer.ContainsKey(address) && ws != null)
{
httpWebServer.Add(address, ws);
}
}
catch (Exception ex)
{
Utils.SaveLog("Webserver InitServer " + ex.Message);
}
}
public static string SendResponse(HttpListenerRequest request)
{
try
{
string[] arrAddress = request.UserHostAddress.Split(':');
string address = "127.0.0.1";
if (arrAddress.Length > 0)
{
address = arrAddress[0];
}
return pacList[address].ToString();
}
catch (Exception ex)
{
Utils.SaveLog("Webserver SendResponse " + ex.Message);
return ex.Message;
}
}
public static void Stop()
{
try
{
if (httpWebServer == null)
{
return;
}
foreach (var key in httpWebServer.Keys)
{
Utils.SaveLog("Webserver Stop " + key.ToString());
((HttpWebServer)httpWebServer[key]).Stop();
}
httpWebServer.Clear();
}
catch (Exception ex)
{
Utils.SaveLog("Webserver Stop " + ex.Message);
}
}
private static string GetPacList(string address)
{
var port = Global.sysAgentPort;
if (port <= 0)
{
return "No port";
}
try
{
List<string> lstProxy = new List<string>();
lstProxy.Add(string.Format("PROXY {0}:{1};", address, port));
var proxy = string.Join("", lstProxy.ToArray());
string strPacfile = Utils.GetPath(Global.pacFILE);
if (!File.Exists(strPacfile))
{
FileManager.UncompressFile(strPacfile, Resources.pac_txt);
}
var pac = File.ReadAllText(strPacfile, Encoding.UTF8);
pac = pac.Replace("__PROXY__", proxy);
return pac;
}
catch
{ }
return "No pac content";
}
}
}

View file

@ -0,0 +1,215 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using v2rayN.Mode;
using v2rayN.Properties;
using v2rayN.Tool;
namespace v2rayN.HttpProxyHandler
{
/// <summary>
/// Privoxy处理类提供http协议代理
/// </summary>
class PrivoxyHandler
{
/// <summary>
/// 单例
/// </summary>
private static PrivoxyHandler instance;
private static int _uid;
private static string _uniqueConfigFile;
private static Job _privoxyJob;
private Process _process;
private int _runningPort;
private bool _isRunning;
static PrivoxyHandler()
{
try
{
_uid = Application.StartupPath.GetHashCode(); // Currently we use ss's StartupPath to identify different Privoxy instance.
_uniqueConfigFile = string.Format("privoxy_{0}.conf", _uid);
_privoxyJob = new Job();
FileManager.UncompressFile(Utils.GetTempPath("v2ray_privoxy.exe"), Resources.privoxy_exe);
FileManager.UncompressFile(Utils.GetTempPath("mgwz.dll"), Resources.mgwz_dll);
}
catch (IOException ex)
{
Utils.SaveLog(ex.Message, ex);
}
}
private PrivoxyHandler()
{
}
/// <summary>
/// 单例
/// </summary>
public static PrivoxyHandler Instance
{
get
{
if (instance == null)
{
instance = new PrivoxyHandler();
}
return instance;
}
}
public int RunningPort
{
get
{
return _runningPort;
}
}
public bool IsRunning
{
get
{
return _isRunning;
}
}
public void Start(int localPort, Config config)
{
if (_process == null)
{
Process[] existingPrivoxy = Process.GetProcessesByName("v2ray_privoxy");
foreach (Process p in existingPrivoxy.Where(IsChildProcess))
{
KillProcess(p);
}
string privoxyConfig = Resources.privoxy_conf;
_runningPort = GetFreePort(localPort);
privoxyConfig = privoxyConfig.Replace("__SOCKS_PORT__", localPort.ToString());
privoxyConfig = privoxyConfig.Replace("__PRIVOXY_BIND_PORT__", _runningPort.ToString());
if (config.allowLANConn)
{
privoxyConfig = privoxyConfig.Replace("__PRIVOXY_BIND_IP__", "0.0.0.0");
}
else
{
privoxyConfig = privoxyConfig.Replace("__PRIVOXY_BIND_IP__", "127.0.0.1");
}
FileManager.ByteArrayToFile(Utils.GetTempPath(_uniqueConfigFile), Encoding.UTF8.GetBytes(privoxyConfig));
_process = new Process
{
// Configure the process using the StartInfo properties.
StartInfo =
{
FileName = "v2ray_privoxy.exe",
Arguments = _uniqueConfigFile,
WorkingDirectory = Utils.GetTempPath(),
WindowStyle = ProcessWindowStyle.Hidden,
UseShellExecute = true,
CreateNoWindow = true
}
};
_process.Start();
/*
* Add this process to job obj associated with this ss process, so that
* when ss exit unexpectedly, this process will be forced killed by system.
*/
_privoxyJob.AddProcess(_process.Handle);
_isRunning = true;
}
}
public void Stop()
{
if (_process != null)
{
KillProcess(_process);
_process.Dispose();
_process = null;
_isRunning = false;
}
}
private static void KillProcess(Process p)
{
try
{
p.CloseMainWindow();
p.WaitForExit(100);
if (!p.HasExited)
{
p.Kill();
p.WaitForExit();
}
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
}
}
/*
* We won't like to kill other ss instances' v2ray_privoxy.exe.
* This function will check whether the given process is created
* by this process by checking the module path or command line.
*
* Since it's required to put ss in different dirs to run muti instances,
* different instance will create their unique "privoxy_UID.conf" where
* UID is hash of ss's location.
*/
private static bool IsChildProcess(Process process)
{
try
{
/*
* Under PortableMode, we could identify it by the path of v2ray_privoxy.exe.
*/
var path = process.MainModule.FileName;
return Utils.GetTempPath("v2ray_privoxy.exe").Equals(path);
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
/*
* Sometimes Process.GetProcessesByName will return some processes that
* are already dead, and that will cause exceptions here.
* We could simply ignore those exceptions.
*/
//Logging.LogUsefulException(ex);
return false;
}
}
private int GetFreePort(int localPort)
{
int defaultPort = 8123;
try
{
//// TCP stack please do me a favor
//TcpListener l = new TcpListener(IPAddress.Loopback, 0);
//l.Start();
//var port = ((IPEndPoint)l.LocalEndpoint).Port;
//l.Stop();
//return port;
return localPort + 1;
}
catch (Exception ex)
{
// in case access denied
Utils.SaveLog(ex.Message, ex);
return defaultPort;
}
}
}
}

View file

@ -0,0 +1,182 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Text;
using Newtonsoft.Json;
using v2rayN.Mode;
using v2rayN.Properties;
using v2rayN.Tool;
namespace v2rayN.HttpProxyHandler
{
class SysProxyHandle
{
private const string _userWininetConfigFile = "user-wininet.json";
private static string _queryStr;
// In general, this won't change
// format:
// <flags><CR-LF>
// <proxy-server><CR-LF>
// <bypass-list><CR-LF>
// <pac-url>
private static SysproxyConfig _userSettings = null;
enum RET_ERRORS : int
{
RET_NO_ERROR = 0,
INVALID_FORMAT = 1,
NO_PERMISSION = 2,
SYSCALL_FAILED = 3,
NO_MEMORY = 4,
INVAILD_OPTION_COUNT = 5,
};
static SysProxyHandle()
{
try
{
FileManager.UncompressFile(Utils.GetTempPath("sysproxy.exe"),
Environment.Is64BitOperatingSystem ? Resources.sysproxy64_exe : Resources.sysproxy_exe);
}
catch (IOException ex)
{
Utils.SaveLog(ex.Message, ex);
}
}
public static void SetIEProxy(bool enable, bool global, string proxyServer, string pacURL)
{
Read();
if (!_userSettings.UserSettingsRecorded)
{
// record user settings
ExecSysproxy("query");
ParseQueryStr(_queryStr);
}
string arguments;
if (enable)
{
arguments = global
? string.Format(
//"global {0} <local>;localhost;127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;172.32.*;192.168.*",
"global {0} <local>;localhost;127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;172.32.*",
proxyServer)
: string.Format("pac {0}", pacURL);
}
else
{
// restore user settings
var flags = _userSettings.Flags;
var proxy_server = _userSettings.ProxyServer ?? "-";
var bypass_list = _userSettings.BypassList ?? "-";
var pac_url = _userSettings.PacUrl ?? "-";
arguments = string.Format("set {0} {1} {2} {3}", flags, proxy_server, bypass_list, pac_url);
// have to get new settings
_userSettings.UserSettingsRecorded = false;
}
Save();
ExecSysproxy(arguments);
}
private static void ExecSysproxy(string arguments)
{
using (var process = new Process())
{
// Configure the process using the StartInfo properties.
process.StartInfo.FileName = Utils.GetTempPath("sysproxy.exe");
process.StartInfo.Arguments = arguments;
process.StartInfo.WorkingDirectory = Utils.GetTempPath();
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.RedirectStandardOutput = true;
// Need to provide encoding info, or output/error strings we got will be wrong.
process.StartInfo.StandardOutputEncoding = Encoding.Unicode;
process.StartInfo.StandardErrorEncoding = Encoding.Unicode;
process.StartInfo.CreateNoWindow = true;
process.Start();
var stderr = process.StandardError.ReadToEnd();
var stdout = process.StandardOutput.ReadToEnd();
process.WaitForExit();
var exitCode = process.ExitCode;
if (exitCode != (int)RET_ERRORS.RET_NO_ERROR)
{
throw new Exception(stderr);
}
if (arguments == "query")
{
if (stdout.IsNullOrWhiteSpace() || stdout.IsNullOrEmpty())
{
// we cannot get user settings
throw new Exception("failed to query wininet settings");
}
_queryStr = stdout;
}
}
}
private static void Save()
{
try
{
using (StreamWriter sw = new StreamWriter(File.Open(Utils.GetPath(_userWininetConfigFile), FileMode.Create)))
{
string jsonString = JsonConvert.SerializeObject(_userSettings, Formatting.Indented);
sw.Write(jsonString);
sw.Flush();
}
}
catch (IOException ex)
{
Utils.SaveLog(ex.Message, ex);
}
}
private static void Read()
{
try
{
string configContent = File.ReadAllText(Utils.GetPath(_userWininetConfigFile));
_userSettings = JsonConvert.DeserializeObject<SysproxyConfig>(configContent);
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
// Suppress all exceptions. finally block will initialize new user config settings.
}
finally
{
if (_userSettings == null) _userSettings = new SysproxyConfig();
}
}
private static void ParseQueryStr(string str)
{
string[] userSettingsArr = str.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
_userSettings.Flags = userSettingsArr[0];
// handle output from WinINET
if (userSettingsArr[1] == "(null)") _userSettings.ProxyServer = null;
else _userSettings.ProxyServer = userSettingsArr[1];
if (userSettingsArr[2] == "(null)") _userSettings.BypassList = null;
else _userSettings.BypassList = userSettingsArr[2];
if (userSettingsArr[3] == "(null)") _userSettings.PacUrl = null;
else _userSettings.PacUrl = userSettingsArr[3];
_userSettings.UserSettingsRecorded = true;
}
}
}

View file

@ -0,0 +1,22 @@
using System;
using System.Net;
namespace v2rayN.HttpProxyHandler
{
class WebClientEx : WebClient
{
public int Timeout { get; set; }
public WebClientEx(int timeout = 3000)
{
Timeout = timeout;
}
protected override WebRequest GetWebRequest(Uri address)
{
var request = base.GetWebRequest(address);
request.Timeout = Timeout;
return request;
}
}
}

View file

@ -0,0 +1,493 @@
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace v2rayN.Mode
{
/// <summary>
/// 本软件配置文件实体类
/// </summary>
[Serializable]
public class Config
{
/// <summary>
/// 本地监听
/// </summary>
public List<InItem> inbound { get; set; }
/// <summary>
/// 允许日志
/// </summary>
public bool logEnabled { get; set; }
/// <summary>
/// 日志等级
/// </summary>
public string loglevel { get; set; }
/// <summary>
/// 活动配置序号
/// </summary>
public int index { get; set; }
/// <summary>
/// vmess服务器信息
/// </summary>
public List<VmessItem> vmess { get; set; }
/// <summary>
/// 允许Mux多路复用
/// </summary>
public bool muxEnabled { get; set; }
/// <summary>
/// 域名解析策略
/// </summary>
public string domainStrategy { get; set; }
/// <summary>
/// 路由模式
/// </summary>
public string routingMode { get; set; }
/// <summary>
/// 用户自定义需代理的网址或ip
/// </summary>
public List<string> useragent { get; set; }
/// <summary>
/// 用户自定义直连的网址或ip
/// </summary>
public List<string> userdirect { get; set; }
/// <summary>
/// 用户自定义阻止的网址或ip
/// </summary>
public List<string> userblock { get; set; }
/// <summary>
/// KcpItem
/// </summary>
public KcpItem kcpItem { get; set; }
/// <summary>
/// 启用Http代理
/// </summary>
public bool sysAgentEnabled { get; set; }
/// <summary>
/// 监听状态 0-不改变 1-全局 2-PAC
/// </summary>
public int listenerType { get; set; }
/// <summary>
/// 自定义GFWList url
/// </summary>
public string urlGFWList { get; set; }
/// <summary>
/// 允许来自局域网的连接
/// </summary>
public bool allowLANConn { get; set; }
/// <summary>
/// 自定义远程DNS
/// </summary>
public string remoteDNS { get; set; }
/// <summary>
/// 订阅
/// </summary>
public List<SubItem> subItem { get; set; }
/// <summary>
/// UI
/// </summary>
public UIItem uiItem { get; set; }
#region
public string address()
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].address;
}
public int port()
{
if (index < 0)
{
return 10808;
}
return vmess[index].port;
}
public string id()
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].id;
}
public int alterId()
{
if (index < 0)
{
return 0;
}
return vmess[index].alterId;
}
public string security()
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].security;
}
public string remarks()
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].remarks;
}
public string network()
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].network))
{
return Global.DefaultNetwork;
}
return vmess[index].network;
}
public string headerType()
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].headerType))
{
return Global.None;
}
return vmess[index].headerType.Replace(" ", "").Trim();
}
public string requestHost()
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].requestHost))
{
return string.Empty;
}
return vmess[index].requestHost.Replace(" ", "").Trim();
}
public string path()
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].path))
{
return string.Empty;
}
return vmess[index].path.Replace(" ", "").Trim();
}
public string streamSecurity()
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].streamSecurity))
{
return string.Empty;
}
return vmess[index].streamSecurity;
}
public bool allowInsecure()
{
if (index < 0 || Utils.IsNullOrEmpty(vmess[index].allowInsecure))
{
return true;
}
return Convert.ToBoolean(vmess[index].allowInsecure);
}
public int GetLocalPort(string protocol)
{
int localPort = 0;
foreach (InItem inItem in inbound)
{
if (inItem.protocol.Equals(protocol))
{
localPort = inItem.localPort;
break;
}
}
return localPort;
}
public int configType()
{
if (index < 0)
{
return 0;
}
return vmess[index].configType;
}
public string getSummary()
{
if (index < 0)
{
return string.Empty;
}
return vmess[index].getSummary();
}
#endregion
}
[Serializable]
public class VmessItem
{
public VmessItem()
{
configVersion = 1;
address = string.Empty;
port = 0;
id = string.Empty;
alterId = 0;
security = string.Empty;
network = string.Empty;
remarks = string.Empty;
headerType = string.Empty;
requestHost = string.Empty;
path = string.Empty;
streamSecurity = string.Empty;
allowInsecure = string.Empty;
configType = (int)EConfigType.Vmess;
testResult = string.Empty;
subid = string.Empty;
}
public string getSummary()
{
string summary = string.Empty;
summary = string.Format("{0}-", ((EConfigType)configType).ToString());
string[] arrAddr = address.Split('.');
string addr = string.Empty;
if (arrAddr.Length > 2)
{
addr = $"{arrAddr[0]}***{arrAddr[arrAddr.Length - 1]}";
}
else if (arrAddr.Length > 1)
{
addr = $"***{arrAddr[arrAddr.Length - 1]}";
}
else
{
addr = address;
}
if (configType == (int)EConfigType.Vmess)
{
summary += string.Format("{0}({1}:{2})", remarks, addr, port);
}
else if (configType == (int)EConfigType.Shadowsocks)
{
summary += string.Format("{0}({1}:{2})", remarks, addr, port);
}
else if (configType == (int)EConfigType.Socks)
{
summary += string.Format("{0}({1}:{2})", remarks, addr, port);
}
else
{
summary += string.Format("{0}", remarks);
}
return summary;
}
public string getSubRemarks(Config config)
{
string subRemarks = string.Empty;
if (Utils.IsNullOrEmpty(subid))
{
return subRemarks;
}
foreach (SubItem sub in config.subItem)
{
if (sub.id.EndsWith(subid))
{
return sub.remarks;
}
}
if (subid.Length <= 4)
{
return subid;
}
return subid.Substring(0, 4);
}
/// <summary>
/// 版本(现在=2)
/// </summary>
public int configVersion { get; set; }
/// <summary>
/// 远程服务器地址
/// </summary>
public string address { get; set; }
/// <summary>
/// 远程服务器端口
/// </summary>
public int port { get; set; }
/// <summary>
/// 远程服务器ID
/// </summary>
public string id { get; set; }
/// <summary>
/// 远程服务器额外ID
/// </summary>
public int alterId { get; set; }
/// <summary>
/// 本地安全策略
/// </summary>
public string security { get; set; }
/// <summary>
/// tcp,kcp,ws
/// </summary>
public string network { get; set; }
/// <summary>
/// 备注或别名
/// </summary>
public string remarks { get; set; }
/// <summary>
/// 伪装类型
/// </summary>
public string headerType { get; set; }
/// <summary>
/// 伪装的域名
/// </summary>
public string requestHost { get; set; }
/// <summary>
/// ws h2 path
/// </summary>
public string path { get; set; }
/// <summary>
/// 底层传输安全
/// </summary>
public string streamSecurity { get; set; }
/// <summary>
/// 是否允许不安全连接(用于客户端)
/// </summary>
public string allowInsecure { get; set; }
/// <summary>
/// config type(1=normal,2=custom)
/// </summary>
public int configType { get; set; }
/// <summary>
///
/// </summary>
public string testResult { get; set; }
/// <summary>
/// SubItem id
/// </summary>
public string subid { get; set; }
}
[Serializable]
public class InItem
{
/// <summary>
/// 本地监听端口
/// </summary>
public int localPort { get; set; }
/// <summary>
/// 协议默认为socks
/// </summary>
public string protocol { get; set; }
/// <summary>
/// 允许udp
/// </summary>
public bool udpEnabled { get; set; }
/// <summary>
/// 开启流量探测
/// </summary>
public bool sniffingEnabled { get; set; } = true;
}
[Serializable]
public class KcpItem
{
/// <summary>
///
/// </summary>
public int mtu { get; set; }
/// <summary>
///
/// </summary>
public int tti { get; set; }
/// <summary>
///
/// </summary>
public int uplinkCapacity { get; set; }
/// <summary>
///
/// </summary>
public int downlinkCapacity { get; set; }
/// <summary>
///
/// </summary>
public bool congestion { get; set; }
/// <summary>
///
/// </summary>
public int readBufferSize { get; set; }
/// <summary>
///
/// </summary>
public int writeBufferSize { get; set; }
}
[Serializable]
public class SubItem
{
/// <summary>
///
/// </summary>
public string id { get; set; }
/// <summary>
/// 备注
/// </summary>
public string remarks { get; set; }
/// <summary>
/// url
/// </summary>
public string url { get; set; }
/// <summary>
/// enable
/// </summary>
public bool enabled { get; set; } = true;
}
[Serializable]
public class UIItem
{
/// <summary>
///
/// </summary>
public int mainQRCodeWidth { get; set; } = 600;
}
}

View file

@ -0,0 +1,11 @@

namespace v2rayN.Mode
{
public enum EConfigType
{
Vmess = 1,
Custom = 2,
Shadowsocks = 3,
Socks = 4
}
}

View file

@ -0,0 +1,11 @@

namespace v2rayN.Mode
{
public enum EMove
{
Top = 1,
Up = 2,
Down = 3,
Bottom = 4
}
}

View file

@ -0,0 +1,21 @@

namespace v2rayN.Mode
{
class SysproxyConfig
{
public bool UserSettingsRecorded;
public string Flags;
public string ProxyServer;
public string BypassList;
public string PacUrl;
public SysproxyConfig()
{
UserSettingsRecorded = false;
Flags = "1";
ProxyServer = "";
BypassList = "";
PacUrl = "";
}
}
}

View file

@ -0,0 +1,455 @@
using System.Collections.Generic;
namespace v2rayN.Mode
{
/// <summary>
/// v2ray配置文件实体类
/// 例子SampleConfig.txt
/// </summary>
public class V2rayConfig
{
/// <summary>
/// 日志配置
/// </summary>
public Log log { get; set; }
/// <summary>
/// 传入连接配置
/// </summary>
public List<Inbounds> inbounds { get; set; }
/// <summary>
/// 传出连接配置
/// </summary>
public List<Outbounds> outbounds { get; set; }
/// <summary>
/// DNS 配置
/// </summary>
public Dns dns { get; set; }
/// <summary>
/// 路由配置
/// </summary>
public Routing routing { get; set; }
}
public class Log
{
/// <summary>
///
/// </summary>
public string access { get; set; }
/// <summary>
///
/// </summary>
public string error { get; set; }
/// <summary>
///
/// </summary>
public string loglevel { get; set; }
}
public class Inbounds
{
/// <summary>
///
/// </summary>
public int port { get; set; }
/// <summary>
///
/// </summary>
public string listen { get; set; }
/// <summary>
///
/// </summary>
public string protocol { get; set; }
/// <summary>
///
/// </summary>
public Sniffing sniffing { get; set; }
/// <summary>
///
/// </summary>
public Inboundsettings settings { get; set; }
/// <summary>
///
/// </summary>
public StreamSettings streamSettings { get; set; }
}
public class Inboundsettings
{
/// <summary>
///
/// </summary>
public string auth { get; set; }
/// <summary>
///
/// </summary>
public bool udp { get; set; }
/// <summary>
///
/// </summary>
public string ip { get; set; }
/// <summary>
///
/// </summary>
public List<UsersItem> clients { get; set; }
}
public class UsersItem
{
/// <summary>
///
/// </summary>
public string id { get; set; }
/// <summary>
///
/// </summary>
public int alterId { get; set; }
/// <summary>
///
/// </summary>
public string email { get; set; }
/// <summary>
///
/// </summary>
public string security { get; set; }
}
public class Sniffing
{
/// <summary>
///
/// </summary>
public bool enabled { get; set; }
/// <summary>
///
/// </summary>
public List<string> destOverride { get; set; }
}
public class Outbounds
{
/// <summary>
/// 默认值agentout
/// </summary>
public string tag { get; set; }
/// <summary>
///
/// </summary>
public string protocol { get; set; }
/// <summary>
///
/// </summary>
public Outboundsettings settings { get; set; }
/// <summary>
///
/// </summary>
public StreamSettings streamSettings { get; set; }
/// <summary>
///
/// </summary>
public Mux mux { get; set; }
}
public class Outboundsettings
{
/// <summary>
///
/// </summary>
public List<VnextItem> vnext { get; set; }
/// <summary>
///
/// </summary>
public List<ServersItem> servers { get; set; }
/// <summary>
///
/// </summary>
public Response response { get; set; }
}
public class VnextItem
{
/// <summary>
///
/// </summary>
public string address { get; set; }
/// <summary>
///
/// </summary>
public int port { get; set; }
/// <summary>
///
/// </summary>
public List<UsersItem> users { get; set; }
}
public class ServersItem
{
/// <summary>
///
/// </summary>
public string email { get; set; }
/// <summary>
///
/// </summary>
public string address { get; set; }
/// <summary>
///
/// </summary>
public string method { get; set; }
/// <summary>
///
/// </summary>
public bool ota { get; set; }
/// <summary>
///
/// </summary>
public string password { get; set; }
/// <summary>
///
/// </summary>
public int port { get; set; }
/// <summary>
///
/// </summary>
public int level { get; set; }
}
public class Mux
{
/// <summary>
///
/// </summary>
public bool enabled { get; set; }
}
public class Response
{
/// <summary>
///
/// </summary>
public string type { get; set; }
}
public class Dns
{
/// <summary>
///
/// </summary>
public List<string> servers { get; set; }
}
public class RulesItem
{
/// <summary>
///
/// </summary>
public string type { get; set; }
/// <summary>
///
/// </summary>
public string port { get; set; }
/// <summary>
///
/// </summary>
public string outboundTag { get; set; }
/// <summary>
///
/// </summary>
public List<string> ip { get; set; }
/// <summary>
///
/// </summary>
public List<string> domain { get; set; }
}
public class Routing
{
/// <summary>
///
/// </summary>
public string domainStrategy { get; set; }
/// <summary>
///
/// </summary>
public List<RulesItem> rules { get; set; }
}
public class StreamSettings
{
/// <summary>
///
/// </summary>
public string network { get; set; }
/// <summary>
///
/// </summary>
public string security { get; set; }
/// <summary>
///
/// </summary>
public TlsSettings tlsSettings { get; set; }
/// <summary>
/// Tcp传输额外设置
/// </summary>
public TcpSettings tcpSettings { get; set; }
/// <summary>
/// Kcp传输额外设置
/// </summary>
public KcpSettings kcpSettings { get; set; }
/// <summary>
/// ws传输额外设置
/// </summary>
public WsSettings wsSettings { get; set; }
/// <summary>
/// h2传输额外设置
/// </summary>
public HttpSettings httpSettings { get; set; }
/// <summary>
/// QUIC
/// </summary>
public QuicSettings quicSettings { get; set; }
}
public class TlsSettings
{
/// <summary>
/// 是否允许不安全连接(用于客户端)
/// </summary>
public bool allowInsecure { get; set; }
/// <summary>
///
/// </summary>
public string serverName { get; set; }
}
public class TcpSettings
{
/// <summary>
/// 是否重用 TCP 连接
/// </summary>
public bool connectionReuse { get; set; }
/// <summary>
/// 数据包头部伪装设置
/// </summary>
public Header header { get; set; }
}
public class Header
{
/// <summary>
/// 伪装
/// </summary>
public string type { get; set; }
/// <summary>
/// 结构复杂,直接存起来
/// </summary>
public object request { get; set; }
/// <summary>
/// 结构复杂,直接存起来
/// </summary>
public object response { get; set; }
}
public class KcpSettings
{
/// <summary>
///
/// </summary>
public int mtu { get; set; }
/// <summary>
///
/// </summary>
public int tti { get; set; }
/// <summary>
///
/// </summary>
public int uplinkCapacity { get; set; }
/// <summary>
///
/// </summary>
public int downlinkCapacity { get; set; }
/// <summary>
///
/// </summary>
public bool congestion { get; set; }
/// <summary>
///
/// </summary>
public int readBufferSize { get; set; }
/// <summary>
///
/// </summary>
public int writeBufferSize { get; set; }
/// <summary>
///
/// </summary>
public Header header { get; set; }
}
public class WsSettings
{
/// <summary>
///
/// </summary>
public bool connectionReuse { get; set; }
/// <summary>
///
/// </summary>
public string path { get; set; }
/// <summary>
///
/// </summary>
public Headers headers { get; set; }
}
public class Headers
{
/// <summary>
///
/// </summary>
public string Host { get; set; }
}
public class HttpSettings
{
/// <summary>
///
/// </summary>
public string path { get; set; }
/// <summary>
///
/// </summary>
public List<string> host { get; set; }
}
public class QuicSettings
{
/// <summary>
///
/// </summary>
public string security { get; set; }
/// <summary>
///
/// </summary>
public string key { get; set; }
/// <summary>
///
/// </summary>
public Header header { get; set; }
}
}

View file

@ -0,0 +1,25 @@
using System.Collections.Generic;
namespace v2rayN.Mode
{
/// <summary>
/// Tcp伪装http的Request只要Host
/// </summary>
public class V2rayTcpRequest
{
/// <summary>
///
/// </summary>
public RequestHeaders headers { get; set; }
}
public class RequestHeaders
{
/// <summary>
///
/// </summary>
public List<string> Host { get; set; }
}
}

View file

@ -0,0 +1,53 @@
using System;
namespace v2rayN.Mode
{
[Serializable]
class VmessQRCode
{
/// <summary>
/// 版本
/// </summary>
public string v { get; set; }
/// <summary>
/// 备注
/// </summary>
public string ps { get; set; }
/// <summary>
/// 远程服务器地址
/// </summary>
public string add { get; set; }
/// <summary>
/// 远程服务器端口
/// </summary>
public string port { get; set; }
/// <summary>
/// 远程服务器ID
/// </summary>
public string id { get; set; }
/// <summary>
/// 远程服务器额外ID
/// </summary>
public string aid { get; set; }
/// <summary>
/// 传输协议tcp,kcp,ws
/// </summary>
public string net { get; set; }
/// <summary>
/// 伪装类型
/// </summary>
public string type { get; set; }
/// <summary>
/// 伪装的域名
/// </summary>
public string host { get; set; }
/// <summary>
/// path
/// </summary>
public string path { get; set; }
/// <summary>
/// 底层传输安全
/// </summary>
public string tls { get; set; }
}
}

Binary file not shown.

103
v2rayN/v2rayN/Program.cs Normal file
View file

@ -0,0 +1,103 @@
using System;
using System.Diagnostics;
using System.Reflection;
using System.Windows.Forms;
using v2rayN.Forms;
namespace v2rayN
{
static class Program
{
[System.Runtime.InteropServices.DllImport("user32.dll")]
private static extern bool SetProcessDPIAware();
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
if (Environment.OSVersion.Version.Major >= 6)
{
SetProcessDPIAware();
}
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
Process instance = RunningInstance();
if (instance == null)
{
Utils.SaveLog("v2rayN start up");
//设置语言环境
string lang = Utils.RegReadValue(Global.MyRegPath, Global.MyRegKeyLanguage, "zh-Hans");
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(lang);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
else
{
UI.Show("v2rayN is already running(v2rayN已经运行)");
}
}
private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
try
{
string resourceName = "v2rayN." + new AssemblyName(args.Name).Name + ".dll";
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
{
if (stream == null)
{
return null;
}
byte[] assemblyData = new byte[stream.Length];
stream.Read(assemblyData, 0, assemblyData.Length);
return Assembly.Load(assemblyData);
}
}
catch
{
return null;
}
}
/// <summary>
/// 获取正在运行的实例没有运行的实例返回null;
/// </summary>
public static Process RunningInstance()
{
Process current = Process.GetCurrentProcess();
Process[] processes = Process.GetProcessesByName(current.ProcessName);
foreach (Process process in processes)
{
if (process.Id != current.Id)
{
if (Assembly.GetExecutingAssembly().Location.Replace("/", "\\") == process.MainModule.FileName)
{
return process;
}
}
}
return null;
}
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
{
Utils.SaveLog("Application_ThreadException", e.Exception);
}
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Utils.SaveLog("CurrentDomain_UnhandledException", (Exception)e.ExceptionObject);
}
}
}

View file

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("v2rayN")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("v2rayN")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 使此程序集中的类型
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
// 则将该类型上的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("72d9f089-5e7a-4c5f-be0a-8a211536b483")]
// 程序集的版本信息由下面四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
//[assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("2.30")]

View file

@ -0,0 +1,229 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace v2rayN.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("v2rayN.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap about {
get {
object obj = ResourceManager.GetObject("about", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Byte[] 类型的本地化资源。
/// </summary>
internal static byte[] abp_js {
get {
object obj = ResourceManager.GetObject("abp_js", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap checkupdate {
get {
object obj = ResourceManager.GetObject("checkupdate", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap help {
get {
object obj = ResourceManager.GetObject("help", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Byte[] 类型的本地化资源。
/// </summary>
internal static byte[] mgwz_dll {
get {
object obj = ResourceManager.GetObject("mgwz_dll", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap minimize {
get {
object obj = ResourceManager.GetObject("minimize", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap option {
get {
object obj = ResourceManager.GetObject("option", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Byte[] 类型的本地化资源。
/// </summary>
internal static byte[] pac_txt {
get {
object obj = ResourceManager.GetObject("pac_txt", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// 查找类似 listen-address __PRIVOXY_BIND_IP__:__PRIVOXY_BIND_PORT__
///toggle 0
///logfile v2ray_privoxy.log
///show-on-task-bar 0
///activity-animation 0
///forward-socks5 / 127.0.0.1:__SOCKS_PORT__ .
///hide-console
/// 的本地化字符串。
/// </summary>
internal static string privoxy_conf {
get {
return ResourceManager.GetString("privoxy_conf", resourceCulture);
}
}
/// <summary>
/// 查找 System.Byte[] 类型的本地化资源。
/// </summary>
internal static byte[] privoxy_exe {
get {
object obj = ResourceManager.GetObject("privoxy_exe", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap promotion {
get {
object obj = ResourceManager.GetObject("promotion", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap restart {
get {
object obj = ResourceManager.GetObject("restart", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap server {
get {
object obj = ResourceManager.GetObject("server", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap sub {
get {
object obj = ResourceManager.GetObject("sub", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Byte[] 类型的本地化资源。
/// </summary>
internal static byte[] sysproxy_exe {
get {
object obj = ResourceManager.GetObject("sysproxy_exe", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// 查找 System.Byte[] 类型的本地化资源。
/// </summary>
internal static byte[] sysproxy64_exe {
get {
object obj = ResourceManager.GetObject("sysproxy64_exe", resourceCulture);
return ((byte[])(obj));
}
}
}
}

View file

@ -0,0 +1,169 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="about" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\about.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="abp_js" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\abp.js.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="checkupdate" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\checkupdate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="help" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="mgwz_dll" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\mgwz.dll.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="minimize" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\minimize.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="option" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\option.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pac_txt" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\pac.txt.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="privoxy_conf" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\privoxy_conf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312</value>
</data>
<data name="privoxy_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\privoxy.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="promotion" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\promotion.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="restart" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\restart.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="server" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\server.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="sub" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\sub.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="sysproxy64_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\sysproxy64.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="sysproxy_exe" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\sysproxy.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View file

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace v2rayN.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View file

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 747 B

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,7 @@
listen-address __PRIVOXY_BIND_IP__:__PRIVOXY_BIND_PORT__
toggle 0
logfile v2ray_privoxy.log
show-on-task-bar 0
activity-animation 0
forward-socks5 / 127.0.0.1:__SOCKS_PORT__ .
hide-console

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

Binary file not shown.

667
v2rayN/v2rayN/Resx/ResUI.Designer.cs generated Normal file
View file

@ -0,0 +1,667 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace v2rayN.Resx {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class ResUI {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal ResUI() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("v2rayN.Resx.ResUI", typeof(ResUI).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 使用此强类型资源类,为所有资源查找
/// 重写当前线程的 CurrentUICulture 属性。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// 查找类似 Batch export subscription to clipboard successfully 的本地化字符串。
/// </summary>
internal static string BatchExportSubscriptionSuccessfully {
get {
return ResourceManager.GetString("BatchExportSubscriptionSuccessfully", resourceCulture);
}
}
/// <summary>
/// 查找类似 Batch export share URL to clipboard successfully 的本地化字符串。
/// </summary>
internal static string BatchExportURLSuccessfully {
get {
return ResourceManager.GetString("BatchExportURLSuccessfully", resourceCulture);
}
}
/// <summary>
/// 查找类似 Please check the server settings first 的本地化字符串。
/// </summary>
internal static string CheckServerSettings {
get {
return ResourceManager.GetString("CheckServerSettings", resourceCulture);
}
}
/// <summary>
/// 查找类似 configuration format is incorrect 的本地化字符串。
/// </summary>
internal static string ConfigurationFormatIncorrect {
get {
return ResourceManager.GetString("ConfigurationFormatIncorrect", resourceCulture);
}
}
/// <summary>
/// 查找类似 Note that custom configuration relies entirely on your own configuration and does not work with all settings. The system agent is available when the socks port is equal to the port in the settings in the custom configuration inbound. 的本地化字符串。
/// </summary>
internal static string CustomServerTips {
get {
return ResourceManager.GetString("CustomServerTips", resourceCulture);
}
}
/// <summary>
/// 查找类似 Whether to download? {0} 的本地化字符串。
/// </summary>
internal static string DownloadYesNo {
get {
return ResourceManager.GetString("DownloadYesNo", resourceCulture);
}
}
/// <summary>
/// 查找类似 Failed to convert configuration file 的本地化字符串。
/// </summary>
internal static string FailedConversionConfiguration {
get {
return ResourceManager.GetString("FailedConversionConfiguration", resourceCulture);
}
}
/// <summary>
/// 查找类似 Failed to generate default configuration file 的本地化字符串。
/// </summary>
internal static string FailedGenDefaultConfiguration {
get {
return ResourceManager.GetString("FailedGenDefaultConfiguration", resourceCulture);
}
}
/// <summary>
/// 查找类似 Failed to get the default configuration 的本地化字符串。
/// </summary>
internal static string FailedGetDefaultConfiguration {
get {
return ResourceManager.GetString("FailedGetDefaultConfiguration", resourceCulture);
}
}
/// <summary>
/// 查找类似 Failed to import custom configuration server 的本地化字符串。
/// </summary>
internal static string FailedImportedCustomServer {
get {
return ResourceManager.GetString("FailedImportedCustomServer", resourceCulture);
}
}
/// <summary>
/// 查找类似 Failed to read configuration file 的本地化字符串。
/// </summary>
internal static string FailedReadConfiguration {
get {
return ResourceManager.GetString("FailedReadConfiguration", resourceCulture);
}
}
/// <summary>
/// 查找类似 Please fill in the correct format extra ID 的本地化字符串。
/// </summary>
internal static string FillCorrectAlterId {
get {
return ResourceManager.GetString("FillCorrectAlterId", resourceCulture);
}
}
/// <summary>
/// 查找类似 Please fill in the correct format server port 的本地化字符串。
/// </summary>
internal static string FillCorrectServerPort {
get {
return ResourceManager.GetString("FillCorrectServerPort", resourceCulture);
}
}
/// <summary>
/// 查找类似 Please fill in the KCP parameters correctly 的本地化字符串。
/// </summary>
internal static string FillKcpParameters {
get {
return ResourceManager.GetString("FillKcpParameters", resourceCulture);
}
}
/// <summary>
/// 查找类似 Please fill in the local listening port 的本地化字符串。
/// </summary>
internal static string FillLocalListeningPort {
get {
return ResourceManager.GetString("FillLocalListeningPort", resourceCulture);
}
}
/// <summary>
/// 查找类似 Please fill in the password 的本地化字符串。
/// </summary>
internal static string FillPassword {
get {
return ResourceManager.GetString("FillPassword", resourceCulture);
}
}
/// <summary>
/// 查找类似 Please fill in the server address 的本地化字符串。
/// </summary>
internal static string FillServerAddress {
get {
return ResourceManager.GetString("FillServerAddress", resourceCulture);
}
}
/// <summary>
/// 查找类似 Please fill in the user ID 的本地化字符串。
/// </summary>
internal static string FillUUID {
get {
return ResourceManager.GetString("FillUUID", resourceCulture);
}
}
/// <summary>
/// 查找类似 is not the correct client configuration file, please check 的本地化字符串。
/// </summary>
internal static string IncorrectClientConfiguration {
get {
return ResourceManager.GetString("IncorrectClientConfiguration", resourceCulture);
}
}
/// <summary>
/// 查找类似 is not the correct configuration, please check 的本地化字符串。
/// </summary>
internal static string Incorrectconfiguration {
get {
return ResourceManager.GetString("Incorrectconfiguration", resourceCulture);
}
}
/// <summary>
/// 查找类似 is not the correct server configuration file, please check 的本地化字符串。
/// </summary>
internal static string IncorrectServerConfiguration {
get {
return ResourceManager.GetString("IncorrectServerConfiguration", resourceCulture);
}
}
/// <summary>
/// 查找类似 Initial Configuration 的本地化字符串。
/// </summary>
internal static string InitialConfiguration {
get {
return ResourceManager.GetString("InitialConfiguration", resourceCulture);
}
}
/// <summary>
/// 查找类似 Address 的本地化字符串。
/// </summary>
internal static string LvAddress {
get {
return ResourceManager.GetString("LvAddress", resourceCulture);
}
}
/// <summary>
/// 查找类似 Alias 的本地化字符串。
/// </summary>
internal static string LvAlias {
get {
return ResourceManager.GetString("LvAlias", resourceCulture);
}
}
/// <summary>
/// 查找类似 Security 的本地化字符串。
/// </summary>
internal static string LvEncryptionMethod {
get {
return ResourceManager.GetString("LvEncryptionMethod", resourceCulture);
}
}
/// <summary>
/// 查找类似 Port 的本地化字符串。
/// </summary>
internal static string LvPort {
get {
return ResourceManager.GetString("LvPort", resourceCulture);
}
}
/// <summary>
/// 查找类似 Type 的本地化字符串。
/// </summary>
internal static string LvServiceType {
get {
return ResourceManager.GetString("LvServiceType", resourceCulture);
}
}
/// <summary>
/// 查找类似 Subs 的本地化字符串。
/// </summary>
internal static string LvSubscription {
get {
return ResourceManager.GetString("LvSubscription", resourceCulture);
}
}
/// <summary>
/// 查找类似 Test Results 的本地化字符串。
/// </summary>
internal static string LvTestResults {
get {
return ResourceManager.GetString("LvTestResults", resourceCulture);
}
}
/// <summary>
/// 查找类似 Transport 的本地化字符串。
/// </summary>
internal static string LvTransportProtocol {
get {
return ResourceManager.GetString("LvTransportProtocol", resourceCulture);
}
}
/// <summary>
/// 查找类似 Clear original subscription content 的本地化字符串。
/// </summary>
internal static string MsgClearSubscription {
get {
return ResourceManager.GetString("MsgClearSubscription", resourceCulture);
}
}
/// <summary>
/// 查找类似 Download V2rayCore successfully 的本地化字符串。
/// </summary>
internal static string MsgDownloadV2rayCoreSuccessfully {
get {
return ResourceManager.GetString("MsgDownloadV2rayCoreSuccessfully", resourceCulture);
}
}
/// <summary>
/// 查找类似 Failed to import subscription content 的本地化字符串。
/// </summary>
internal static string MsgFailedImportSubscription {
get {
return ResourceManager.GetString("MsgFailedImportSubscription", resourceCulture);
}
}
/// <summary>
/// 查找类似 Get the subscription content successfully 的本地化字符串。
/// </summary>
internal static string MsgGetSubscriptionSuccessfully {
get {
return ResourceManager.GetString("MsgGetSubscriptionSuccessfully", resourceCulture);
}
}
/// <summary>
/// 查找类似 No valid subscriptions set 的本地化字符串。
/// </summary>
internal static string MsgNoValidSubscription {
get {
return ResourceManager.GetString("MsgNoValidSubscription", resourceCulture);
}
}
/// <summary>
/// 查找类似 PAC update failed 的本地化字符串。
/// </summary>
internal static string MsgPACUpdateFailed {
get {
return ResourceManager.GetString("MsgPACUpdateFailed", resourceCulture);
}
}
/// <summary>
/// 查找类似 PAC update succeeded 的本地化字符串。
/// </summary>
internal static string MsgPACUpdateSuccessfully {
get {
return ResourceManager.GetString("MsgPACUpdateSuccessfully", resourceCulture);
}
}
/// <summary>
/// 查找类似 Resolve V2rayCore successfully 的本地化字符串。
/// </summary>
internal static string MsgParsingV2rayCoreSuccessfully {
get {
return ResourceManager.GetString("MsgParsingV2rayCoreSuccessfully", resourceCulture);
}
}
/// <summary>
/// 查找类似 Simplify PAC Success 的本地化字符串。
/// </summary>
internal static string MsgSimplifyPAC {
get {
return ResourceManager.GetString("MsgSimplifyPAC", resourceCulture);
}
}
/// <summary>
/// 查找类似 Start getting subscriptions 的本地化字符串。
/// </summary>
internal static string MsgStartGettingSubscriptions {
get {
return ResourceManager.GetString("MsgStartGettingSubscriptions", resourceCulture);
}
}
/// <summary>
/// 查找类似 Start updating PAC... 的本地化字符串。
/// </summary>
internal static string MsgStartUpdatingPAC {
get {
return ResourceManager.GetString("MsgStartUpdatingPAC", resourceCulture);
}
}
/// <summary>
/// 查找类似 Start updating V2rayCore... 的本地化字符串。
/// </summary>
internal static string MsgStartUpdatingV2rayCore {
get {
return ResourceManager.GetString("MsgStartUpdatingV2rayCore", resourceCulture);
}
}
/// <summary>
/// 查找类似 Subscription content decoding failed (non-BASE64 code) 的本地化字符串。
/// </summary>
internal static string MsgSubscriptionDecodingFailed {
get {
return ResourceManager.GetString("MsgSubscriptionDecodingFailed", resourceCulture);
}
}
/// <summary>
/// 查找类似 is unpacking... 的本地化字符串。
/// </summary>
internal static string MsgUnpacking {
get {
return ResourceManager.GetString("MsgUnpacking", resourceCulture);
}
}
/// <summary>
/// 查找类似 Update subscription end 的本地化字符串。
/// </summary>
internal static string MsgUpdateSubscriptionEnd {
get {
return ResourceManager.GetString("MsgUpdateSubscriptionEnd", resourceCulture);
}
}
/// <summary>
/// 查找类似 Update subscription starts 的本地化字符串。
/// </summary>
internal static string MsgUpdateSubscriptionStart {
get {
return ResourceManager.GetString("MsgUpdateSubscriptionStart", resourceCulture);
}
}
/// <summary>
/// 查找类似 Update V2rayCore successfully 的本地化字符串。
/// </summary>
internal static string MsgUpdateV2rayCoreSuccessfully {
get {
return ResourceManager.GetString("MsgUpdateV2rayCoreSuccessfully", resourceCulture);
}
}
/// <summary>
/// 查找类似 Update V2rayCore successfully! Restarting service... 的本地化字符串。
/// </summary>
internal static string MsgUpdateV2rayCoreSuccessfullyMore {
get {
return ResourceManager.GetString("MsgUpdateV2rayCoreSuccessfullyMore", resourceCulture);
}
}
/// <summary>
/// 查找类似 This feature relies on the Http global proxy, please set it correctly first. 的本地化字符串。
/// </summary>
internal static string NeedHttpGlobalProxy {
get {
return ResourceManager.GetString("NeedHttpGlobalProxy", resourceCulture);
}
}
/// <summary>
/// 查找类似 Non-vmess or ss protocol 的本地化字符串。
/// </summary>
internal static string NonvmessOrssProtocol {
get {
return ResourceManager.GetString("NonvmessOrssProtocol", resourceCulture);
}
}
/// <summary>
/// 查找类似 non-Vmess service, this feature is invalid 的本地化字符串。
/// </summary>
internal static string NonVmessService {
get {
return ResourceManager.GetString("NonVmessService", resourceCulture);
}
}
/// <summary>
/// 查找类似 V2ray-core not found, download address: {0} 的本地化字符串。
/// </summary>
internal static string NotFoundCore {
get {
return ResourceManager.GetString("NotFoundCore", resourceCulture);
}
}
/// <summary>
/// 查找类似 Scan completed, no valid QR code found 的本地化字符串。
/// </summary>
internal static string NoValidQRcodeFound {
get {
return ResourceManager.GetString("NoValidQRcodeFound", resourceCulture);
}
}
/// <summary>
/// 查找类似 operation failed, please check retry 的本地化字符串。
/// </summary>
internal static string OperationFailed {
get {
return ResourceManager.GetString("OperationFailed", resourceCulture);
}
}
/// <summary>
/// 查找类似 Please Fill Remarks 的本地化字符串。
/// </summary>
internal static string PleaseFillRemarks {
get {
return ResourceManager.GetString("PleaseFillRemarks", resourceCulture);
}
}
/// <summary>
/// 查找类似 Please select the encryption method 的本地化字符串。
/// </summary>
internal static string PleaseSelectEncryption {
get {
return ResourceManager.GetString("PleaseSelectEncryption", resourceCulture);
}
}
/// <summary>
/// 查找类似 Please select an agreement 的本地化字符串。
/// </summary>
internal static string PleaseSelectProtocol {
get {
return ResourceManager.GetString("PleaseSelectProtocol", resourceCulture);
}
}
/// <summary>
/// 查找类似 Please select the server first 的本地化字符串。
/// </summary>
internal static string PleaseSelectServer {
get {
return ResourceManager.GetString("PleaseSelectServer", resourceCulture);
}
}
/// <summary>
/// 查找类似 Are you sure to remove the server? 的本地化字符串。
/// </summary>
internal static string RemoveServer {
get {
return ResourceManager.GetString("RemoveServer", resourceCulture);
}
}
/// <summary>
/// 查找类似 The client configuration file is saved at: {0} 的本地化字符串。
/// </summary>
internal static string SaveClientConfigurationIn {
get {
return ResourceManager.GetString("SaveClientConfigurationIn", resourceCulture);
}
}
/// <summary>
/// 查找类似 The server configuration file is saved at: {0} 的本地化字符串。
/// </summary>
internal static string SaveServerConfigurationIn {
get {
return ResourceManager.GetString("SaveServerConfigurationIn", resourceCulture);
}
}
/// <summary>
/// 查找类似 Note: After this function relies on the Http global proxy test, please manually adjust the Http global proxy and active node! 的本地化字符串。
/// </summary>
internal static string SpeedServerTips {
get {
return ResourceManager.GetString("SpeedServerTips", resourceCulture);
}
}
/// <summary>
/// 查找类似 Start service ({0})...... 的本地化字符串。
/// </summary>
internal static string StartService {
get {
return ResourceManager.GetString("StartService", resourceCulture);
}
}
/// <summary>
/// 查找类似 Successful configuration
///{0} 的本地化字符串。
/// </summary>
internal static string SuccessfulConfiguration {
get {
return ResourceManager.GetString("SuccessfulConfiguration", resourceCulture);
}
}
/// <summary>
/// 查找类似 Successfully imported custom configuration server 的本地化字符串。
/// </summary>
internal static string SuccessfullyImportedCustomServer {
get {
return ResourceManager.GetString("SuccessfullyImportedCustomServer", resourceCulture);
}
}
/// <summary>
/// 查找类似 Imported bulk URL from clipboard successfully 的本地化字符串。
/// </summary>
internal static string SuccessfullyImportedServerViaClipboard {
get {
return ResourceManager.GetString("SuccessfullyImportedServerViaClipboard", resourceCulture);
}
}
/// <summary>
/// 查找类似 Scan import URL successfully 的本地化字符串。
/// </summary>
internal static string SuccessfullyImportedServerViaScan {
get {
return ResourceManager.GetString("SuccessfullyImportedServerViaScan", resourceCulture);
}
}
}
}

View file

@ -0,0 +1,322 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="BatchExportSubscriptionSuccessfully" xml:space="preserve">
<value>Batch export subscription to clipboard successfully</value>
</data>
<data name="BatchExportURLSuccessfully" xml:space="preserve">
<value>Batch export share URL to clipboard successfully</value>
</data>
<data name="FailedImportedCustomServer" xml:space="preserve">
<value>Failed to import custom configuration server</value>
</data>
<data name="FillCorrectAlterId" xml:space="preserve">
<value>Please fill in the correct format extra ID</value>
</data>
<data name="FillCorrectServerPort" xml:space="preserve">
<value>Please fill in the correct format server port</value>
</data>
<data name="FillKcpParameters" xml:space="preserve">
<value>Please fill in the KCP parameters correctly</value>
</data>
<data name="FillLocalListeningPort" xml:space="preserve">
<value>Please fill in the local listening port</value>
</data>
<data name="FillPassword" xml:space="preserve">
<value>Please fill in the password</value>
</data>
<data name="FillServerAddress" xml:space="preserve">
<value>Please fill in the server address</value>
</data>
<data name="FillUUID" xml:space="preserve">
<value>Please fill in the user ID</value>
</data>
<data name="NeedHttpGlobalProxy" xml:space="preserve">
<value> This feature relies on the Http global proxy, please set it correctly first.</value>
</data>
<data name="NonVmessService" xml:space="preserve">
<value> non-Vmess service, this feature is invalid</value>
</data>
<data name="NoValidQRcodeFound" xml:space="preserve">
<value>Scan completed, no valid QR code found</value>
</data>
<data name="OperationFailed" xml:space="preserve">
<value> operation failed, please check retry</value>
</data>
<data name="PleaseFillRemarks" xml:space="preserve">
<value>Please Fill Remarks</value>
</data>
<data name="PleaseSelectEncryption" xml:space="preserve">
<value>Please select the encryption method</value>
</data>
<data name="PleaseSelectProtocol" xml:space="preserve">
<value>Please select an agreement</value>
</data>
<data name="PleaseSelectServer" xml:space="preserve">
<value>Please select the server first</value>
</data>
<data name="SuccessfullyImportedCustomServer" xml:space="preserve">
<value>Successfully imported custom configuration server</value>
</data>
<data name="SuccessfullyImportedServerViaClipboard" xml:space="preserve">
<value>Imported bulk URL from clipboard successfully</value>
</data>
<data name="CustomServerTips" xml:space="preserve">
<value>Note that custom configuration relies entirely on your own configuration and does not work with all settings. The system agent is available when the socks port is equal to the port in the settings in the custom configuration inbound.</value>
</data>
<data name="SaveClientConfigurationIn" xml:space="preserve">
<value>The client configuration file is saved at: {0}</value>
</data>
<data name="SaveServerConfigurationIn" xml:space="preserve">
<value>The server configuration file is saved at: {0}</value>
</data>
<data name="SpeedServerTips" xml:space="preserve">
<value>Note: After this function relies on the Http global proxy test, please manually adjust the Http global proxy and active node!</value>
</data>
<data name="SuccessfullyImportedServerViaScan" xml:space="preserve">
<value>Scan import URL successfully</value>
</data>
<data name="DownloadYesNo" xml:space="preserve">
<value>Whether to download? {0}</value>
</data>
<data name="RemoveServer" xml:space="preserve">
<value>Are you sure to remove the server?</value>
</data>
<data name="CheckServerSettings" xml:space="preserve">
<value>Please check the server settings first</value>
</data>
<data name="ConfigurationFormatIncorrect" xml:space="preserve">
<value> configuration format is incorrect</value>
</data>
<data name="FailedConversionConfiguration" xml:space="preserve">
<value>Failed to convert configuration file</value>
</data>
<data name="FailedGenDefaultConfiguration" xml:space="preserve">
<value>Failed to generate default configuration file</value>
</data>
<data name="FailedGetDefaultConfiguration" xml:space="preserve">
<value> Failed to get the default configuration</value>
</data>
<data name="FailedReadConfiguration" xml:space="preserve">
<value>Failed to read configuration file</value>
</data>
<data name="IncorrectClientConfiguration" xml:space="preserve">
<value> is not the correct client configuration file, please check</value>
</data>
<data name="Incorrectconfiguration" xml:space="preserve">
<value> is not the correct configuration, please check</value>
</data>
<data name="IncorrectServerConfiguration" xml:space="preserve">
<value> is not the correct server configuration file, please check</value>
</data>
<data name="InitialConfiguration" xml:space="preserve">
<value>Initial Configuration</value>
</data>
<data name="NonvmessOrssProtocol" xml:space="preserve">
<value>Non-vmess or ss protocol</value>
</data>
<data name="SuccessfulConfiguration" xml:space="preserve">
<value>Successful configuration
{0}</value>
</data>
<data name="NotFoundCore" xml:space="preserve">
<value>V2ray-core not found, download address: {0}</value>
</data>
<data name="StartService" xml:space="preserve">
<value>Start service ({0})......</value>
</data>
<data name="LvAddress" xml:space="preserve">
<value>Address</value>
</data>
<data name="LvAlias" xml:space="preserve">
<value>Alias</value>
</data>
<data name="LvEncryptionMethod" xml:space="preserve">
<value>Security</value>
</data>
<data name="LvPort" xml:space="preserve">
<value>Port</value>
</data>
<data name="LvServiceType" xml:space="preserve">
<value>Type</value>
</data>
<data name="LvSubscription" xml:space="preserve">
<value>Subs</value>
</data>
<data name="LvTestResults" xml:space="preserve">
<value>Test Results</value>
</data>
<data name="LvTransportProtocol" xml:space="preserve">
<value>Transport</value>
</data>
<data name="MsgClearSubscription" xml:space="preserve">
<value>Clear original subscription content</value>
</data>
<data name="MsgDownloadV2rayCoreSuccessfully" xml:space="preserve">
<value>Download V2rayCore successfully</value>
</data>
<data name="MsgFailedImportSubscription" xml:space="preserve">
<value>Failed to import subscription content</value>
</data>
<data name="MsgGetSubscriptionSuccessfully" xml:space="preserve">
<value>Get the subscription content successfully</value>
</data>
<data name="MsgNoValidSubscription" xml:space="preserve">
<value>No valid subscriptions set</value>
</data>
<data name="MsgPACUpdateFailed" xml:space="preserve">
<value>PAC update failed</value>
</data>
<data name="MsgPACUpdateSuccessfully" xml:space="preserve">
<value>PAC update succeeded</value>
</data>
<data name="MsgParsingV2rayCoreSuccessfully" xml:space="preserve">
<value>Resolve V2rayCore successfully</value>
</data>
<data name="MsgSimplifyPAC" xml:space="preserve">
<value>Simplify PAC Success</value>
</data>
<data name="MsgStartGettingSubscriptions" xml:space="preserve">
<value>Start getting subscriptions</value>
</data>
<data name="MsgStartUpdatingPAC" xml:space="preserve">
<value>Start updating PAC...</value>
</data>
<data name="MsgStartUpdatingV2rayCore" xml:space="preserve">
<value>Start updating V2rayCore...</value>
</data>
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
<value>Subscription content decoding failed (non-BASE64 code)</value>
</data>
<data name="MsgUnpacking" xml:space="preserve">
<value>is unpacking...</value>
</data>
<data name="MsgUpdateSubscriptionEnd" xml:space="preserve">
<value>Update subscription end</value>
</data>
<data name="MsgUpdateSubscriptionStart" xml:space="preserve">
<value>Update subscription starts</value>
</data>
<data name="MsgUpdateV2rayCoreSuccessfully" xml:space="preserve">
<value>Update V2rayCore successfully</value>
</data>
<data name="MsgUpdateV2rayCoreSuccessfullyMore" xml:space="preserve">
<value>Update V2rayCore successfully! Restarting service...</value>
</data>
</root>

View file

View file

@ -0,0 +1,322 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="BatchExportSubscriptionSuccessfully" xml:space="preserve">
<value>批量导出订阅内容至剪贴板成功</value>
</data>
<data name="BatchExportURLSuccessfully" xml:space="preserve">
<value>批量导出分享URL至剪贴板成功</value>
</data>
<data name="FailedImportedCustomServer" xml:space="preserve">
<value>导入自定义配置服务器失败</value>
</data>
<data name="FillCorrectAlterId" xml:space="preserve">
<value>请填写正确格式额外ID</value>
</data>
<data name="FillCorrectServerPort" xml:space="preserve">
<value>请填写正确格式服务器端口</value>
</data>
<data name="FillKcpParameters" xml:space="preserve">
<value>请正确填写KCP参数</value>
</data>
<data name="FillLocalListeningPort" xml:space="preserve">
<value>请填写本地监听端口</value>
</data>
<data name="FillPassword" xml:space="preserve">
<value>请填写密码</value>
</data>
<data name="FillServerAddress" xml:space="preserve">
<value>请填写服务器地址</value>
</data>
<data name="FillUUID" xml:space="preserve">
<value>请填写用户ID</value>
</data>
<data name="NeedHttpGlobalProxy" xml:space="preserve">
<value>此功能依赖Http全局代理,请先设置正确。</value>
</data>
<data name="NonVmessService" xml:space="preserve">
<value>非Vmess服务此功能无效</value>
</data>
<data name="NoValidQRcodeFound" xml:space="preserve">
<value>扫描完成,未发现有效二维码</value>
</data>
<data name="OperationFailed" xml:space="preserve">
<value>操作失败,请检查重试</value>
</data>
<data name="PleaseFillRemarks" xml:space="preserve">
<value>请填写备注</value>
</data>
<data name="PleaseSelectEncryption" xml:space="preserve">
<value>请选择加密方式</value>
</data>
<data name="PleaseSelectProtocol" xml:space="preserve">
<value>请选择协议</value>
</data>
<data name="PleaseSelectServer" xml:space="preserve">
<value>请先选择服务器</value>
</data>
<data name="SuccessfullyImportedCustomServer" xml:space="preserve">
<value>成功导入自定义配置服务器</value>
</data>
<data name="SuccessfullyImportedServerViaClipboard" xml:space="preserve">
<value>从剪贴板导入批量URL成功</value>
</data>
<data name="CustomServerTips" xml:space="preserve">
<value>注意,自定义配置完全依赖您自己的配置不能使用所有设置功能。在自定义配置inbound中有socks port等于设置中的port时系统代理才可用</value>
</data>
<data name="SaveClientConfigurationIn" xml:space="preserve">
<value>客户端配置文件保存在:{0}</value>
</data>
<data name="SaveServerConfigurationIn" xml:space="preserve">
<value>服务端配置文件保存在:{0}</value>
</data>
<data name="SpeedServerTips" xml:space="preserve">
<value>注意此功能依赖Http全局代理!测试完成后,请手工调整Http全局代理和活动节点。</value>
</data>
<data name="SuccessfullyImportedServerViaScan" xml:space="preserve">
<value>扫描导入URL成功</value>
</data>
<data name="DownloadYesNo" xml:space="preserve">
<value>是否下载? {0}</value>
</data>
<data name="RemoveServer" xml:space="preserve">
<value>是否确定移除服务器?</value>
</data>
<data name="CheckServerSettings" xml:space="preserve">
<value>请先检查服务器设置</value>
</data>
<data name="ConfigurationFormatIncorrect" xml:space="preserve">
<value>配置格式不正确</value>
</data>
<data name="FailedConversionConfiguration" xml:space="preserve">
<value>转换配置文件失败</value>
</data>
<data name="FailedGenDefaultConfiguration" xml:space="preserve">
<value>生成默认配置文件失败</value>
</data>
<data name="FailedGetDefaultConfiguration" xml:space="preserve">
<value>取得默认配置失败</value>
</data>
<data name="FailedReadConfiguration" xml:space="preserve">
<value>读取配置文件失败</value>
</data>
<data name="IncorrectClientConfiguration" xml:space="preserve">
<value>不是正确的客户端配置文件,请检查</value>
</data>
<data name="Incorrectconfiguration" xml:space="preserve">
<value>不是正确的配置,请检查</value>
</data>
<data name="IncorrectServerConfiguration" xml:space="preserve">
<value>不是正确的服务端配置文件,请检查</value>
</data>
<data name="InitialConfiguration" xml:space="preserve">
<value>初始化配置</value>
</data>
<data name="NonvmessOrssProtocol" xml:space="preserve">
<value>非vmess或ss协议</value>
</data>
<data name="SuccessfulConfiguration" xml:space="preserve">
<value>配置成功
{0}</value>
</data>
<data name="NotFoundCore" xml:space="preserve">
<value>未找到v2ray-core,下载地址:{0}</value>
</data>
<data name="StartService" xml:space="preserve">
<value>启动服务({0})......</value>
</data>
<data name="LvAddress" xml:space="preserve">
<value>地址</value>
</data>
<data name="LvAlias" xml:space="preserve">
<value>别名</value>
</data>
<data name="LvEncryptionMethod" xml:space="preserve">
<value>加密方式</value>
</data>
<data name="LvPort" xml:space="preserve">
<value>端口</value>
</data>
<data name="LvServiceType" xml:space="preserve">
<value>服务类型</value>
</data>
<data name="LvSubscription" xml:space="preserve">
<value>订阅</value>
</data>
<data name="LvTestResults" xml:space="preserve">
<value>测试结果</value>
</data>
<data name="LvTransportProtocol" xml:space="preserve">
<value>传输协议</value>
</data>
<data name="MsgClearSubscription" xml:space="preserve">
<value>清除原订阅内容</value>
</data>
<data name="MsgDownloadV2rayCoreSuccessfully" xml:space="preserve">
<value>下载V2rayCore成功</value>
</data>
<data name="MsgFailedImportSubscription" xml:space="preserve">
<value>导入订阅内容失败</value>
</data>
<data name="MsgGetSubscriptionSuccessfully" xml:space="preserve">
<value>获取订阅内容成功</value>
</data>
<data name="MsgNoValidSubscription" xml:space="preserve">
<value>未设置有效的订阅</value>
</data>
<data name="MsgPACUpdateFailed" xml:space="preserve">
<value>PAC更新失败</value>
</data>
<data name="MsgPACUpdateSuccessfully" xml:space="preserve">
<value>PAC更新成功</value>
</data>
<data name="MsgParsingV2rayCoreSuccessfully" xml:space="preserve">
<value>解析V2rayCore成功</value>
</data>
<data name="MsgSimplifyPAC" xml:space="preserve">
<value>简化PAC成功</value>
</data>
<data name="MsgStartGettingSubscriptions" xml:space="preserve">
<value>开始获取订阅内容</value>
</data>
<data name="MsgStartUpdatingPAC" xml:space="preserve">
<value>开始更新PAC...</value>
</data>
<data name="MsgStartUpdatingV2rayCore" xml:space="preserve">
<value>开始更新V2rayCore...</value>
</data>
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
<value>订阅内容解码失败(非BASE64码)</value>
</data>
<data name="MsgUnpacking" xml:space="preserve">
<value>正在解压......</value>
</data>
<data name="MsgUpdateSubscriptionEnd" xml:space="preserve">
<value>更新订阅结束</value>
</data>
<data name="MsgUpdateSubscriptionStart" xml:space="preserve">
<value>更新订阅开始</value>
</data>
<data name="MsgUpdateV2rayCoreSuccessfully" xml:space="preserve">
<value>更新V2rayCore成功</value>
</data>
<data name="MsgUpdateV2rayCoreSuccessfullyMore" xml:space="preserve">
<value>更新V2rayCore成功正在重启服务...</value>
</data>
</root>

BIN
v2rayN/v2rayN/Resx/Resx.zip Normal file

Binary file not shown.

View file

@ -0,0 +1,5 @@
var proxy = "__PROXY__";
function FindProxyForURL(url, host) {
return proxy;
}

View file

@ -0,0 +1,71 @@
{
"log": {
"access": "Vaccess.log",
"error": "Verror.log",
"loglevel": "warning"
},
"inbounds": [{
"port": 10808,
"protocol": "socks",
"listen": "127.0.0.1",
"settings": {
"auth": "noauth",
"udp": true
},
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
}
}],
"outbounds": [{
"tag": "proxy",
"protocol": "vmess",
"settings": {
"vnext": [{
"address": "v2ray.cool",
"port": 10086,
"users": [{
"id": "a3482e88-686a-4a58-8126-99c9df64b7bf",
"alterId": 64,
"security": "auto"
}]
}],
"servers": [{
"address": "v2ray.cool",
"method": "chacha20",
"ota": false,
"password": "123456",
"port": 10086,
"level": 1
}]
},
"streamSettings": {
"network": "tcp"
},
"mux": {
"enabled": false
}
},
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
},
{
"protocol": "blackhole",
"tag": "block",
"settings": {
"response": {
"type": "http"
}
}
}
],
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": []
}
}

Some files were not shown because too many files have changed in this diff Show more