Full Code of CGDF-Github/SSRR-Windows for AI

master fe8acb4de7be cached
171 files
1.7 MB
373.7k tokens
1750 symbols
1 requests
Download .txt
Showing preview only (1,781K chars total). Download the full file or copy to clipboard to get everything.
Repository: CGDF-Github/SSRR-Windows
Branch: master
Commit: fe8acb4de7be
Files: 171
Total size: 1.7 MB

Directory structure:
gitextract_vj9icqh0/

├── .github/
│   └── issue_template.md
├── .gitignore
├── CHANGES
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── appveyor.yml
├── packaging/
│   └── upload.sh
├── shadowsocks-csharp/
│   ├── 3rd/
│   │   ├── SimpleJson.cs
│   │   ├── opendns/
│   │   │   ├── DnsQuery.cs
│   │   │   ├── DnsResponse.cs
│   │   │   ├── Enum.cs
│   │   │   └── RR/
│   │   │       ├── Address.cs
│   │   │       ├── MX.cs
│   │   │       ├── ResourceRecord.cs
│   │   │       ├── ResourceRecordCollection.cs
│   │   │       └── SOA.cs
│   │   └── zxing/
│   │       ├── BarcodeFormat.cs
│   │       ├── BaseLuminanceSource.cs
│   │       ├── Binarizer.cs
│   │       ├── BinaryBitmap.cs
│   │       ├── BitmapLuminanceSource.cs
│   │       ├── DecodeHintType.cs
│   │       ├── EncodeHintType.cs
│   │       ├── LuminanceSource.cs
│   │       ├── Result.cs
│   │       ├── ResultMetadataType.cs
│   │       ├── ResultPoint.cs
│   │       ├── ResultPointCallback.cs
│   │       ├── WriterException.cs
│   │       ├── common/
│   │       │   ├── BitArray.cs
│   │       │   ├── BitMatrix.cs
│   │       │   ├── BitSource.cs
│   │       │   ├── DecoderResult.cs
│   │       │   ├── DefaultGridSampler.cs
│   │       │   ├── DetectorResult.cs
│   │       │   ├── GlobalHistogramBinarizer.cs
│   │       │   ├── GridSampler.cs
│   │       │   ├── HybridBinarizer.cs
│   │       │   ├── PerspectiveTransform.cs
│   │       │   ├── StringUtils.cs
│   │       │   ├── detector/
│   │       │   │   └── MathUtils.cs
│   │       │   └── reedsolomon/
│   │       │       ├── GenericGF.cs
│   │       │       ├── GenericGFPoly.cs
│   │       │       ├── ReedSolomonDecoder.cs
│   │       │       └── ReedSolomonEncoder.cs
│   │       └── qrcode/
│   │           ├── QRCodeReader.cs
│   │           ├── decoder/
│   │           │   ├── BitMatrixParser.cs
│   │           │   ├── DataBlock.cs
│   │           │   ├── DataMask.cs
│   │           │   ├── DecodedBitStreamParser.cs
│   │           │   ├── Decoder.cs
│   │           │   ├── ErrorCorrectionLevel.cs
│   │           │   ├── FormatInformation.cs
│   │           │   ├── Mode.cs
│   │           │   ├── QRCodeDecoderMetaData.cs
│   │           │   └── Version.cs
│   │           ├── detector/
│   │           │   ├── AlignmentPattern.cs
│   │           │   ├── AlignmentPatternFinder.cs
│   │           │   ├── Detector.cs
│   │           │   ├── FinderPattern.cs
│   │           │   ├── FinderPatternFinder.cs
│   │           │   └── FinderPatternInfo.cs
│   │           └── encoder/
│   │               ├── BlockPair.cs
│   │               ├── ByteMatrix.cs
│   │               ├── Encoder.cs
│   │               ├── MaskUtil.cs
│   │               ├── MatrixUtil.cs
│   │               └── QRCode.cs
│   ├── Controller/
│   │   ├── APIServer.cs
│   │   ├── AutoStartup.cs
│   │   ├── FileManager.cs
│   │   ├── GfwListUpdater.cs
│   │   ├── HttpPortForwarder.cs
│   │   ├── HttpProxy.cs
│   │   ├── HttpProxyRunner.cs
│   │   ├── I18N.cs
│   │   ├── Listener.cs
│   │   ├── Local.cs
│   │   ├── Logging.cs
│   │   ├── PACServer.cs
│   │   ├── ProxyAuth.cs
│   │   ├── ProxySocket.cs
│   │   ├── ShadowsocksController.cs
│   │   ├── Socks5Forwarder.cs
│   │   ├── SpeedTest.cs
│   │   ├── SystemProxy.cs
│   │   ├── UpdateChecker.cs
│   │   └── UpdateFreeNode.cs
│   ├── Data/
│   │   ├── cn.txt
│   │   ├── privoxy_conf.txt
│   │   ├── user-rule.txt
│   │   └── zh-tw.txt
│   ├── Encryption/
│   │   ├── EncryptorBase.cs
│   │   ├── EncryptorFactory.cs
│   │   ├── IEncryptor.cs
│   │   ├── IVEncryptor.cs
│   │   ├── Libcrypto.cs
│   │   ├── LibcryptoEncryptor.cs
│   │   ├── MbedTLS.cs
│   │   ├── MbedTLSEncryptor.cs
│   │   ├── RSA.cs
│   │   ├── Sodium.cs
│   │   └── SodiumEncryptor.cs
│   ├── Model/
│   │   ├── Configuration.cs
│   │   ├── Host.cs
│   │   ├── IPRangeSet.cs
│   │   ├── IPSegment.cs
│   │   ├── LRUCache.cs
│   │   ├── MinSearchTree.cs
│   │   ├── Server.cs
│   │   ├── ServerSelectStrategy.cs
│   │   └── ServerSpeedLog.cs
│   ├── Obfs/
│   │   ├── Auth.cs
│   │   ├── AuthAkarin.cs
│   │   ├── AuthChain.cs
│   │   ├── HttpSimpleObfs.cs
│   │   ├── IObfs.cs
│   │   ├── ObfsBase.cs
│   │   ├── ObfsFactory.cs
│   │   ├── Plain.cs
│   │   └── VerifySimpleObfs.cs
│   ├── Program.cs
│   ├── Properties/
│   │   ├── AssemblyInfo.cs
│   │   ├── Resources.Designer.cs
│   │   └── Resources.resx
│   ├── Util/
│   │   ├── Base64.cs
│   │   ├── CRC.cs
│   │   ├── EnvCheck.cs
│   │   ├── ServerName.cs
│   │   └── Util.cs
│   ├── View/
│   │   ├── ConfigForm.Designer.cs
│   │   ├── ConfigForm.cs
│   │   ├── ConfigForm.resx
│   │   ├── InputPassword.Designer.cs
│   │   ├── InputPassword.cs
│   │   ├── InputPassword.resx
│   │   ├── LogForm.Designer.cs
│   │   ├── LogForm.cs
│   │   ├── LogForm.resx
│   │   ├── MenuViewController.cs
│   │   ├── PortSettingsForm.Designer.cs
│   │   ├── PortSettingsForm.cs
│   │   ├── PortSettingsForm.resx
│   │   ├── QRCodeSplashForm.cs
│   │   ├── ResetPassword.Designer.cs
│   │   ├── ResetPassword.cs
│   │   ├── ResetPassword.resx
│   │   ├── ServerLogForm.Designer.cs
│   │   ├── ServerLogForm.cs
│   │   ├── ServerLogForm.resx
│   │   ├── SettingsForm.Designer.cs
│   │   ├── SettingsForm.cs
│   │   ├── SettingsForm.resx
│   │   ├── ShowTextForm.Designer.cs
│   │   ├── ShowTextForm.cs
│   │   ├── ShowTextForm.resx
│   │   ├── SubscribeForm.Designer.cs
│   │   ├── SubscribeForm.cs
│   │   └── SubscribeForm.resx
│   ├── app.config
│   ├── app.manifest
│   ├── shadowsocks-csharp-console.csproj
│   ├── shadowsocks-csharp.csproj
│   ├── shadowsocks-csharp4.0.csproj
│   └── ssr-win-4.0.xml
├── shadowsocks-csharp.sln
└── test/
    ├── Properties/
    │   └── AssemblyInfo.cs
    ├── ServerTest.cs
    ├── UnitTest.cs
    └── test.csproj

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/issue_template.md
================================================
本项目不再进行功能性更新,仅接受BUG反馈。

请谨慎斟酌自己的issue是否值得一提。

作者耐心很差,请勿提傻逼issue浪费作者时间。

傻逼issue会被lock,傻逼会被block。


================================================
FILE: .gitignore
================================================
Backup/
bin/
obj/
pub/
7zip*/
temp/
shadowsocks-csharp/shadowsocks-csharp.csproj.user
TestResults
*.suo
*.user
*.exe

/templates
.vs/


================================================
FILE: CHANGES
================================================
2.4 2015-07-11
- Support UDP relay
- Support online PAC
- Migrate update checker to GitHub releases
- Other fixes

2.3.1 2015-03-06
- Support user rule

2.3 2015-01-25
- Use the same port for every profile
- Use the same port for HTTP/Socks5/PAC
- Fix GFWList PAC compatibility issue with IE11
- Encourage users to report to GFWList when no update found
- Minor UI improvements

2.2.1 2015-01-18
- Fix QR Code compatibility

2.2 2015-01-14
- Support updating PAC from GFWList
- Support adding server by scanning QR Code
- Output timestamp in logs
- Minor fixes

2.1.6 2015-01-02
- Fix OPTIONS requests
- Improve logs

2.1.5 2014-12-25
- Fix QR Code compatibility with iOS
- Only left button will trigger double click on tray icon

2.1.4 2014-12-20
- Fix crash when remarks are too long

2.1.3 2014-12-20
- Add Chinese Language
- Fix some UI issues on Windows 8
- Fix some UI issues on high DPI screens
- Log bind error more friendly
- Stability issues

2.1.2 2014-12-14
- Fix sometimes Shadowsocks doesn't respond to requests

2.1.1 2014-12-14
- Add global proxy option

2.1 2014-12-12
- Add salsa20 and chacha20 support

2.0.11 2014-11-23
- Fix a crash
- Only switch the system proxy off if we have switched it on

2.0.10 2014-11-18
- Minor fixes
- Optimize code

2.0.9 2014-11-13
- Fix startup path
- Fix allowed port range for polipo

2.0.8 2014-11-12
- Fix data corruption
- Set proxy for PPPoE
- Auto Startup Option
- Support high DPI screens

2.0.7 2014-11-11
- Use OpenSSL for now

2.0.6 2014-11-10
- Minor bug fixes

2.0.5 2014-11-09
- Fix QRCode size
- Share over LAN option
- Log to temp path instead

2.0.4 2014-11-09
- Try to fix data corruption
- Remove all configuration except x86

2.0.3 2014-11-08
- Support QRCode generation
- Fix compatibility issues with some Chrome version

2.0.2 2014-11-08
- Add remarks
- Fix error when polipo is killed

2.0.1 2014-11-08
- Check already running

2.0 2014-11-08
- Initial release


================================================
FILE: CONTRIBUTING.md
================================================
How to Contribute
=================

Pull Requests
-------------

1. Pull requests are welcome.
2. Make sure to pass the unit tests. Write unit tests for new modules if
needed.

Issues
------

1. Nobody has reported any bugs but posted a lot of questions in the last
few months. So we're closing the issue tracker.


[Troubleshooting]: https://github.com/clowwindy/shadowsocks/wiki/Troubleshooting
[mailing lists]:   https://groups.google.com/forum/#!forum/shadowsocks


================================================
FILE: LICENSE
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 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.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  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.

  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.

  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.

  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.

  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.

  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.

  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.

  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.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "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.

  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.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  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.

  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.

  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.

  1. Source Code.

  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.

  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.

  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.

  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.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  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.

  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:

    {project}  Copyright (C) {year}  {fullname}
    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>.



================================================
FILE: README.md
================================================
ShadowsocksR for Windows
=======================

### 相关说明

当初本项目的目的是为了配合[ss-panel-v3-mod_Uim](https://github.com/Anankke/ss-panel-v3-mod_Uim)解决“\[SSR/SSRR\]无法使用TLS1.2的订阅链接”问题,并成为其内置的默认SSR客户端

同时应众多机场主要求,还在本项目中加入了“反全家桶机制”,过滤掉大部分(顽固的)小白。这部分坚决不放弃全家桶的小白,不属于[ss-panel-v3-mod_Uim](https://github.com/Anankke/ss-panel-v3-mod_Uim)的默认服务对象。(但是愿意服务这部分用户的机场主依然可以自行修改资源文件以向这部分用户提供服务)

`补充一点细节:本项目不提供.Net2.0版的exe也是为了趋向“过滤掉大部分(顽固的)小白”这一共同目标`

至此可以发现:本项目完全不打算吸引圈外人士使用。甚至,实际上,本项目强烈不建议圈外人士自行下载本客户端使用,以免引起不必要的蛋疼,除非真的真的真的很喜欢本客户端的设计和功能。同时,也强烈不建议各博客、wiki等文字媒体收录本项目——毕竟这并不是一个面向所有大众的项目

### 环境

.Net 4.5+

无\[360/2345/百度\]全家桶

\[360/2345/百度\]全家桶用户请使用[SSRR - Akkariiin](https://github.com/shadowsocksrr/shadowsocksr-csharp)

### 授权

GPLv3

Copyright © Akkariiin 2018. Forked from ShadowsocksR by BreakWa11


================================================
FILE: appveyor.yml
================================================
version: 1.0.{build}
image: Visual Studio 2015
environment:
  matrix:
    - platform: Any CPU
      configuration: Debug
    - platform: Any CPU
      configuration: Release
matrix:
  fast_finish: false
build:
  parallel: true
  verbosity: normal
artifacts:
- path: shadowsocks-csharp\bin\2.0\Release\ShadowsocksR.exe
  name: ShadowsocksR-dotnet2.0.exe
- path: shadowsocks-csharp\bin\4.0\Release\ShadowsocksR.exe
  name: ShadowsocksR-dotnet4.0.exe



================================================
FILE: packaging/upload.sh
================================================
#!/bin/bash

version=$1

rsync --progress -e ssh shadowsocks-csharp/bin/x86/Release/Shadowsocks-win-dotnet4.0-$1.zip frs.sourceforge.net:/home/frs/project/shadowsocksgui/dist/
rsync --progress -e ssh shadowsocks-csharp/bin/x86/Release/Shadowsocks-win-$1.zip frs.sourceforge.net:/home/frs/project/shadowsocksgui/dist/


================================================
FILE: shadowsocks-csharp/3rd/SimpleJson.cs
================================================
//-----------------------------------------------------------------------
// <copyright file="SimpleJson.cs" company="The Outercurve Foundation">
//    Copyright (c) 2011, The Outercurve Foundation.
//
//    Licensed under the MIT License (the "License");
//    you may not use this file except in compliance with the License.
//    You may obtain a copy of the License at
//      http://www.opensource.org/licenses/mit-license.php
//
//    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.
// </copyright>
// <author>Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me)</author>
// <website>https://github.com/facebook-csharp-sdk/simple-json</website>
//-----------------------------------------------------------------------

// VERSION:

// NOTE: uncomment the following line to make SimpleJson class internal.
//#define SIMPLE_JSON_INTERNAL

// NOTE: uncomment the following line to make JsonArray and JsonObject class internal.
//#define SIMPLE_JSON_OBJARRAYINTERNAL

// NOTE: uncomment the following line to enable dynamic support.
//#define SIMPLE_JSON_DYNAMIC

// NOTE: uncomment the following line to enable DataContract support.
//#define SIMPLE_JSON_DATACONTRACT

// NOTE: uncomment the following line to use Reflection.Emit (better performance) instead of method.invoke().
// don't enable ReflectionEmit for WinRT, Silverlight and WP7.
//#define SIMPLE_JSON_REFLECTIONEMIT

// NOTE: uncomment the following line if you are compiling under Window Metro style application/library.
// usually already defined in properties
//#define NETFX_CORE;

// original json parsing code from http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Drawing;
#if SIMPLE_JSON_DYNAMIC
using System.Dynamic;
#endif
using System.Globalization;
using System.Reflection;
#if SIMPLE_JSON_REFLECTIONEMIT
using System.Reflection.Emit;
#endif
#if SIMPLE_JSON_DATACONTRACT
using System.Runtime.Serialization;
#endif
using System.Text;
using SimpleJson.Reflection;

namespace SimpleJson
{
    #region JsonArray

    /// <summary>
    /// Represents the json array.
    /// </summary>
    [EditorBrowsable(EditorBrowsableState.Never)]
    [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
#if SIMPLE_JSON_OBJARRAYINTERNAL
    internal
#else
    public
#endif
 class JsonArray : List<object>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="JsonArray"/> class. 
        /// </summary>
        public JsonArray() { }

        /// <summary>
        /// Initializes a new instance of the <see cref="JsonArray"/> class. 
        /// </summary>
        /// <param name="capacity">The capacity of the json array.</param>
        public JsonArray(int capacity) : base(capacity) { }

        /// <summary>
        /// The json representation of the array.
        /// </summary>
        /// <returns>The json representation of the array.</returns>
        public override string ToString()
        {
            return SimpleJson.SerializeObject(this) ?? string.Empty;
        }
    }

    #endregion

    #region JsonObject

    /// <summary>
    /// Represents the json object.
    /// </summary>
    [EditorBrowsable(EditorBrowsableState.Never)]
    [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
#if SIMPLE_JSON_OBJARRAYINTERNAL
    internal
#else
    public
#endif
 class JsonObject :
#if SIMPLE_JSON_DYNAMIC
 DynamicObject,
#endif
 IDictionary<string, object>
    {
        /// <summary>
        /// The internal member dictionary.
        /// </summary>
        private readonly Dictionary<string, object> _members = new Dictionary<string, object>();

        /// <summary>
        /// Gets the <see cref="System.Object"/> at the specified index.
        /// </summary>
        /// <value></value>
        public object this[int index]
        {
            get { return GetAtIndex(_members, index); }
        }

        internal static object GetAtIndex(IDictionary<string, object> obj, int index)
        {
            if (obj == null)
                throw new ArgumentNullException("obj");

            if (index >= obj.Count)
                throw new ArgumentOutOfRangeException("index");

            int i = 0;
            foreach (KeyValuePair<string, object> o in obj)
                if (i++ == index) return o.Value;

            return null;
        }

        /// <summary>
        /// Adds the specified key.
        /// </summary>
        /// <param name="key">The key.</param>
        /// <param name="value">The value.</param>
        public void Add(string key, object value)
        {
            _members.Add(key, value);
        }

        /// <summary>
        /// Determines whether the specified key contains key.
        /// </summary>
        /// <param name="key">The key.</param>
        /// <returns>
        /// 	<c>true</c> if the specified key contains key; otherwise, <c>false</c>.
        /// </returns>
        public bool ContainsKey(string key)
        {
            return _members.ContainsKey(key);
        }

        /// <summary>
        /// Gets the keys.
        /// </summary>
        /// <value>The keys.</value>
        public ICollection<string> Keys
        {
            get { return _members.Keys; }
        }

        /// <summary>
        /// Removes the specified key.
        /// </summary>
        /// <param name="key">The key.</param>
        /// <returns></returns>
        public bool Remove(string key)
        {
            return _members.Remove(key);
        }

        /// <summary>
        /// Tries the get value.
        /// </summary>
        /// <param name="key">The key.</param>
        /// <param name="value">The value.</param>
        /// <returns></returns>
        public bool TryGetValue(string key, out object value)
        {
            return _members.TryGetValue(key, out value);
        }

        /// <summary>
        /// Gets the values.
        /// </summary>
        /// <value>The values.</value>
        public ICollection<object> Values
        {
            get { return _members.Values; }
        }

        /// <summary>
        /// Gets or sets the <see cref="System.Object"/> with the specified key.
        /// </summary>
        /// <value></value>
        public object this[string key]
        {
            get { return _members[key]; }
            set { _members[key] = value; }
        }

        /// <summary>
        /// Adds the specified item.
        /// </summary>
        /// <param name="item">The item.</param>
        public void Add(KeyValuePair<string, object> item)
        {
            _members.Add(item.Key, item.Value);
        }

        /// <summary>
        /// Clears this instance.
        /// </summary>
        public void Clear()
        {
            _members.Clear();
        }

        /// <summary>
        /// Determines whether [contains] [the specified item].
        /// </summary>
        /// <param name="item">The item.</param>
        /// <returns>
        /// 	<c>true</c> if [contains] [the specified item]; otherwise, <c>false</c>.
        /// </returns>
        public bool Contains(KeyValuePair<string, object> item)
        {
            return _members.ContainsKey(item.Key) && _members[item.Key] == item.Value;
        }

        /// <summary>
        /// Copies to.
        /// </summary>
        /// <param name="array">The array.</param>
        /// <param name="arrayIndex">Index of the array.</param>
        public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
        {
            int num = Count;
            foreach (KeyValuePair<string, object> kvp in this)
            {
                array[arrayIndex++] = kvp;

                if (--num <= 0)
                    return;
            }
        }

        /// <summary>
        /// Gets the count.
        /// </summary>
        /// <value>The count.</value>
        public int Count
        {
            get { return _members.Count; }
        }

        /// <summary>
        /// Gets a value indicating whether this instance is read only.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if this instance is read only; otherwise, <c>false</c>.
        /// </value>
        public bool IsReadOnly
        {
            get { return false; }
        }

        /// <summary>
        /// Removes the specified item.
        /// </summary>
        /// <param name="item">The item.</param>
        /// <returns></returns>
        public bool Remove(KeyValuePair<string, object> item)
        {
            return _members.Remove(item.Key);
        }

        /// <summary>
        /// Gets the enumerator.
        /// </summary>
        /// <returns></returns>
        public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
        {
            return _members.GetEnumerator();
        }

        /// <summary>
        /// Returns an enumerator that iterates through a collection.
        /// </summary>
        /// <returns>
        /// An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the collection.
        /// </returns>
        IEnumerator IEnumerable.GetEnumerator()
        {
            return _members.GetEnumerator();
        }

        /// <summary>
        /// Returns a json <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </summary>
        /// <returns>
        /// A json <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </returns>
        public override string ToString()
        {
            return SimpleJson.SerializeObject(this);
        }

#if SIMPLE_JSON_DYNAMIC
        /// <summary>
        /// Provides implementation for type conversion operations. Classes derived from the <see cref="T:System.Dynamic.DynamicObject"/> class can override this method to specify dynamic behavior for operations that convert an object from one type to another.
        /// </summary>
        /// <param name="binder">Provides information about the conversion operation. The binder.Type property provides the type to which the object must be converted. For example, for the statement (String)sampleObject in C# (CType(sampleObject, Type) in Visual Basic), where sampleObject is an instance of the class derived from the <see cref="T:System.Dynamic.DynamicObject"/> class, binder.Type returns the <see cref="T:System.String"/> type. The binder.Explicit property provides information about the kind of conversion that occurs. It returns true for explicit conversion and false for implicit conversion.</param>
        /// <param name="result">The result of the type conversion operation.</param>
        /// <returns>
        /// Alwasy returns true.
        /// </returns>
        public override bool TryConvert(ConvertBinder binder, out object result)
        {
            // <pex>
            if (binder == (ConvertBinder)null)
                throw new ArgumentNullException("binder");
            // </pex>
            Type targetType = binder.Type;

            if ((targetType == typeof(IEnumerable)) ||
                (targetType == typeof(IEnumerable<KeyValuePair<string, object>>)) ||
                (targetType == typeof(IDictionary<string, object>)) ||
#if NETFX_CORE
 (targetType == typeof(IDictionary<,>))
#else
 (targetType == typeof(IDictionary))
#endif
)
            {
                result = this;
                return true;
            }

            return base.TryConvert(binder, out result);
        }

        /// <summary>
        /// Provides the implementation for operations that delete an object member. This method is not intended for use in C# or Visual Basic.
        /// </summary>
        /// <param name="binder">Provides information about the deletion.</param>
        /// <returns>
        /// Alwasy returns true.
        /// </returns>
        public override bool TryDeleteMember(DeleteMemberBinder binder)
        {
            // <pex>
            if (binder == (DeleteMemberBinder)null)
                throw new ArgumentNullException("binder");
            // </pex>
            return _members.Remove(binder.Name);
        }

        /// <summary>
        /// Provides the implementation for operations that get a value by index. Classes derived from the <see cref="T:System.Dynamic.DynamicObject"/> class can override this method to specify dynamic behavior for indexing operations.
        /// </summary>
        /// <param name="binder">Provides information about the operation.</param>
        /// <param name="indexes">The indexes that are used in the operation. For example, for the sampleObject[3] operation in C# (sampleObject(3) in Visual Basic), where sampleObject is derived from the DynamicObject class, <paramref name="indexes"/> is equal to 3.</param>
        /// <param name="result">The result of the index operation.</param>
        /// <returns>
        /// Alwasy returns true.
        /// </returns>
        public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result)
        {
            if (indexes.Length == 1)
            {
                result = ((IDictionary<string, object>)this)[(string)indexes[0]];
                return true;
            }
            result = (object)null;
            return true;
        }

        /// <summary>
        /// Provides the implementation for operations that get member values. Classes derived from the <see cref="T:System.Dynamic.DynamicObject"/> class can override this method to specify dynamic behavior for operations such as getting a value for a property.
        /// </summary>
        /// <param name="binder">Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member on which the dynamic operation is performed. For example, for the Console.WriteLine(sampleObject.SampleProperty) statement, where sampleObject is an instance of the class derived from the <see cref="T:System.Dynamic.DynamicObject"/> class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive.</param>
        /// <param name="result">The result of the get operation. For example, if the method is called for a property, you can assign the property value to <paramref name="result"/>.</param>
        /// <returns>
        /// Alwasy returns true.
        /// </returns>
        public override bool TryGetMember(GetMemberBinder binder, out object result)
        {
            object value;
            if (_members.TryGetValue(binder.Name, out value))
            {
                result = value;
                return true;
            }
            result = (object)null;
            return true;
        }

        /// <summary>
        /// Provides the implementation for operations that set a value by index. Classes derived from the <see cref="T:System.Dynamic.DynamicObject"/> class can override this method to specify dynamic behavior for operations that access objects by a specified index.
        /// </summary>
        /// <param name="binder">Provides information about the operation.</param>
        /// <param name="indexes">The indexes that are used in the operation. For example, for the sampleObject[3] = 10 operation in C# (sampleObject(3) = 10 in Visual Basic), where sampleObject is derived from the <see cref="T:System.Dynamic.DynamicObject"/> class, <paramref name="indexes"/> is equal to 3.</param>
        /// <param name="value">The value to set to the object that has the specified index. For example, for the sampleObject[3] = 10 operation in C# (sampleObject(3) = 10 in Visual Basic), where sampleObject is derived from the <see cref="T:System.Dynamic.DynamicObject"/> class, <paramref name="value"/> is equal to 10.</param>
        /// <returns>
        /// true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown.
        /// </returns>
        public override bool TrySetIndex(SetIndexBinder binder, object[] indexes, object value)
        {
            if (indexes.Length == 1)
            {
                ((IDictionary<string, object>)this)[(string)indexes[0]] = value;
                return true;
            }

            return base.TrySetIndex(binder, indexes, value);
        }

        /// <summary>
        /// Provides the implementation for operations that set member values. Classes derived from the <see cref="T:System.Dynamic.DynamicObject"/> class can override this method to specify dynamic behavior for operations such as setting a value for a property.
        /// </summary>
        /// <param name="binder">Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member to which the value is being assigned. For example, for the statement sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the <see cref="T:System.Dynamic.DynamicObject"/> class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive.</param>
        /// <param name="value">The value to set to the member. For example, for sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the <see cref="T:System.Dynamic.DynamicObject"/> class, the <paramref name="value"/> is "Test".</param>
        /// <returns>
        /// true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown.)
        /// </returns>
        public override bool TrySetMember(SetMemberBinder binder, object value)
        {
            // <pex>
            if (binder == (SetMemberBinder)null)
                throw new ArgumentNullException("binder");
            // </pex>
            _members[binder.Name] = value;
            return true;
        }

        /// <summary>
        /// Returns the enumeration of all dynamic member names.
        /// </summary>
        /// <returns>
        /// A sequence that contains dynamic member names.
        /// </returns>
        public override IEnumerable<string> GetDynamicMemberNames()
        {
            foreach (var key in Keys)
                yield return key;
        }
#endif
    }

    #endregion
}

namespace SimpleJson
{
    #region JsonParser

    /// <summary>
    /// This class encodes and decodes JSON strings.
    /// Spec. details, see http://www.json.org/
    /// 
    /// JSON uses Arrays and Objects. These correspond here to the datatypes JsonArray(IList&lt;object>) and JsonObject(IDictionary&lt;string,object>).
    /// All numbers are parsed to doubles.
    /// </summary>
#if SIMPLE_JSON_INTERNAL
    internal
#else
    public
#endif
 class SimpleJson
    {
        private const int TOKEN_NONE = 0;
        private const int TOKEN_CURLY_OPEN = 1;
        private const int TOKEN_CURLY_CLOSE = 2;
        private const int TOKEN_SQUARED_OPEN = 3;
        private const int TOKEN_SQUARED_CLOSE = 4;
        private const int TOKEN_COLON = 5;
        private const int TOKEN_COMMA = 6;
        private const int TOKEN_STRING = 7;
        private const int TOKEN_NUMBER = 8;
        private const int TOKEN_TRUE = 9;
        private const int TOKEN_FALSE = 10;
        private const int TOKEN_NULL = 11;

        private const int BUILDER_CAPACITY = 2000;

        /// <summary>
        /// Parses the string json into a value
        /// </summary>
        /// <param name="json">A JSON string.</param>
        /// <returns>An IList&lt;object>, a IDictionary&lt;string,object>, a double, a string, null, true, or false</returns>
        public static object DeserializeObject(string json)
        {
            object @object;
            if (TryDeserializeObject(json, out @object))
                return @object;
            throw new System.Runtime.Serialization.SerializationException("Invalid JSON string");
        }

        /// <summary>
        /// Try parsing the json string into a value.
        /// </summary>
        /// <param name="json">
        /// A JSON string.
        /// </param>
        /// <param name="object">
        /// The object.
        /// </param>
        /// <returns>
        /// Returns true if successfull otherwise false.
        /// </returns>
        public static bool TryDeserializeObject(string json, out object @object)
        {
            bool success = true;
            if (json != null)
            {
                char[] charArray = json.ToCharArray();
                int index = 0;
                @object = ParseValue(charArray, ref index, ref success);
            }
            else
                @object = null;

            return success;
        }

        public static object DeserializeObject(string json, Type type, IJsonSerializerStrategy jsonSerializerStrategy)
        {
            object jsonObject = DeserializeObject(json);

            return type == null || jsonObject != null &&
#if NETFX_CORE
 jsonObject.GetType().GetTypeInfo().IsAssignableFrom(type.GetTypeInfo())
#else
 jsonObject.GetType().IsAssignableFrom(type)
#endif
 ? jsonObject
                       : (jsonSerializerStrategy ?? CurrentJsonSerializerStrategy).DeserializeObject(jsonObject, type);
        }

        public static object DeserializeObject(string json, Type type)
        {
            return DeserializeObject(json, type, null);
        }

        public static T DeserializeObject<T>(string json, IJsonSerializerStrategy jsonSerializerStrategy)
        {
            return (T)DeserializeObject(json, typeof(T), jsonSerializerStrategy);
        }

        public static T DeserializeObject<T>(string json)
        {
            return (T)DeserializeObject(json, typeof(T), null);
        }

        /// <summary>
        /// Converts a IDictionary&lt;string,object> / IList&lt;object> object into a JSON string
        /// </summary>
        /// <param name="json">A IDictionary&lt;string,object> / IList&lt;object></param>
        /// <param name="jsonSerializerStrategy">Serializer strategy to use</param>
        /// <returns>A JSON encoded string, or null if object 'json' is not serializable</returns>
        public static string SerializeObject(object json, IJsonSerializerStrategy jsonSerializerStrategy)
        {
            StringBuilder builder = new StringBuilder(BUILDER_CAPACITY);
            bool success = SerializeValue(jsonSerializerStrategy, json, builder);
            return (success ? builder.ToString() : null);
        }

        public static string SerializeObject(object json)
        {
            return SerializeObject(json, CurrentJsonSerializerStrategy);
        }

        protected static IDictionary<string, object> ParseObject(char[] json, ref int index, ref bool success)
        {
            IDictionary<string, object> table = new JsonObject();
            int token;

            // {
            NextToken(json, ref index);

            bool done = false;
            while (!done)
            {
                token = LookAhead(json, index);
                if (token == TOKEN_NONE)
                {
                    success = false;
                    return null;
                }
                else if (token == TOKEN_COMMA)
                    NextToken(json, ref index);
                else if (token == TOKEN_CURLY_CLOSE)
                {
                    NextToken(json, ref index);
                    return table;
                }
                else
                {
                    // name
                    string name = ParseString(json, ref index, ref success);
                    if (!success)
                    {
                        success = false;
                        return null;
                    }

                    // :
                    token = NextToken(json, ref index);
                    if (token != TOKEN_COLON)
                    {
                        success = false;
                        return null;
                    }

                    // value
                    object value = ParseValue(json, ref index, ref success);
                    if (!success)
                    {
                        success = false;
                        return null;
                    }

                    table[name] = value;
                }
            }

            return table;
        }

        protected static JsonArray ParseArray(char[] json, ref int index, ref bool success)
        {
            JsonArray array = new JsonArray();

            // [
            NextToken(json, ref index);

            bool done = false;
            while (!done)
            {
                int token = LookAhead(json, index);
                if (token == TOKEN_NONE)
                {
                    success = false;
                    return null;
                }
                else if (token == TOKEN_COMMA)
                    NextToken(json, ref index);
                else if (token == TOKEN_SQUARED_CLOSE)
                {
                    NextToken(json, ref index);
                    break;
                }
                else
                {
                    object value = ParseValue(json, ref index, ref success);
                    if (!success)
                        return null;
                    array.Add(value);
                }
            }

            return array;
        }

        protected static object ParseValue(char[] json, ref int index, ref bool success)
        {
            switch (LookAhead(json, index))
            {
                case TOKEN_STRING:
                    return ParseString(json, ref index, ref success);
                case TOKEN_NUMBER:
                    return ParseNumber(json, ref index, ref success);
                case TOKEN_CURLY_OPEN:
                    return ParseObject(json, ref index, ref success);
                case TOKEN_SQUARED_OPEN:
                    return ParseArray(json, ref index, ref success);
                case TOKEN_TRUE:
                    NextToken(json, ref index);
                    return true;
                case TOKEN_FALSE:
                    NextToken(json, ref index);
                    return false;
                case TOKEN_NULL:
                    NextToken(json, ref index);
                    return null;
                case TOKEN_NONE:
                    break;
            }

            success = false;
            return null;
        }

        protected static string ParseString(char[] json, ref int index, ref bool success)
        {
            StringBuilder s = new StringBuilder(BUILDER_CAPACITY);
            char c;

            EatWhitespace(json, ref index);

            // "
            c = json[index++];

            bool complete = false;
            while (!complete)
            {
                if (index == json.Length)
                {
                    break;
                }

                c = json[index++];
                if (c == '"')
                {
                    complete = true;
                    break;
                }
                else if (c == '\\')
                {
                    if (index == json.Length)
                        break;
                    c = json[index++];
                    if (c == '"')
                        s.Append('"');
                    else if (c == '\\')
                        s.Append('\\');
                    else if (c == '/')
                        s.Append('/');
                    else if (c == 'b')
                        s.Append('\b');
                    else if (c == 'f')
                        s.Append('\f');
                    else if (c == 'n')
                        s.Append('\n');
                    else if (c == 'r')
                        s.Append('\r');
                    else if (c == 't')
                        s.Append('\t');
                    else if (c == 'u')
                    {
                        int remainingLength = json.Length - index;
                        if (remainingLength >= 4)
                        {
                            // parse the 32 bit hex into an integer codepoint
                            uint codePoint;
                            if (
                                !(success =
                                  UInt32.TryParse(new string(json, index, 4), NumberStyles.HexNumber,
                                                  CultureInfo.InvariantCulture, out codePoint)))
                                return "";

                            // convert the integer codepoint to a unicode char and add to string

                            if (0xD800 <= codePoint && codePoint <= 0xDBFF)  // if high surrogate
                            {
                                index += 4; // skip 4 chars
                                remainingLength = json.Length - index;
                                if (remainingLength >= 6)
                                {
                                    uint lowCodePoint;
                                    if (new string(json, index, 2) == "\\u" &&
                                        UInt32.TryParse(new string(json, index + 2, 4), NumberStyles.HexNumber,
                                                        CultureInfo.InvariantCulture, out lowCodePoint))
                                    {
                                        if (0xDC00 <= lowCodePoint && lowCodePoint <= 0xDFFF)    // if low surrogate
                                        {
                                            s.Append((char)codePoint);
                                            s.Append((char)lowCodePoint);
                                            index += 6; // skip 6 chars
                                            continue;
                                        }
                                    }
                                }
                                success = false;    // invalid surrogate pair
                                return "";
                            }
#if SILVERLIGHT
                            s.Append(ConvertFromUtf32((int)codePoint));
#else
                            s.Append(Char.ConvertFromUtf32((int)codePoint));
#endif
                            // skip 4 chars
                            index += 4;
                        }
                        else
                            break;
                    }
                }
                else
                    s.Append(c);
            }

            if (!complete)
            {
                success = false;
                return null;
            }

            return s.ToString();
        }

#if SILVERLIGHT
        private static string ConvertFromUtf32(int utf32)
        {
            // http://www.java2s.com/Open-Source/CSharp/2.6.4-mono-.net-core/System/System/Char.cs.htm
            if (utf32 < 0 || utf32 > 0x10FFFF)
                throw new ArgumentOutOfRangeException("utf32", "The argument must be from 0 to 0x10FFFF.");
            if (0xD800 <= utf32 && utf32 <= 0xDFFF)
                throw new ArgumentOutOfRangeException("utf32", "The argument must not be in surrogate pair range.");
            if (utf32 < 0x10000)
                return new string((char)utf32, 1);
            utf32 -= 0x10000;
            return new string(new char[] {(char) ((utf32 >> 10) + 0xD800),(char) (utf32 % 0x0400 + 0xDC00)});
        }
#endif

        protected static object ParseNumber(char[] json, ref int index, ref bool success)
        {
            EatWhitespace(json, ref index);

            int lastIndex = GetLastIndexOfNumber(json, index);
            int charLength = (lastIndex - index) + 1;

            object returnNumber;
            string str = new string(json, index, charLength);
            if (str.IndexOf(".", StringComparison.OrdinalIgnoreCase) != -1 || str.IndexOf("e", StringComparison.OrdinalIgnoreCase) != -1)
            {
                double number;
                success = double.TryParse(new string(json, index, charLength), NumberStyles.Any, CultureInfo.InvariantCulture, out number);
                returnNumber = number;
            }
            else
            {
                long number;
                success = long.TryParse(new string(json, index, charLength), NumberStyles.Any, CultureInfo.InvariantCulture, out number);
                returnNumber = number;
            }

            index = lastIndex + 1;
            return returnNumber;
        }

        protected static int GetLastIndexOfNumber(char[] json, int index)
        {
            int lastIndex;

            for (lastIndex = index; lastIndex < json.Length; lastIndex++)
                if ("0123456789+-.eE".IndexOf(json[lastIndex]) == -1) break;
            return lastIndex - 1;
        }

        protected static void EatWhitespace(char[] json, ref int index)
        {
            for (; index < json.Length; index++)
                if (" \t\n\r\b\f".IndexOf(json[index]) == -1) break;
        }

        protected static int LookAhead(char[] json, int index)
        {
            int saveIndex = index;
            return NextToken(json, ref saveIndex);
        }

        [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
        protected static int NextToken(char[] json, ref int index)
        {
            EatWhitespace(json, ref index);

            if (index == json.Length)
                return TOKEN_NONE;

            char c = json[index];
            index++;
            switch (c)
            {
                case '{':
                    return TOKEN_CURLY_OPEN;
                case '}':
                    return TOKEN_CURLY_CLOSE;
                case '[':
                    return TOKEN_SQUARED_OPEN;
                case ']':
                    return TOKEN_SQUARED_CLOSE;
                case ',':
                    return TOKEN_COMMA;
                case '"':
                    return TOKEN_STRING;
                case '0':
                case '1':
                case '2':
                case '3':
                case '4':
                case '5':
                case '6':
                case '7':
                case '8':
                case '9':
                case '-':
                    return TOKEN_NUMBER;
                case ':':
                    return TOKEN_COLON;
            }
            index--;

            int remainingLength = json.Length - index;

            // false
            if (remainingLength >= 5)
            {
                if (json[index] == 'f' &&
                    json[index + 1] == 'a' &&
                    json[index + 2] == 'l' &&
                    json[index + 3] == 's' &&
                    json[index + 4] == 'e')
                {
                    index += 5;
                    return TOKEN_FALSE;
                }
            }

            // true
            if (remainingLength >= 4)
            {
                if (json[index] == 't' &&
                    json[index + 1] == 'r' &&
                    json[index + 2] == 'u' &&
                    json[index + 3] == 'e')
                {
                    index += 4;
                    return TOKEN_TRUE;
                }
            }

            // null
            if (remainingLength >= 4)
            {
                if (json[index] == 'n' &&
                    json[index + 1] == 'u' &&
                    json[index + 2] == 'l' &&
                    json[index + 3] == 'l')
                {
                    index += 4;
                    return TOKEN_NULL;
                }
            }

            return TOKEN_NONE;
        }

        protected static string GetIndentString(int indent)
        {
            string ret = "";
            for (int i = 0; i < indent; ++i)
            {
                ret += "\t";
            }
            return ret;
        }

        protected static bool SerializeValue(IJsonSerializerStrategy jsonSerializerStrategy, object value, StringBuilder builder, int indent = 1)
        {
            bool success = true;

            if (value is string)
                success = SerializeString((string)value, builder);
            else if (value is IDictionary<string, object>)
            {
                IDictionary<string, object> dict = (IDictionary<string, object>)value;
                success = SerializeObject(jsonSerializerStrategy, dict.Keys, dict.Values, builder, indent);
            }
            else if (value is IDictionary<string, string>)
            {
                IDictionary<string, string> dict = (IDictionary<string, string>)value;
                success = SerializeObject(jsonSerializerStrategy, dict.Keys, dict.Values, builder, indent);
            }
            else if (value != null && ReflectionUtils.IsTypeDictionary(value.GetType()))
            {
                IDictionary dict = (IDictionary)value;
                success = SerializeObject(jsonSerializerStrategy, dict.Keys, dict.Values, builder, indent);
            }
            else if (value is IEnumerable)
                success = SerializeArray(jsonSerializerStrategy, (IEnumerable)value, builder, indent);
            else if (IsNumeric(value))
                success = SerializeNumber(value, builder);
            else if (value is Boolean)
                builder.Append((bool)value ? "true" : "false");
            else if (value == null)
                builder.Append("null");
            else
            {
                object serializedObject;
                success = jsonSerializerStrategy.SerializeNonPrimitiveObject(value, out serializedObject);
                if (success)
                    SerializeValue(jsonSerializerStrategy, serializedObject, builder, indent);
            }

            return success;
        }

        protected static bool SerializeObject(IJsonSerializerStrategy jsonSerializerStrategy, IEnumerable keys, IEnumerable values, StringBuilder builder, int indent)
        {
            builder.Append("{\r\n");

            IEnumerator ke = keys.GetEnumerator();
            IEnumerator ve = values.GetEnumerator();

            bool first = true;
            while (ke.MoveNext() && ve.MoveNext())
            {
                object key = ke.Current;
                object value = ve.Current;

                if (!first)
                {
                    builder.Append(",\r\n");
                }

                if (key is string)
                {
                    builder.Append(GetIndentString(indent));
                    SerializeString((string)key, builder);
                }
                else
                    if (!SerializeValue(jsonSerializerStrategy, value, builder, indent + 1)) return false;

                builder.Append(" : ");
                if (!SerializeValue(jsonSerializerStrategy, value, builder, indent + 1))
                    return false;

                first = false;
            }

            builder.Append("\r\n");
            builder.Append(GetIndentString(indent - 1));
            builder.Append("}");
            return true;
        }

        protected static bool SerializeArray(IJsonSerializerStrategy jsonSerializerStrategy, IEnumerable anArray, StringBuilder builder, int indent)
        {
            builder.Append("[\r\n");

            bool first = true;
            foreach (object value in anArray)
            {
                if (!first)
                {
                    builder.Append(",\r\n");
                }

                builder.Append(GetIndentString(indent));
                if (!SerializeValue(jsonSerializerStrategy, value, builder, indent + 1))
                    return false;

                first = false;
            }

            builder.Append("\r\n");
            builder.Append(GetIndentString(indent - 1));
            builder.Append("]");
            return true;
        }

        protected static bool SerializeString(string aString, StringBuilder builder)
        {
            builder.Append("\"");

            char[] charArray = aString.ToCharArray();
            for (int i = 0; i < charArray.Length; i++)
            {
                char c = charArray[i];
                if (c == '"')
                    builder.Append("\\\"");
                else if (c == '\\')
                    builder.Append("\\\\");
                else if (c == '\b')
                    builder.Append("\\b");
                else if (c == '\f')
                    builder.Append("\\f");
                else if (c == '\n')
                    builder.Append("\\n");
                else if (c == '\r')
                    builder.Append("\\r");
                else if (c == '\t')
                    builder.Append("\\t");
                else
                    builder.Append(c);
            }

            builder.Append("\"");
            return true;
        }

        protected static bool SerializeNumber(object number, StringBuilder builder)
        {
            if (number is long)
            {
                builder.Append(((long)number).ToString(CultureInfo.InvariantCulture));
            }
            else if (number is ulong)
            {
                builder.Append(((ulong)number).ToString(CultureInfo.InvariantCulture));
            }
            else if (number is int)
            {
                builder.Append(((int)number).ToString(CultureInfo.InvariantCulture));
            }
            else if (number is uint)
            {
                builder.Append(((uint)number).ToString(CultureInfo.InvariantCulture));
            }
            else if (number is decimal)
            {
                builder.Append(((decimal)number).ToString(CultureInfo.InvariantCulture));
            }
            else if (number is float)
            {
                builder.Append(((float)number).ToString(CultureInfo.InvariantCulture));
            }
            else
            {
                builder.Append(Convert.ToDouble(number, CultureInfo.InvariantCulture).ToString("r", CultureInfo.InvariantCulture));
            }

            return true;
        }

        /// <summary>
        /// Determines if a given object is numeric in any way
        /// (can be integer, double, null, etc).
        /// </summary>
        protected static bool IsNumeric(object value)
        {
            if (value is sbyte) return true;
            if (value is byte) return true;
            if (value is short) return true;
            if (value is ushort) return true;
            if (value is int) return true;
            if (value is uint) return true;
            if (value is long) return true;
            if (value is ulong) return true;
            if (value is float) return true;
            if (value is double) return true;
            if (value is decimal) return true;
            return false;
        }

        private static IJsonSerializerStrategy currentJsonSerializerStrategy;
        public static IJsonSerializerStrategy CurrentJsonSerializerStrategy
        {
            get
            {
                // todo: implement locking mechanism.
                return currentJsonSerializerStrategy ??
                    (currentJsonSerializerStrategy =
#if SIMPLE_JSON_DATACONTRACT
 DataContractJsonSerializerStrategy
#else
 PocoJsonSerializerStrategy
#endif
);
            }

            set
            {
                currentJsonSerializerStrategy = value;
            }
        }

        private static PocoJsonSerializerStrategy pocoJsonSerializerStrategy;
        [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
        public static PocoJsonSerializerStrategy PocoJsonSerializerStrategy
        {
            get
            {
                // todo: implement locking mechanism.
                return pocoJsonSerializerStrategy ?? (pocoJsonSerializerStrategy = new PocoJsonSerializerStrategy());
            }
        }

#if SIMPLE_JSON_DATACONTRACT

        private static DataContractJsonSerializerStrategy dataContractJsonSerializerStrategy;
        [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
        public static DataContractJsonSerializerStrategy DataContractJsonSerializerStrategy
        {
            get
            {
                // todo: implement locking mechanism.
                return dataContractJsonSerializerStrategy ?? (dataContractJsonSerializerStrategy = new DataContractJsonSerializerStrategy());
            }
        }

#endif
    }

    #endregion

    #region Simple Json Serializer Strategies

#if SIMPLE_JSON_INTERNAL
    internal
#else
    public
#endif
 interface IJsonSerializerStrategy
    {
        bool SerializeNonPrimitiveObject(object input, out object output);

        object DeserializeObject(object value, Type type);
    }

#if SIMPLE_JSON_INTERNAL
    internal
#else
    public
#endif
 class PocoJsonSerializerStrategy : IJsonSerializerStrategy
    {
        internal CacheResolver CacheResolver;

        private static readonly string[] Iso8601Format = new string[]
                                                             {
                                                                 @"yyyy-MM-dd\THH:mm:ss.FFFFFFF\Z",
                                                                 @"yyyy-MM-dd\THH:mm:ss\Z",
                                                                 @"yyyy-MM-dd\THH:mm:ssK"
                                                             };

        public PocoJsonSerializerStrategy()
        {
            CacheResolver = new CacheResolver(BuildMap);
        }

        protected virtual void BuildMap(Type type, SafeDictionary<string, CacheResolver.MemberMap> memberMaps)
        {
#if NETFX_CORE
            foreach (PropertyInfo info in type.GetTypeInfo().DeclaredProperties) {
                var getMethod = info.GetMethod;
                if(getMethod==null || !getMethod.IsPublic || getMethod.IsStatic) continue;
#else
            foreach (PropertyInfo info in type.GetProperties(BindingFlags.Instance | BindingFlags.Public))
            {
#endif
                memberMaps.Add(info.Name, new CacheResolver.MemberMap(info));
            }
#if NETFX_CORE
            foreach (FieldInfo info in type.GetTypeInfo().DeclaredFields) {
                if(!info.IsPublic || info.IsStatic) continue;
#else
            foreach (FieldInfo info in type.GetFields(BindingFlags.Public | BindingFlags.Instance))
            {
#endif
                memberMaps.Add(info.Name, new CacheResolver.MemberMap(info));
            }
        }

        public virtual bool SerializeNonPrimitiveObject(object input, out object output)
        {
            return TrySerializeKnownTypes(input, out output) || TrySerializeUnknownTypes(input, out output);
        }

        [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
        public virtual object DeserializeObject(object value, Type type)
        {
            object obj = null;
            if (value is string)
            {
                string str = value as string;

                if (!string.IsNullOrEmpty(str))
                {
                    if (type == typeof(DateTime) || (ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(DateTime)))
                        obj = DateTime.ParseExact(str, Iso8601Format, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal);
                    else if (type == typeof(Guid) || (ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Guid)))
                        obj = new Guid(str);
                    else if (type == typeof(Font) ||
                             (ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Font)))
                    {
                        var cvt = new FontConverter();
                        obj = cvt.ConvertFromInvariantString(str);
                    }
                    else
                        obj = str;
                }
                else
                {
                    if (type == typeof(Guid))
                        obj= default(Guid);
                    else if(ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Guid))
                        obj = null;
                    else
                        obj = str;                    
                }
            }
            else if (value is bool)
                obj = value;
            else if (value == null)
                obj = null;
            else if (value is long && typeof(Enum).IsAssignableFrom(type))
            {
                obj = Enum.ToObject(type, (long) value);
            }
            else if ((value is long && type == typeof(long)) || (value is double && type == typeof(double)))
                obj = value;
            else if ((value is double && type != typeof(double)) || (value is long && type != typeof(long)))
            {
                obj =
#if NETFX_CORE
                    type == typeof(int) || type == typeof(long) || type == typeof(double) ||type == typeof(float) || type == typeof(bool) || type == typeof(decimal) ||type == typeof(byte) || type == typeof(short)
#else
 typeof(IConvertible).IsAssignableFrom(type)
#endif
 ? Convert.ChangeType(value, type, CultureInfo.InvariantCulture) : value;
            }
            else
            {
                if (value is IDictionary<string, object>)
                {
                    IDictionary<string, object> jsonObject = (IDictionary<string, object>)value;

                    if (ReflectionUtils.IsTypeDictionary(type))
                    {
                        // if dictionary then
#if NETFX_CORE
                    Type keyType = type.GetTypeInfo().GenericTypeArguments[0];
                    Type valueType = type.GetTypeInfo().GenericTypeArguments[1];
#else
                        Type keyType = type.GetGenericArguments()[0];
                        Type valueType = type.GetGenericArguments()[1];
#endif

                        Type genericType = typeof(Dictionary<,>).MakeGenericType(keyType, valueType);

#if NETFX_CORE
                    dynamic dict = CacheResolver.GetNewInstance(genericType);
#else
                        IDictionary dict = (IDictionary)CacheResolver.GetNewInstance(genericType);
#endif
                        foreach (KeyValuePair<string, object> kvp in jsonObject)
                        {
                            dict.Add(kvp.Key, DeserializeObject(kvp.Value, valueType));
                        }

                        obj = dict;
                    }
                    else
                    {
                        obj = CacheResolver.GetNewInstance(type);
                        SafeDictionary<string, CacheResolver.MemberMap> maps = CacheResolver.LoadMaps(type);

                        if (maps == null)
                        {
                            obj = value;
                        }
                        else
                        {
                            foreach (KeyValuePair<string, CacheResolver.MemberMap> keyValuePair in maps)
                            {
                                CacheResolver.MemberMap v = keyValuePair.Value;
                                if (v.Setter == null)
                                    continue;

                                string jsonKey = keyValuePair.Key;
                                if (jsonObject.ContainsKey(jsonKey))
                                {
                                    object jsonValue = DeserializeObject(jsonObject[jsonKey], v.Type);
                                    v.Setter(obj, jsonValue);
                                }
                            }
                        }
                    }
                }
                else if (value is IList<object>)
                {
                    IList<object> jsonObject = (IList<object>)value;
                    IList list = null;

                    if (type.IsArray)
                    {
                        list = (IList)Activator.CreateInstance(type, jsonObject.Count);
                        int i = 0;
                        foreach (object o in jsonObject)
                            list[i++] = DeserializeObject(o, type.GetElementType());
                    }
                    else if (ReflectionUtils.IsTypeGenericeCollectionInterface(type) ||
#if NETFX_CORE
 typeof(IList).GetTypeInfo().IsAssignableFrom(type.GetTypeInfo())
#else
 typeof(IList).IsAssignableFrom(type)
#endif
)
                    {
#if NETFX_CORE
                    Type innerType = type.GetTypeInfo().GenericTypeArguments[0];
#else
                        Type innerType = type.GetGenericArguments()[0];
#endif
                        Type genericType = typeof(List<>).MakeGenericType(innerType);
                        list = (IList)CacheResolver.GetNewInstance(genericType);
                        foreach (object o in jsonObject)
                            list.Add(DeserializeObject(o, innerType));
                    }

                    obj = list;
                }

                return obj;
            }

            if (ReflectionUtils.IsNullableType(type))
                return ReflectionUtils.ToNullableType(obj, type);

            if (obj == null)
            {
                if (type == typeof(Guid))
                    return default(Guid);
            }

            return obj;
        }

        protected virtual object SerializeEnum(Enum p)
        {
            return Convert.ToDouble(p, CultureInfo.InvariantCulture);
        }

        protected virtual bool TrySerializeKnownTypes(object input, out object output)
        {
            bool returnValue = true;
            if (input is DateTime)
                output = ((DateTime)input).ToUniversalTime().ToString(Iso8601Format[0], CultureInfo.InvariantCulture);
            else if (input is Guid)
                output = ((Guid)input).ToString("D");
            else if (input is Uri)
                output = input.ToString();
            else if (input is Enum)
                output = SerializeEnum((Enum)input);
            else if (input is Font)
            {
                var cvt = new FontConverter();
                output = cvt.ConvertToInvariantString((Font) input);
            }
            else
            {
                returnValue = false;
                output = null;
            }

            return returnValue;
        }

        protected virtual bool TrySerializeUnknownTypes(object input, out object output)
        {
            output = null;

            // todo: implement caching for types
            Type type = input.GetType();

            if (type.FullName == null)
                return false;

            IDictionary<string, object> obj = new JsonObject();

            SafeDictionary<string, CacheResolver.MemberMap> maps = CacheResolver.LoadMaps(type);

            foreach (KeyValuePair<string, CacheResolver.MemberMap> keyValuePair in maps)
            {
                if (keyValuePair.Value.Getter != null)
                    obj.Add(keyValuePair.Key, keyValuePair.Value.Getter(input));
            }

            output = obj;
            return true;
        }
    }

#if SIMPLE_JSON_DATACONTRACT
#if SIMPLE_JSON_INTERNAL
    internal
#else
    public
#endif
 class DataContractJsonSerializerStrategy : PocoJsonSerializerStrategy
    {
        public DataContractJsonSerializerStrategy()
        {
            CacheResolver = new CacheResolver(BuildMap);
        }

        protected override void BuildMap(Type type, SafeDictionary<string, CacheResolver.MemberMap> map)
        {
            bool hasDataContract = ReflectionUtils.GetAttribute(type, typeof(DataContractAttribute)) != null;
            if (!hasDataContract)
            {
                base.BuildMap(type, map);
                return;
            }

            string jsonKey;
#if NETFX_CORE
            foreach (PropertyInfo info in type.GetTypeInfo().DeclaredProperties)
#else
            foreach (PropertyInfo info in type.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
#endif
            {
                if (CanAdd(info, out jsonKey))
                    map.Add(jsonKey, new CacheResolver.MemberMap(info));
            }

#if NETFX_CORE
            foreach (FieldInfo info in type.GetTypeInfo().DeclaredFields)
#else
            foreach (FieldInfo info in type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
#endif
            {
                if (CanAdd(info, out jsonKey))
                    map.Add(jsonKey, new CacheResolver.MemberMap(info));
            }

            // todo implement sorting for DATACONTRACT.
        }

        private static bool CanAdd(MemberInfo info, out string jsonKey)
        {
            jsonKey = null;

            if (ReflectionUtils.GetAttribute(info, typeof(IgnoreDataMemberAttribute)) != null)
                return false;

            DataMemberAttribute dataMemberAttribute = (DataMemberAttribute)ReflectionUtils.GetAttribute(info, typeof(DataMemberAttribute));

            if (dataMemberAttribute == null)
                return false;

            jsonKey = string.IsNullOrEmpty(dataMemberAttribute.Name) ? info.Name : dataMemberAttribute.Name;
            return true;
        }
    }
#endif

    #endregion

    #region Reflection helpers

    namespace Reflection
    {
#if SIMPLE_JSON_INTERNAL
    internal
#else
        public
#endif
 class ReflectionUtils
        {
            public static Attribute GetAttribute(MemberInfo info, Type type)
            {
#if NETFX_CORE
                if (info == null || type == null || !info.IsDefined(type))
                    return null;
                return info.GetCustomAttribute(type);
#else
                if (info == null || type == null || !Attribute.IsDefined(info, type))
                    return null;
                return Attribute.GetCustomAttribute(info, type);
#endif
            }

            public static Attribute GetAttribute(Type objectType, Type attributeType)
            {

#if NETFX_CORE
                if (objectType == null || attributeType == null || !objectType.GetTypeInfo().IsDefined(attributeType))
                    return null;
                return objectType.GetTypeInfo().GetCustomAttribute(attributeType);
#else
                if (objectType == null || attributeType == null || !Attribute.IsDefined(objectType, attributeType))
                    return null;
                return Attribute.GetCustomAttribute(objectType, attributeType);
#endif
            }

            public static bool IsTypeGenericeCollectionInterface(Type type)
            {
#if NETFX_CORE
                if (!type.GetTypeInfo().IsGenericType)
#else
                if (!type.IsGenericType)
#endif
                    return false;

                Type genericDefinition = type.GetGenericTypeDefinition();

                return (genericDefinition == typeof(IList<>) || genericDefinition == typeof(ICollection<>) || genericDefinition == typeof(IEnumerable<>));
            }

            public static bool IsTypeDictionary(Type type)
            {
#if NETFX_CORE
                if (typeof(IDictionary<,>).GetTypeInfo().IsAssignableFrom(type.GetTypeInfo()))
                    return true;

                if (!type.GetTypeInfo().IsGenericType)
                    return false;
#else
                if (typeof(IDictionary).IsAssignableFrom(type))
                    return true;

                if (!type.IsGenericType)
                    return false;
#endif
                Type genericDefinition = type.GetGenericTypeDefinition();
                return genericDefinition == typeof(IDictionary<,>);
            }

            public static bool IsNullableType(Type type)
            {
                return
#if NETFX_CORE
                    type.GetTypeInfo().IsGenericType
#else
 type.IsGenericType
#endif
 && type.GetGenericTypeDefinition() == typeof(Nullable<>);
            }

            public static object ToNullableType(object obj, Type nullableType)
            {
                return obj == null ? null : Convert.ChangeType(obj, Nullable.GetUnderlyingType(nullableType), CultureInfo.InvariantCulture);
            }
        }

#if SIMPLE_JSON_INTERNAL
    internal
#else
        public
#endif
 delegate object GetHandler(object source);

#if SIMPLE_JSON_INTERNAL
    internal
#else
        public
#endif
 delegate void SetHandler(object source, object value);

#if SIMPLE_JSON_INTERNAL
    internal
#else
        public
#endif
 delegate void MemberMapLoader(Type type, SafeDictionary<string, CacheResolver.MemberMap> memberMaps);

#if SIMPLE_JSON_INTERNAL
    internal
#else
        public
#endif
 class CacheResolver
        {
            private readonly MemberMapLoader _memberMapLoader;
            private readonly SafeDictionary<Type, SafeDictionary<string, MemberMap>> _memberMapsCache = new SafeDictionary<Type, SafeDictionary<string, MemberMap>>();

            delegate object CtorDelegate();
            readonly static SafeDictionary<Type, CtorDelegate> ConstructorCache = new SafeDictionary<Type, CtorDelegate>();

            public CacheResolver(MemberMapLoader memberMapLoader)
            {
                _memberMapLoader = memberMapLoader;
            }

            [SuppressMessage("Microsoft.Usage", "CA2201:DoNotRaiseReservedExceptionTypes")]
            public static object GetNewInstance(Type type)
            {
                CtorDelegate c;
                if (ConstructorCache.TryGetValue(type, out c))
                    return c();
#if SIMPLE_JSON_REFLECTIONEMIT
                DynamicMethod dynamicMethod = new DynamicMethod("Create" + type.FullName, typeof(object), Type.EmptyTypes, type, true);
                dynamicMethod.InitLocals = true;
                ILGenerator generator = dynamicMethod.GetILGenerator();
                if (type.IsValueType)
                {
                    generator.DeclareLocal(type);
                    generator.Emit(OpCodes.Ldloc_0);
                    generator.Emit(OpCodes.Box, type);
                }
                else
                {
                    ConstructorInfo constructorInfo = type.GetConstructor(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, null, Type.EmptyTypes, null);
                    if (constructorInfo == null)
                        throw new Exception(string.Format(CultureInfo.InvariantCulture, "Could not get constructor for {0}.", type));
                    generator.Emit(OpCodes.Newobj, constructorInfo);
                }
                generator.Emit(OpCodes.Ret);
                c = (CtorDelegate)dynamicMethod.CreateDelegate(typeof(CtorDelegate));
                ConstructorCache.Add(type, c);
                return c();
#else
#if NETFX_CORE
                IEnumerable<ConstructorInfo> constructorInfos = type.GetTypeInfo().DeclaredConstructors;
                ConstructorInfo constructorInfo = null;
                foreach (ConstructorInfo item in constructorInfos) // FirstOrDefault()
                {
                    if (item.GetParameters().Length == 0) // Default ctor - make sure it doesn't contain any parameters
                    {
                        constructorInfo = item;
                        break;
                    }
                }
#else
                ConstructorInfo constructorInfo = type.GetConstructor(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, null, Type.EmptyTypes, null);
#endif
                c = delegate { return constructorInfo.Invoke(null); };
                ConstructorCache.Add(type, c);
                return c();
#endif
            }

            public SafeDictionary<string, MemberMap> LoadMaps(Type type)
            {
                if (type == null || type == typeof(object))
                    return null;
                SafeDictionary<string, MemberMap> maps;
                if (_memberMapsCache.TryGetValue(type, out maps))
                    return maps;
                maps = new SafeDictionary<string, MemberMap>();
                _memberMapLoader(type, maps);
                _memberMapsCache.Add(type, maps);
                return maps;
            }

#if SIMPLE_JSON_REFLECTIONEMIT
            static DynamicMethod CreateDynamicMethod(string name, Type returnType, Type[] parameterTypes, Type owner)
            {
                DynamicMethod dynamicMethod = !owner.IsInterface
                  ? new DynamicMethod(name, returnType, parameterTypes, owner, true)
                  : new DynamicMethod(name, returnType, parameterTypes, (Module)null, true);

                return dynamicMethod;
            }
#endif

            static GetHandler CreateGetHandler(FieldInfo fieldInfo)
            {
#if SIMPLE_JSON_REFLECTIONEMIT
                Type type = fieldInfo.FieldType;
                DynamicMethod dynamicGet = CreateDynamicMethod("Get" + fieldInfo.Name, fieldInfo.DeclaringType, new Type[] { typeof(object) }, fieldInfo.DeclaringType);
                ILGenerator getGenerator = dynamicGet.GetILGenerator();

                getGenerator.Emit(OpCodes.Ldarg_0);
                getGenerator.Emit(OpCodes.Ldfld, fieldInfo);
                if (type.IsValueType)
                    getGenerator.Emit(OpCodes.Box, type);
                getGenerator.Emit(OpCodes.Ret);

                return (GetHandler)dynamicGet.CreateDelegate(typeof(GetHandler));
#else
                return delegate(object instance) { return fieldInfo.GetValue(instance); };
#endif
            }

            static SetHandler CreateSetHandler(FieldInfo fieldInfo)
            {
                if (fieldInfo.IsInitOnly || fieldInfo.IsLiteral)
                    return null;
#if SIMPLE_JSON_REFLECTIONEMIT
                Type type = fieldInfo.FieldType;
                DynamicMethod dynamicSet = CreateDynamicMethod("Set" + fieldInfo.Name, null, new Type[] { typeof(object), typeof(object) }, fieldInfo.DeclaringType);
                ILGenerator setGenerator = dynamicSet.GetILGenerator();

                setGenerator.Emit(OpCodes.Ldarg_0);
                setGenerator.Emit(OpCodes.Ldarg_1);
                if (type.IsValueType)
                    setGenerator.Emit(OpCodes.Unbox_Any, type);
                setGenerator.Emit(OpCodes.Stfld, fieldInfo);
                setGenerator.Emit(OpCodes.Ret);

                return (SetHandler)dynamicSet.CreateDelegate(typeof(SetHandler));
#else
                return delegate(object instance, object value) { fieldInfo.SetValue(instance, value); };
#endif
            }

            static GetHandler CreateGetHandler(PropertyInfo propertyInfo)
            {
#if NETFX_CORE
                MethodInfo getMethodInfo = propertyInfo.GetMethod;
#else
                MethodInfo getMethodInfo = propertyInfo.GetGetMethod(true);
#endif
                if (getMethodInfo == null)
                    return null;
#if SIMPLE_JSON_REFLECTIONEMIT
                Type type = propertyInfo.PropertyType;
                DynamicMethod dynamicGet = CreateDynamicMethod("Get" + propertyInfo.Name, propertyInfo.DeclaringType, new Type[] { typeof(object) }, propertyInfo.DeclaringType);
                ILGenerator getGenerator = dynamicGet.GetILGenerator();

                getGenerator.Emit(OpCodes.Ldarg_0);
                getGenerator.Emit(OpCodes.Call, getMethodInfo);
                if (type.IsValueType)
                    getGenerator.Emit(OpCodes.Box, type);
                getGenerator.Emit(OpCodes.Ret);

                return (GetHandler)dynamicGet.CreateDelegate(typeof(GetHandler));
#else
#if NETFX_CORE
                return delegate(object instance) { return getMethodInfo.Invoke(instance, new Type[] { }); };
#else
                return delegate(object instance) { return getMethodInfo.Invoke(instance, Type.EmptyTypes); };
#endif
#endif
            }

            static SetHandler CreateSetHandler(PropertyInfo propertyInfo)
            {
#if NETFX_CORE
                MethodInfo setMethodInfo = propertyInfo.SetMethod;
#else
                MethodInfo setMethodInfo = propertyInfo.GetSetMethod(true);
#endif
                if (setMethodInfo == null)
                    return null;
#if SIMPLE_JSON_REFLECTIONEMIT
                Type type = propertyInfo.PropertyType;
                DynamicMethod dynamicSet = CreateDynamicMethod("Set" + propertyInfo.Name, null, new Type[] { typeof(object), typeof(object) }, propertyInfo.DeclaringType);
                ILGenerator setGenerator = dynamicSet.GetILGenerator();

                setGenerator.Emit(OpCodes.Ldarg_0);
                setGenerator.Emit(OpCodes.Ldarg_1);
                if (type.IsValueType)
                    setGenerator.Emit(OpCodes.Unbox_Any, type);
                setGenerator.Emit(OpCodes.Call, setMethodInfo);
                setGenerator.Emit(OpCodes.Ret);
                return (SetHandler)dynamicSet.CreateDelegate(typeof(SetHandler));
#else
                return delegate(object instance, object value) { setMethodInfo.Invoke(instance, new[] { value }); };
#endif
            }

#if SIMPLE_JSON_INTERNAL
    internal
#else
            public
#endif
 sealed class MemberMap
            {
                public readonly MemberInfo MemberInfo;
                public readonly Type Type;
                public readonly GetHandler Getter;
                public readonly SetHandler Setter;

                public MemberMap(PropertyInfo propertyInfo)
                {
                    MemberInfo = propertyInfo;
                    Type = propertyInfo.PropertyType;
                    Getter = CreateGetHandler(propertyInfo);
                    Setter = CreateSetHandler(propertyInfo);
                }

                public MemberMap(FieldInfo fieldInfo)
                {
                    MemberInfo = fieldInfo;
                    Type = fieldInfo.FieldType;
                    Getter = CreateGetHandler(fieldInfo);
                    Setter = CreateSetHandler(fieldInfo);
                }
            }
        }

#if SIMPLE_JSON_INTERNAL
    internal
#else
        public
#endif
 class SafeDictionary<TKey, TValue>
        {
            private readonly object _padlock = new object();
            private readonly Dictionary<TKey, TValue> _dictionary = new Dictionary<TKey, TValue>();

            public bool TryGetValue(TKey key, out TValue value)
            {
                return _dictionary.TryGetValue(key, out value);
            }

            public TValue this[TKey key]
            {
                get { return _dictionary[key]; }
            }

            public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
            {
                return ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).GetEnumerator();
            }

            public void Add(TKey key, TValue value)
            {
                lock (_padlock)
                {
                    if (_dictionary.ContainsKey(key) == false)
                        _dictionary.Add(key, value);
                }
            }
        }
    }

    #endregion
}

================================================
FILE: shadowsocks-csharp/3rd/opendns/DnsQuery.cs
================================================
/* 
 * Author: Ruy Delgado <ruydelgado@gmail.com>
 * Title: OpenDNS
 * Description: DNS Client Library 
 * Revision: 1.0
 * Last Modified: 2005.01.28
 * Created On: 2005.01.28
 * 
 * Note: Based on DnsLite by Jaimon Mathew
 * */

using System;
using System.Net;
using System.IO;
using System.Text;
using System.Net.Sockets;
using System.Collections;
using System.Diagnostics;
//using System.Management;

namespace OpenDNS
{
    /// <summary>
    /// DnsQuery Class
    /// Handles the dns message transport and interpretation of result. 
    /// Use Send() to activate Result object. 
    /// </summary>
    public class DnsQuery
    {
        //consider killing
        private byte[] data;
        private int position, length;

        //Question
        public string Domain;
        public Types QueryType;
        public Classes QueryClass;
        public int Port;
        public ArrayList Servers;
        public bool RecursionDesired;

        //Internal Read-Only
        private DnsResponse _Response;

        //Public Properties
        public DnsResponse Response
        {
            get { return _Response; }
        }

        /// <summary>
        /// Default Constructor with QueryType: A 
        /// </summary>
        public DnsQuery()
        {
            Port = 53;
            Servers = new ArrayList();
            QueryType = Types.A;
            QueryClass = Classes.IN;
        }

        public DnsQuery(string _Domain, Types _Type)
        {
            Port = 53;
            Servers = new ArrayList();
            QueryType = _Type;
            Domain = _Domain;
            QueryClass = Classes.IN;
            RecursionDesired = true;
        }

        /// <summary>
        /// Transmit message to each DNS servers 
        /// until one returns a response object. 
        /// </summary>
        /// <returns>True if response object is ready</returns>
        public bool Send()
        {

            CheckForServers();

            foreach (IPEndPoint Server in Servers)
            {
                int port = Server.Port;
                try
                {
                    SendQuery2(Server.Address, port);
                    break;
                }
                catch
                {
                    continue;
                }
            }

            return (this.Response != null);
        }

        /// <summary>
        /// Uses UDPClient to send byte array to 
        /// DNS Server Specified
        /// </summary>
        /// <param name="IPAddress">Target DNS Server</param>
        private void SendQuery(string ipAddress)
        {
            if (ipAddress == null)
                throw new ArgumentNullException();

            //opening the UDP socket at DNS server
            UdpClient dnsClient = new UdpClient(ipAddress, Port);

            //preparing the DNS query packet.
            byte[] QueryPacket = MakeQuery();

            //send the data packet
            dnsClient.Send(QueryPacket, QueryPacket.Length);

            IPEndPoint endpoint = null;
            //receive the data packet from DNS server
            data = dnsClient.Receive(ref endpoint);

            length = data.Length;

            //un pack the byte array & makes an array of resource record objects.
            ReadResponse();

            //kill dns 
            dnsClient.Close();
        }

        private void SendQuery2(IPAddress ipAddress, int port)
        {
            int timeout = 5000;

            if (ipAddress == null)
                throw new ArgumentNullException();

            //preparing the DNS query packet.
            byte[] QueryPacket = MakeQuery();

            //opening the UDP socket at DNS server
            IPAddress serverAddress = ipAddress;
            EndPoint endPoint = new IPEndPoint(serverAddress, port);
            Socket socket = new Socket(serverAddress.AddressFamily, SocketType.Dgram, ProtocolType.Udp);
            socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendTimeout, timeout);
            socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, timeout);
            socket.SendTo(QueryPacket, endPoint);
            data = new byte[512];

            length = socket.ReceiveFrom(data, ref endPoint);

            //un pack the byte array & makes an array of resource record objects.
            ReadResponse();

            socket.Shutdown(SocketShutdown.Both);

        }

        /// <summary>
        /// Packs question into byte array format
        /// accepted by DNS servers
        /// </summary>
        /// <returns>Byte Array to Send</returns>
        private byte[] MakeQuery()
        {
            //Get New ID
            int QueryID = new Random().Next(55555);

            //Initialize Packet Byte Array
            byte[] Question = new byte[512];
            for (int i = 0; i < 512; i++)
                Question[i] = 0;

            ////Fill Packet Header

            //SetID
            Question[0] = (byte)(QueryID >> 8);
            Question[1] = (byte)(QueryID & byte.MaxValue);
            Question[2] = (byte)1; //Set OpCode to Regular Query
                                   //Set bool bit for recursion desired 
            Question[2] = (byte)((this.RecursionDesired) ? (Question[2] | 1) : (Question[2] & 254));
            //Set Recursion Available (Filler)
            Question[3] = (byte)0;
            //Set Question Count 
            Question[4] = (byte)0;
            Question[5] = (byte)1;

            ///Fill Question Section

            //Set Domain Name to Query
            string[] tokens = this.Domain.Split(new char[] { '.' });
            string label;

            int Cursor = 12;

            for (int j = 0; j < tokens.Length; j++)
            {
                //Get domain segment
                label = tokens[j];
                //Set Length label for domain segment
                Question[Cursor++] = (byte)(label.Length & byte.MaxValue);
                //Get byte array of segment
                byte[] b = Encoding.ASCII.GetBytes(label);
                //Transcribe array into packet
                for (int k = 0; k < b.Length; k++)
                {
                    Question[Cursor++] = b[k];
                }
            }
            //End Domain Marker
            Question[Cursor++] = (byte)0;
            //Set Query type
            Question[Cursor++] = (byte)0;
            Question[Cursor++] = (byte)QueryType;
            //Set Query class
            Question[Cursor++] = (byte)0;
            Question[Cursor++] = (byte)QueryClass;

            return Question;
        }

        //for un packing the byte array
        private void ReadResponse()
        {
            /////////////////
            //HEADER
            int ID = ((data[0] & byte.MaxValue) << 8) + (data[1] & byte.MaxValue);
            bool IS = (data[2] & 128) == 128;
            int OpCode = (data[2] >> 3 & 15);
            bool AA = (data[2] & 4) == 4;
            bool TC = (data[2] & 2) == 2;
            bool RD = (data[2] & 1) == 1;
            bool RA = (data[3] & 128) == 128;
            int Z = (data[3] & 1);//reserved, not used
            int RC = (data[3] & 15);

            //Counts
            int QuestionCount = ((data[4] & byte.MaxValue) << 8) | (data[5] & byte.MaxValue);
            int AnswerCount = ((data[6] & byte.MaxValue) << 8) | (data[7] & byte.MaxValue);
            //Trace.WriteLine("Answer count: " + AnswerCount); 
            int AuthorityCount = ((data[8] & byte.MaxValue) << 8) | (data[9] & byte.MaxValue);
            int AdditionalCount = ((data[10] & byte.MaxValue) << 8) | (data[11] & byte.MaxValue);

            //Create Response Object
            this._Response = new DnsResponse(ID, AA, TC, RD, RA, RC);

            //FINISHED HEADER

            //GET QUESTIONS
            position = 12;

            for (int i = 0; i < QuestionCount; ++i)
            {

                string QuestionName = GetName();

                //two octec field
                int TypeID = (data[position++] & byte.MaxValue) << 8 | data[position++] & byte.MaxValue;
                Types QuestionType = (Types)TypeID;

                //two octec field
                int ClassID = (data[position++] & byte.MaxValue) << 8 | data[position++] & byte.MaxValue;
                Classes QuestionClass = (Classes)ClassID;
            }

            for (int i = 0; i < AnswerCount; ++i)
                GetResourceRecord(i, _Response.Answers);

            for (int i = 0; i < AuthorityCount; ++i)
                GetResourceRecord(i, _Response.Authorities);

            for (int i = 0; i < AdditionalCount; ++i)
                GetResourceRecord(i, _Response.AdditionalRecords);

        }

        private void GetResourceRecord(int i, ResourceRecordCollection Container)
        {
            //get resource (answer) name
            string ResourceName = GetName();

            //get resource type and class, usefull when using the ANY query
            //type: two octec field
            int TypeID = (data[position++] & byte.MaxValue) << 8 | data[position++] & byte.MaxValue;
            Types ResourceType = (Types)TypeID;

            //type: two octec field
            int ClassID = (data[position++] & byte.MaxValue) << 8 | data[position++] & byte.MaxValue;
            Classes ResourceClass = (Classes)ClassID;

            //ttl: unsigned integer 
            int TTL_Seconds = (data[position++] & byte.MaxValue) << 24 | (data[position++] & byte.MaxValue) << 16 | (data[position++] & byte.MaxValue) << 8 | data[position++] & byte.MaxValue;

            //Get Resource Data Length
            int RDLength = (data[position++] & byte.MaxValue) << 8 | data[position++] & byte.MaxValue;

            //Parse Resource Data: 4 possible formats: A, Text, SOA and MX
            switch (ResourceType)
            {
                case Types.A:
                    //Get IP Address Blocks
                    {
                        byte[] bs = new byte[] { (byte)(data[position++] & byte.MaxValue), (byte)(data[position++] & byte.MaxValue), (byte)(data[position++] & byte.MaxValue), (byte)(data[position++] & byte.MaxValue) };
                        string ResourceAddress = String.Concat(new object[] { bs[0], ".", bs[1], ".", bs[2], ".", bs[3] });

                        OpenDNS.Address rrA = new Address(ResourceName, ResourceType, ResourceClass, TTL_Seconds, ResourceAddress);
                        Container.Add(rrA);
                        break;
                    }
                case Types.AAAA:
                    {
                        //Get IP Address Blocks
                        ushort[] bs = new ushort[8];
                        for (int j = 0; j < 8; ++j) bs[j] = (ushort)(((byte)(data[position + j * 2] & byte.MaxValue) << 8) | (byte)(data[position + j * 2 + 1] & byte.MaxValue));
                        position += 16;
                        string ResourceAddress = String.Concat(new object[] {
                            Convert.ToString(bs[0], 16), ":",
                            Convert.ToString(bs[1], 16), ":",
                            Convert.ToString(bs[2], 16), ":",
                            Convert.ToString(bs[3], 16), ":",
                            Convert.ToString(bs[4], 16), ":",
                            Convert.ToString(bs[5], 16), ":",
                            Convert.ToString(bs[6], 16), ":",
                            Convert.ToString(bs[7], 16)});

                        OpenDNS.Address rrA = new Address(ResourceName, ResourceType, ResourceClass, TTL_Seconds, ResourceAddress);
                        Container.Add(rrA);
                        break;
                    }
                case Types.SOA:
                    {
                        //Extract Text Fields
                        string Server = GetName();
                        string Email = GetName();

                        //32 bit fields
                        long Serial = (data[position++] & byte.MaxValue) << 24 | (data[position++] & byte.MaxValue) << 16 | (data[position++] & byte.MaxValue) << 8 | data[position++] & byte.MaxValue;
                        long Refresh = (data[position++] & byte.MaxValue) << 24 | (data[position++] & byte.MaxValue) << 16 | (data[position++] & byte.MaxValue) << 8 | data[position++] & byte.MaxValue;
                        long Retry = (data[position++] & byte.MaxValue) << 24 | (data[position++] & byte.MaxValue) << 16 | (data[position++] & byte.MaxValue) << 8 | data[position++] & byte.MaxValue;
                        long Expire = (data[position++] & byte.MaxValue) << 24 | (data[position++] & byte.MaxValue) << 16 | (data[position++] & byte.MaxValue) << 8 | data[position++] & byte.MaxValue;
                        long Minimum = (data[position++] & byte.MaxValue) << 24 | (data[position++] & byte.MaxValue) << 16 | (data[position++] & byte.MaxValue) << 8 | data[position++] & byte.MaxValue;

                        OpenDNS.SOA rrSOA = new SOA(ResourceName, ResourceType, ResourceClass, TTL_Seconds, Server, Email, Serial, Refresh, Retry, Expire, Minimum);
                        Container.Add(rrSOA);

                        break;
                    }
                case Types.CNAME:
                case Types.MINFO:
                case Types.NS:
                case Types.PTR:
                case Types.TXT:
                    //Simplest RDATA format, just a text string, shared by many
                    string ResourceDataText = GetName();
                    ResourceRecord rrTXT = new ResourceRecord(ResourceName, ResourceType, ResourceClass, TTL_Seconds, ResourceDataText);
                    Container.Add(rrTXT);
                    break;

                case Types.MX:
                    int Rank = (data[position++] << 8) | (data[position++] & byte.MaxValue);
                    string Exchange = GetName();

                    MX rrMX = new MX(ResourceName, ResourceType, ResourceClass, TTL_Seconds, Rank, Exchange);
                    Container.Add(rrMX);

                    break;
                default:
                    Trace.WriteLine("Resource type did not match: " + ResourceType.ToString(), "RUY QDNS");
                    break;
            }
        }

        /// <summary>
        /// Wrapper for not so pretty code =) 
        /// </summary>
        /// <returns></returns>
        private string GetName()
        {
            StringBuilder sb = new StringBuilder();
            position = ExtractName(position, sb);
            return sb.ToString();
        }

        /// <summary>
        /// Gets name string segments from byte array. 
        /// Uses the DNS "compression" support 
        /// that gives a pointer to a previous 
        /// occurrence of repeat names. 
        /// -- not so pretty, consider killing
        /// </summary>
        /// <param name="position">Current Byte Array Reading Position</param>
        /// <returns>New Global Cursor Position</returns>
        private int ExtractName(int ResourceDataCursor, StringBuilder Name)
        {
            //Get label for how many characters to extract in this segment
            int LengthLabel = (data[ResourceDataCursor++] & byte.MaxValue);

            if (LengthLabel == 0)
            {
                return ResourceDataCursor;
            }

            do
            {
                if ((LengthLabel & 0xC0) == 0xC0)
                {
                    if (ResourceDataCursor >= length)
                    {
                        return -1;
                    }

                    //Compression OffsetID for RDATA Compression
                    int CompressionOffsetID = ((LengthLabel & 0x3F) << 8) | (data[ResourceDataCursor++] & byte.MaxValue);
                    ExtractName(CompressionOffsetID, Name);
                    return ResourceDataCursor;
                }
                else
                {
                    if ((ResourceDataCursor + LengthLabel) > length)
                    {
                        return -1;
                    }

                    Name.Append(Encoding.ASCII.GetString(data, ResourceDataCursor, LengthLabel));
                    ResourceDataCursor += LengthLabel;
                }

                if (ResourceDataCursor > length)
                {
                    return -1;
                }

                LengthLabel = data[ResourceDataCursor++] & byte.MaxValue;

                //if new length label is larger than 0, we have another segment
                //so append dot. 
                if (LengthLabel != 0)
                {
                    Name.Append(".");
                }
            }
            while (LengthLabel != 0);

            return ResourceDataCursor;
        }

        /// <summary>
        /// Checks for any DNS servers 
        /// on the public collection. If user 
        /// did not add any manually gets 
        /// the default ones from the TCP/IP 
        /// Configuration. 
        /// </summary>
        /// <returns>True if we have at least one DNS server</returns>
        private bool CheckForServers()
        {
            //Check if user added servers
            if (Servers.Count == 0)
                Servers = GetDefaultServers();

            if (Servers.Count > 0)
            {
                return true;
            }
            else
            {
                throw new Exception("Abort: No DNS servers specified manually and could not get default ones.");
                //return false; 
            }
        }

        /// <summary>
        /// TODO:
        /// Gets DNS Servers from TCP/IP Configuration of 
        /// network adapter. 
        /// </summary>
        /// <returns>ArrayList object. May be empty if no servers are found.</returns>
        private ArrayList GetDefaultServers()
        {

            ArrayList LocalServers = new ArrayList();

            try
            {
                //Insert code here to query network adapter. 

            }
            catch (Exception Ex)
            {
                Trace.WriteLine("Could not get DNS servers from network adapter: " + Ex.Message, "OpenDNS");
            }
            finally
            {

            }

            return LocalServers;
        }

    }
}


================================================
FILE: shadowsocks-csharp/3rd/opendns/DnsResponse.cs
================================================
/* 
 * Author: Ruy Delgado <ruydelgado@gmail.com>
 * Title: OpenDNS
 * Description: DNS Client Library 
 * Revision: 1.0
 * Last Modified: 2005.01.28
 * Created On: 2005.01.28
 * 
 * Note: Based on DnsLite by Jaimon Mathew
 * */

using System;
using System.Net;
using System.Text;
using System.Collections;
using System.Diagnostics;

namespace OpenDNS
{
    /// <summary>
    /// Response object as result of a dns query message. 
    /// Will be null unless query succesfull. 
    /// </summary>
    public class DnsResponse
    {
        private int _QueryID;

        //Property Internals
        private bool _AuthorativeAnswer;
        private bool _IsTruncated;
        private bool _RecursionDesired;
        private bool _RecursionAvailable;
        private ResponseCodes _ResponseCode;

        private ResourceRecordCollection _ResourceRecords;
        private ResourceRecordCollection _Answers;
        private ResourceRecordCollection _Authorities;
        private ResourceRecordCollection _AdditionalRecords;

        //Read Only Public Properties
        public int QueryID
        {
            get { return _QueryID; }
        }

        public bool AuthorativeAnswer
        {
            get { return _AuthorativeAnswer; }
        }

        public bool IsTruncated
        {
            get { return _IsTruncated; }
        }

        public bool RecursionRequested
        {
            get { return _RecursionDesired; }
        }

        public bool RecursionAvailable
        {
            get { return _RecursionAvailable; }
        }

        public ResponseCodes ResponseCode
        {
            get { return _ResponseCode; }
        }

        public ResourceRecordCollection Answers
        {
            get { return _Answers; }
        }

        public ResourceRecordCollection Authorities
        {
            get { return _Authorities; }
        }

        public ResourceRecordCollection AdditionalRecords
        {
            get { return _AdditionalRecords; }
        }

        /// <summary>
        /// Unified collection of Resource Records from Answers, 
        /// Authorities and Additional. NOT IN REALTIME SYNC. 
        /// 
        /// </summary>
        public ResourceRecordCollection ResourceRecords
        {
            get
            {
                if (_ResourceRecords.Count == 0 && _Answers.Count > 0 && _Authorities.Count > 0 && _AdditionalRecords.Count > 0)
                {
                    foreach (ResourceRecord rr in Answers)
                        this._ResourceRecords.Add(rr);

                    foreach (ResourceRecord rr in Authorities)
                        this._ResourceRecords.Add(rr);

                    foreach (ResourceRecord rr in AdditionalRecords)
                        this._ResourceRecords.Add(rr);
                }

                return _ResourceRecords;
            }
        }

        public DnsResponse(int ID, bool AA, bool TC, bool RD, bool RA, int RC)
        {
            this._QueryID = ID;
            this._AuthorativeAnswer = AA;
            this._IsTruncated = TC;
            this._RecursionDesired = RD;
            this._RecursionAvailable = RA;
            this._ResponseCode = (ResponseCodes)RC;

            this._ResourceRecords = new ResourceRecordCollection();
            this._Answers = new ResourceRecordCollection();
            this._Authorities = new ResourceRecordCollection();
            this._AdditionalRecords = new ResourceRecordCollection();
        }
    }
}


================================================
FILE: shadowsocks-csharp/3rd/opendns/Enum.cs
================================================
/* 
 * Author: Ruy Delgado <ruydelgado@gmail.com>
 * Title: OpenDNS
 * Description: DNS Client Library 
 * Revision: 1.0
 * Last Modified: 2005.01.28
 * Created On: 2005.01.28
 * 
 * Note: Based on DnsLite by Jaimon Mathew
 * */

using System;

namespace OpenDNS
{
    /// <summary>
    /// Query Result/Response Codes from server
    /// </summary>
    public enum ResponseCodes : int
    {
        NoError = 0,
        FormatError = 1,
        ServerFailure = 2,
        NameError = 3,
        NotImplemented = 4,
        Refused = 5,
        Reserved = 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15
    }


    /// <summary>
    /// DNS Resource Record Types
    /// </summary>
    public enum Types : int
    {
        A = 1,
        AAAA = 28,
        NS = 2,
        CNAME = 5,
        SOA = 6,
        MB = 7,
        MG = 8,
        MR = 9,
        NULL = 10,
        WKS = 11,
        PTR = 12,
        HINFO = 13,
        MINFO = 14,
        MX = 15,
        TXT = 16,
        ANY = 255
    }


    /// <summary>
    /// Query Class or Scope
    /// </summary>
    public enum Classes : int
    {
        IN = 1,
        CS = 2,
        CH = 3,
        HS = 4,
        ANY = 255
    }
}


================================================
FILE: shadowsocks-csharp/3rd/opendns/RR/Address.cs
================================================
/* 
 * Author: Ruy Delgado <ruydelgado@gmail.com>
 * Title: OpenDNS
 * Description: DNS Client Library 
 * Revision: 1.0
 * Last Modified: 2005.01.28
 * Created On: 2005.01.28
 * 
 * Note: Based on DnsLite by Jaimon Mathew
 * */

using System;
using System.Net;

namespace OpenDNS
{
	/// <summary>
	/// Address Resource Record
	/// </summary>
	public class Address : ResourceRecord
	{
		public string ResourceAddress; 
		private IPAddress _IP; 

		public IPAddress IP
		{
			get 
			{ 
				if (_IP == null) _IP = IPAddress.Parse(ResourceAddress); 
				return _IP; 
			}
		}

		public Address(string _Name, Types _Type, Classes _Class, int _TimeToLive, string _ResourceAddress):base(_Name, _Type, _Class, _TimeToLive)
		{
			ResourceAddress = _ResourceAddress; 
			RText = _ResourceAddress;
		}
	}
}

================================================
FILE: shadowsocks-csharp/3rd/opendns/RR/MX.cs
================================================
/* 
 * Author: Ruy Delgado <ruydelgado@gmail.com>
 * Title: OpenDNS
 * Description: DNS Client Library 
 * Revision: 1.0
 * Last Modified: 2005.01.28
 * Created On: 2005.01.28
 * 
 * Note: Based on DnsLite by Jaimon Mathew
 * */

using System;
using System.Text;

namespace OpenDNS
{
	/// <summary>
	/// MailExchange Resource Record
	/// </summary>
	public class MX : ResourceRecord
	{
		public int Preference;
		public string Exchange;

		public MX(string _Name, Types _Type, Classes _Class, int _TimeToLive, int _Preference, string _Exchange):base(_Name, _Type, _Class, _TimeToLive)
		{
			Preference = _Preference;
			Exchange = _Exchange; 
		}
	}
}

================================================
FILE: shadowsocks-csharp/3rd/opendns/RR/ResourceRecord.cs
================================================
/* 
 * Author: Ruy Delgado <ruydelgado@gmail.com>
 * Title: OpenDNS
 * Description: DNS Client Library 
 * Revision: 1.0
 * Last Modified: 2005.01.28
 * Created On: 2005.01.28
 * 
 * Note: Based on DnsLite by Jaimon Mathew
 * */

using System;
using System.Text;

namespace OpenDNS
{
	/// <summary>
	/// Base Resource Record class for objects returned in 
	/// answers, authorities and additional record DNS responses. 
	/// </summary>
	public class ResourceRecord
	{
		public string Name; 
		public Types Type; 
		public Classes Class; 
		public int TimeToLive; 
		public string RText; 

		public ResourceRecord()
		{
		}

		public ResourceRecord(string _Name, Types _Type, Classes _Class, int _TimeToLive)
		{
			this.Name = _Name; 
			this.Type = _Type; 
			this.Class = _Class; 
			this.TimeToLive = _TimeToLive; 
		}

		public ResourceRecord(string _Name, Types _Type, Classes _Class, int _TimeToLive, string _RText)
		{
			this.Name = _Name; 
			this.Type = _Type; 
			this.Class = _Class; 
			this.TimeToLive = _TimeToLive; 
			this.RText = _RText; 
		}

		public override string ToString()
		{
			
			StringBuilder sb = new StringBuilder(); 
			sb.Append("Name=" + Name + "&Type=" + Type + "&Class=" + Class + "&TTL="+TimeToLive); 
			//TODO: Return TTL as minutes? 
			//TimeSpan timeSpan = new TimeSpan(0, 0, 0, TimeToLive, 0);

			return sb.ToString();
		}
	}

}

================================================
FILE: shadowsocks-csharp/3rd/opendns/RR/ResourceRecordCollection.cs
================================================
/* 
 * Author: Ruy Delgado <ruydelgado@gmail.com>
 * Title: OpenDNS
 * Description: DNS Client Library 
 * Revision: 1.0
 * Last Modified: 2005.01.28
 * Created On: 2005.01.28
 * 
 * Note: Based on DnsLite by Jaimon Mathew
 * */

using System;
using System.Collections;
using System.Text;

namespace OpenDNS
{
	/// <summary>
	/// The Collection Class inherits from ArrayList.  It has its own implemenation 
	/// of Sort based on the sortable fields.
	/// </summary>
	public class ResourceRecordCollection : ArrayList
	{
		public enum SortFields
		{
			Name,
			TTL
		}

		public void Sort(SortFields sortField, bool isAscending)
		{
			switch (sortField) 
			{
				case SortFields.Name:
					base.Sort(new NameComparer());
					break;
				case SortFields.TTL:
					base.Sort(new TTLComparer());
					break;
			}

			if (!isAscending) base.Reverse();
		}

		private sealed class NameComparer : IComparer 
		{
			public int Compare(object x, object y)
			{
				ResourceRecord first = (ResourceRecord) x;
				ResourceRecord second = (ResourceRecord) y;
				return first.Name.CompareTo(second.Name);
			}
		}

		private sealed class TTLComparer : IComparer 
		{
			public int Compare(object x, object y)
			{
				ResourceRecord first = (ResourceRecord) x;
				ResourceRecord second = (ResourceRecord) y;
				return first.TimeToLive.CompareTo(second.TimeToLive);
			}
		}
	}
}



================================================
FILE: shadowsocks-csharp/3rd/opendns/RR/SOA.cs
================================================
/* 
 * Author: Ruy Delgado <ruydelgado@gmail.com>
 * Title: OpenDNS
 * Description: DNS Client Library 
 * Revision: 1.0
 * Last Modified: 2005.01.28
 * Created On: 2005.01.28
 * 
 * Note: Based on DnsLite by Jaimon Mathew
 * */

using System;
using System.Text;

namespace OpenDNS
{
	/// <summary>
	/// Start of Authority Resource Record
	/// </summary>
	public class SOA : ResourceRecord
	{
		public string Server;
		public string Email;
		public long Serial;
		public long Refresh;
		public long Retry;
		public long Expire;
		public long Minimum;
		
		public SOA(string _Name, Types _Type, Classes _Class, int _TimeToLive, string _Server, string _Email, long _Serial, long _Refresh, long _Retry, long _Expire, long _Minimum):base(_Name, _Type, _Class, _TimeToLive)
		{
			Server = _Server;
			Email = _Email;
			Serial = _Serial;
			Refresh = _Refresh;
			Retry = _Retry;
			Expire = _Expire;
			Minimum = _Minimum;
		}

	}
}

================================================
FILE: shadowsocks-csharp/3rd/zxing/BarcodeFormat.cs
================================================
/*
* Copyright 2007 ZXing authors
*
* 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
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/

namespace ZXing
{
   /// <summary>
   /// Enumerates barcode formats known to this package.
   /// </summary>
   /// <author>Sean Owen</author>
   [System.Flags]
   public enum BarcodeFormat
   {
      /// <summary>Aztec 2D barcode format.</summary>
      AZTEC = 1,

      /// <summary>CODABAR 1D format.</summary>
      CODABAR = 2,

      /// <summary>Code 39 1D format.</summary>
      CODE_39 = 4,

      /// <summary>Code 93 1D format.</summary>
      CODE_93 = 8,

      /// <summary>Code 128 1D format.</summary>
      CODE_128 = 16,

      /// <summary>Data Matrix 2D barcode format.</summary>
      DATA_MATRIX = 32,

      /// <summary>EAN-8 1D format.</summary>
      EAN_8 = 64,

      /// <summary>EAN-13 1D format.</summary>
      EAN_13 = 128,

      /// <summary>ITF (Interleaved Two of Five) 1D format.</summary>
      ITF = 256,

      /// <summary>MaxiCode 2D barcode format.</summary>
      MAXICODE = 512,

      /// <summary>PDF417 format.</summary>
      PDF_417 = 1024,

      /// <summary>QR Code 2D barcode format.</summary>
      QR_CODE = 2048,

      /// <summary>RSS 14</summary>
      RSS_14 = 4096,

      /// <summary>RSS EXPANDED</summary>
      RSS_EXPANDED = 8192,

      /// <summary>UPC-A 1D format.</summary>
      UPC_A = 16384,

      /// <summary>UPC-E 1D format.</summary>
      UPC_E = 32768,

      /// <summary>UPC/EAN extension format. Not a stand-alone format.</summary>
      UPC_EAN_EXTENSION = 65536,

      /// <summary>MSI</summary>
      MSI = 131072,

      /// <summary>Plessey</summary>
      PLESSEY = 262144,

      /// <summary>
      /// UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED
      /// without MSI (to many false-positives)
      /// </summary>
      All_1D = UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED
   }
}

================================================
FILE: shadowsocks-csharp/3rd/zxing/BaseLuminanceSource.cs
================================================
/*
* Copyright 2012 ZXing.Net authors
*
* 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
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/

using System;

namespace ZXing
{
   /// <summary>
   /// The base class for luminance sources which supports 
   /// cropping and rotating based upon the luminance values.
   /// </summary>
   public abstract class BaseLuminanceSource : LuminanceSource
   {
      // the following channel weights give nearly the same
      // gray scale picture as the java version with BufferedImage.TYPE_BYTE_GRAY
      // they are used in sub classes for luminance / gray scale calculation
      protected const int RChannelWeight = 19562;
      protected const int GChannelWeight = 38550;
      protected const int BChannelWeight = 7424;
      protected const int ChannelWeight = 16;

      /// <summary>
      /// 
      /// </summary>
      protected byte[] luminances;

      /// <summary>
      /// Initializes a new instance of the <see cref="BaseLuminanceSource"/> class.
      /// </summary>
      /// <param name="width">The width.</param>
      /// <param name="height">The height.</param>
      protected BaseLuminanceSource(int width, int height)
         : base(width, height)
      {
         luminances = new byte[width * height];
      }

      /// <summary>
      /// Initializes a new instance of the <see cref="BaseLuminanceSource"/> class.
      /// </summary>
      /// <param name="luminanceArray">The luminance array.</param>
      /// <param name="width">The width.</param>
      /// <param name="height">The height.</param>
      protected BaseLuminanceSource(byte[] luminanceArray, int width, int height)
         : base(width, height)
      {
         luminances = new byte[width * height];
         Buffer.BlockCopy(luminanceArray, 0, luminances, 0, width * height);
      }

      /// <summary>
      /// Fetches one row of luminance data from the underlying platform's bitmap. Values range from
      /// 0 (black) to 255 (white). It is preferable for implementations of this method
      /// to only fetch this row rather than the whole image, since no 2D Readers may be installed and
      /// getMatrix() may never be called.
      /// </summary>
      /// <param name="y">The row to fetch, 0 &lt;= y &lt; Height.</param>
      /// <param name="row">An optional preallocated array. If null or too small, it will be ignored.
      /// Always use the returned object, and ignore the .length of the array.</param>
      /// <returns>
      /// An array containing the luminance data.
      /// </returns>
      override public byte[] getRow(int y, byte[] row)
      {
         int width = Width;
         if (row == null || row.Length < width)
         {
            row = new byte[width];
         }
         for (int i = 0; i < width; i++)
            row[i] = luminances[y * width + i];
         return row;
      }

      public override byte[] Matrix
      {
         get { return luminances; }
      }

      /// <summary>
      /// Returns a new object with rotated image data by 90 degrees counterclockwise.
      /// Only callable if {@link #isRotateSupported()} is true.
      /// </summary>
      /// <returns>
      /// A rotated version of this object.
      /// </returns>
      public override LuminanceSource rotateCounterClockwise()
      {
         var rotatedLuminances = new byte[Width * Height];
         var newWidth = Height;
         var newHeight = Width;
         var localLuminances = Matrix;
         for (var yold = 0; yold < Height; yold++)
         {
            for (var xold = 0; xold < Width; xold++)
            {
               var ynew = newHeight - xold - 1;
               var xnew = yold;
               rotatedLuminances[ynew * newWidth + xnew] = localLuminances[yold * Width + xold];
            }
         }
         return CreateLuminanceSource(rotatedLuminances, newWidth, newHeight);
      }

      /// <summary>
      /// TODO: not implemented yet
      /// </summary>
      /// <returns>
      /// A rotated version of this object.
      /// </returns>
      public override LuminanceSource rotateCounterClockwise45()
      {
         // TODO: implement a good 45 degrees rotation without lost of information
         return base.rotateCounterClockwise45();
      }

      /// <summary>
      /// </summary>
      /// <returns> Whether this subclass supports counter-clockwise rotation.</returns>
      public override bool RotateSupported
      {
         get
         {
            return true;
         }
      }

      /// <summary>
      /// Returns a new object with cropped image data. Implementations may keep a reference to the
      /// original data rather than a copy. Only callable if CropSupported is true.
      /// </summary>
      /// <param name="left">The left coordinate, 0 &lt;= left &lt; Width.</param>
      /// <param name="top">The top coordinate, 0 &lt;= top &lt;= Height.</param>
      /// <param name="width">The width of the rectangle to crop.</param>
      /// <param name="height">The height of the rectangle to crop.</param>
      /// <returns>
      /// A cropped version of this object.
      /// </returns>
      public override LuminanceSource crop(int left, int top, int width, int height)
      {
         if (left + width > Width || top + height > Height)
         {
            throw new ArgumentException("Crop rectangle does not fit within image data.");
         }
         var croppedLuminances = new byte[width * height];
         var oldLuminances = Matrix;
         var oldWidth = Width;
         var oldRightBound = left + width;
         var oldBottomBound = top + height;
         for (int yold = top, ynew = 0; yold < oldBottomBound; yold++, ynew++)
         {
            for (int xold = left, xnew = 0; xold < oldRightBound; xold++, xnew++)
            {
               croppedLuminances[ynew * width + xnew] = oldLuminances[yold * oldWidth + xold];
            }
         }
         return CreateLuminanceSource(croppedLuminances, width, height);
      }

      /// <summary>
      /// </summary>
      /// <returns> Whether this subclass supports cropping.</returns>
      public override bool CropSupported
      {
         get
         {
            return true;
         }
      }

      /// <summary>
      /// </summary>
      /// <returns>Whether this subclass supports invertion.</returns>
      public override bool InversionSupported
      {
         get
         {
            return true;
         }
      }


      /// <summary>
      /// Should create a new luminance source with the right class type.
      /// The method is used in methods crop and rotate.
      /// </summary>
      /// <param name="newLuminances">The new luminances.</param>
      /// <param name="width">The width.</param>
      /// <param name="height">The height.</param>
      /// <returns></returns>
      protected abstract LuminanceSource CreateLuminanceSource(byte[] newLuminances, int width, int height);
   }
}


================================================
FILE: shadowsocks-csharp/3rd/zxing/Binarizer.cs
================================================
/*
* Copyright 2009 ZXing authors
*
* 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
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/

using System;

using ZXing.Common;

namespace ZXing
{
   /// <summary> This class hierarchy provides a set of methods to convert luminance data to 1 bit data.
   /// It allows the algorithm to vary polymorphically, for example allowing a very expensive
   /// thresholding technique for servers and a fast one for mobile. It also permits the implementation
   /// to vary, e.g. a JNI version for Android and a Java fallback version for other platforms.
   /// 
   /// <author>dswitkin@google.com (Daniel Switkin)</author>
   /// </summary>
   public abstract class Binarizer
   {
      private readonly LuminanceSource source;

      /// <summary>
      /// Initializes a new instance of the <see cref="Binarizer"/> class.
      /// </summary>
      /// <param name="source">The source.</param>
      protected internal Binarizer(LuminanceSource source)
      {
         if (source == null)
         {
            throw new ArgumentException("Source must be non-null.");
         }
         this.source = source;
      }

      /// <summary>
      /// Gets the luminance source object.
      /// </summary>
      virtual public LuminanceSource LuminanceSource
      {
         get
         {
            return source;
         }
      }

      /// <summary> Converts one row of luminance data to 1 bit data. May actually do the conversion, or return
      /// cached data. Callers should assume this method is expensive and call it as seldom as possible.
      /// This method is intended for decoding 1D barcodes and may choose to apply sharpening.
      /// For callers which only examine one row of pixels at a time, the same BitArray should be reused
      /// and passed in with each call for performance. However it is legal to keep more than one row
      /// at a time if needed.
      /// </summary>
      /// <param name="y">The row to fetch, 0 &lt;= y &lt; bitmap height.</param>
      /// <param name="row">An optional preallocated array. If null or too small, it will be ignored.
      /// If used, the Binarizer will call BitArray.clear(). Always use the returned object.
      /// </param>
      /// <returns> The array of bits for this row (true means black).</returns>
      public abstract BitArray getBlackRow(int y, BitArray row);

      /// <summary> Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive
      /// and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or
      /// may not apply sharpening. Therefore, a row from this matrix may not be identical to one
      /// fetched using getBlackRow(), so don't mix and match between them.
      /// </summary>
      /// <returns> The 2D array of bits for the image (true means black).</returns>
      public abstract BitMatrix BlackMatrix { get; }

      /// <summary> Creates a new object with the same type as this Binarizer implementation, but with pristine
      /// state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache
      /// of 1 bit data. See Effective Java for why we can't use Java's clone() method.
      /// </summary>
      /// <param name="source">The LuminanceSource this Binarizer will operate on.</param>
      /// <returns> A new concrete Binarizer implementation object.</returns>
      public abstract Binarizer createBinarizer(LuminanceSource source);

      /// <summary>
      /// Gets the width of the luminance source object.
      /// </summary>
      public int Width
      {
         get { return source.Width; }
      }

      /// <summary>
      /// Gets the height of the luminance source object.
      /// </summary>
      public int Height
      {
         get { return source.Height; }
      }
   }
}

================================================
FILE: shadowsocks-csharp/3rd/zxing/BinaryBitmap.cs
================================================
/*
* Copyright 2009 ZXing authors
*
* 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
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/

using System;
using ZXing.Common;

namespace ZXing
{

   /// <summary> This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects
   /// accept a BinaryBitmap and attempt to decode it.
   /// 
   /// </summary>
   /// <author>  dswitkin@google.com (Daniel Switkin)
   /// </author>
   /// <author>www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source 
   /// </author>

   public sealed class BinaryBitmap
   {
      private Binarizer binarizer;
      private BitMatrix matrix;

      public BinaryBitmap(Binarizer binarizer)
      {
         if (binarizer == null)
         {
            throw new ArgumentException("Binarizer must be non-null.");
         }
         this.binarizer = binarizer;
      }

      /// <returns> The width of the bitmap.
      /// </returns>
      public int Width
      {
         get
         {
            return binarizer.Width;
         }

      }
      /// <returns> The height of the bitmap.
      /// </returns>
      public int Height
      {
         get
         {
            return binarizer.Height;
         }

      }

      /// <summary> Converts one row of luminance data to 1 bit data. May actually do the conversion, or return
      /// cached data. Callers should assume this method is expensive and call it as seldom as possible.
      /// This method is intended for decoding 1D barcodes and may choose to apply sharpening.
      /// 
      /// </summary>
      /// <param name="y">The row to fetch, 0 &lt;= y &lt; bitmap height.
      /// </param>
      /// <param name="row">An optional preallocated array. If null or too small, it will be ignored.
      /// If used, the Binarizer will call BitArray.clear(). Always use the returned object.
      /// </param>
      /// <returns> The array of bits for this row (true means black).
      /// </returns>
      public BitArray getBlackRow(int y, BitArray row)
      {
         return binarizer.getBlackRow(y, row);
      }

      /// <summary> Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive
      /// and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or
      /// may not apply sharpening. Therefore, a row from this matrix may not be identical to one
      /// fetched using getBlackRow(), so don't mix and match between them.
      /// 
      /// </summary>
      /// <returns> The 2D array of bits for the image (true means black).
      /// </returns>
      public BitMatrix BlackMatrix
      {
         get
         {
            // The matrix is created on demand the first time it is requested, then cached. There are two
            // reasons for this:
            // 1. This work will never be done if the caller only installs 1D Reader objects, or if a
            //    1D Reader finds a barcode before the 2D Readers run.
            // 2. This work will only be done once even if the caller installs multiple 2D Readers.
            if (matrix == null)
            {
               matrix = binarizer.BlackMatrix;
            }
            return matrix;
         }
      }

      /// <returns> Whether this bitmap can be cropped.
      /// </returns>
      public bool CropSupported
      {
         get
         {
            return binarizer.LuminanceSource.CropSupported;
         }

      }

      /// <summary> Returns a new object with cropped image data. Implementations may keep a reference to the
      /// original data rather than a copy. Only callable if isCropSupported() is true.
      /// 
      /// </summary>
      /// <param name="left">The left coordinate, 0 &lt;= left &lt; getWidth().
      /// </param>
      /// <param name="top">The top coordinate, 0 &lt;= top &lt;= getHeight().
      /// </param>
      /// <param name="width">The width of the rectangle to crop.
      /// </param>
      /// <param name="height">The height of the rectangle to crop.
      /// </param>
      /// <returns> A cropped version of this object.
      /// </returns>
      public BinaryBitmap crop(int left, int top, int width, int height)
      {
         var newSource = binarizer.LuminanceSource.crop(left, top, width, height);
         return new BinaryBitmap(binarizer.createBinarizer(newSource));
      }

      /// <returns> Whether this bitmap supports counter-clockwise rotation.
      /// </returns>
      public bool RotateSupported
      {
         get
         {
            return binarizer.LuminanceSource.RotateSupported;
         }

      }

      /// <summary>
      /// Returns a new object with rotated image data by 90 degrees counterclockwise.
      /// Only callable if {@link #isRotateSupported()} is true.
      /// </summary>
      /// <returns> A rotated version of this object.
      /// </returns>
      public BinaryBitmap rotateCounterClockwise()
      {
         var newSource = binarizer.LuminanceSource.rotateCounterClockwise();
         return new BinaryBitmap(binarizer.createBinarizer(newSource));
      }

      /// <summary>
      /// Returns a new object with rotated image data by 45 degrees counterclockwise.
      /// Only callable if {@link #isRotateSupported()} is true.
      /// </summary>
      /// <returns>A rotated version of this object.</returns>
      public BinaryBitmap rotateCounterClockwise45()
      {
         LuminanceSource newSource = binarizer.LuminanceSource.rotateCounterClockwise45();
         return new BinaryBitmap(binarizer.createBinarizer(newSource));
      }

      /// <summary>
      /// Returns a <see cref="System.String"/> that represents this instance.
      /// </summary>
      /// <returns>
      /// A <see cref="System.String"/> that represents this instance.
      /// </returns>
      public override string ToString()
      {
         var blackMatrix = BlackMatrix;
         return blackMatrix != null ? blackMatrix.ToString() : String.Empty;
      }
   }
}

================================================
FILE: shadowsocks-csharp/3rd/zxing/BitmapLuminanceSource.cs
================================================
/*
* Copyright 2012 ZXing.Net authors
*
* 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
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/

using System;
using System.Drawing.Imaging;
using System.Drawing;
using System.Runtime.InteropServices;

namespace ZXing
{
   public partial class BitmapLuminanceSource : BaseLuminanceSource
   {
      /// <summary>
      /// Initializes a new instance of the <see cref="BitmapLuminanceSource"/> class.
      /// </summary>
      /// <param name="width">The width.</param>
      /// <param name="height">The height.</param>
      protected BitmapLuminanceSource(int width, int height)
         : base(width, height)
      {
      }

      /// <summary>
      /// Initializes a new instance of the <see cref="BitmapLuminanceSource"/> class
      /// with the image of a Bitmap instance
      /// </summary>
      /// <param name="bitmap">The bitmap.</param>
      public BitmapLuminanceSource(Bitmap bitmap)
         : base(bitmap.Width, bitmap.Height)
      {
         var height = bitmap.Height;
         var width = bitmap.Width;

         // In order to measure pure decoding speed, we convert the entire image to a greyscale array
         // The underlying raster of image consists of bytes with the luminance values
#if WindowsCE
         var data = bitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
#else
         var data = bitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadOnly, bitmap.PixelFormat);
#endif
         try
         {
            var stride = Math.Abs(data.Stride);
            var pixelWidth = stride/width;

            if (pixelWidth > 4)
            {
               // old slow way for unsupported bit depth
               Color c;
               for (int y = 0; y < height; y++)
               {
                  int offset = y*width;
                  for (int x = 0; x < width; x++)
                  {
                     c = bitmap.GetPixel(x, y);
                     luminances[offset + x] = (byte)((RChannelWeight * c.R + GChannelWeight * c.G + BChannelWeight * c.B) >> ChannelWeight);
                  }
               }
            }
            else
            {
               var strideStep = data.Stride;
               var buffer = new byte[stride];
               var ptrInBitmap = data.Scan0;

#if !WindowsCE
               // prepare palette for 1 and 8 bit indexed bitmaps
               var luminancePalette = new byte[bitmap.Palette.Entries.Length];
               for (var index = 0; index < bitmap.Palette.Entries.Length; index++)
               {
                  var color = bitmap.Palette.Entries[index];
                  luminancePalette[index] = (byte) ((RChannelWeight*color.R +
                                                     GChannelWeight*color.G +
                                                     BChannelWeight*color.B) >> ChannelWeight);
               }
               if (bitmap.PixelFormat == PixelFormat.Format32bppArgb ||
                   bitmap.PixelFormat == PixelFormat.Format32bppPArgb)
               {
                  pixelWidth = 40;
               }
               if ((int)bitmap.PixelFormat == 8207 ||
                   (bitmap.Flags & (int)ImageFlags.ColorSpaceCmyk) == (int)ImageFlags.ColorSpaceCmyk)
               {
                  pixelWidth = 41;
               }
#endif

               for (int y = 0; y < height; y++)
               {
                  // copy a scanline not the whole bitmap because of memory usage
                  Marshal.Copy(ptrInBitmap, buffer, 0, stride);
#if NET40
                  ptrInBitmap = IntPtr.Add(ptrInBitmap, strideStep);
#else
                  ptrInBitmap = new IntPtr(ptrInBitmap.ToInt64() + strideStep);
#endif
                  var offset = y*width;
                  switch (pixelWidth)
                  {
#if !WindowsCE
                     case 0:
                        for (int x = 0; x*8 < width; x++)
                        {
                           for (int subX = 0; subX < 8 && 8*x + subX < width; subX++)
                           {
                              var index = (buffer[x] >> (7 - subX)) & 1;
                              luminances[offset + 8*x + subX] = luminancePalette[index];
                           }
                        }
                        break;
                     case 1:
                        for (int x = 0; x < width; x++)
                        {
                           luminances[offset + x] = luminancePalette[buffer[x]];
                        }
                        break;
#endif
                     case 2:
                        // should be RGB565 or RGB555, assume RGB565
                        {
                           var maxIndex = 2*width;
                           for (int index = 0; index < maxIndex; index += 2)
                           {
                              var byte1 = buffer[index];
                              var byte2 = buffer[index + 1];

                              var b5 = byte1 & 0x1F;
                              var g5 = (((byte1 & 0xE0) >> 5) | ((byte2 & 0x03) << 3)) & 0x1F;
                              var r5 = (byte2 >> 2) & 0x1F;
                              var r8 = (r5*527 + 23) >> 6;
                              var g8 = (g5*527 + 23) >> 6;
                              var b8 = (b5*527 + 23) >> 6;

                              luminances[offset] = (byte)((RChannelWeight * r8 + GChannelWeight * g8 + BChannelWeight * b8)  >> ChannelWeight);
                              offset++;
                           }
                        }
                        break;
                     case 3:
                        {
                           var maxIndex = width*3;
                           for (int x = 0; x < maxIndex; x += 3)
                           {
                              var luminance = (byte) ((BChannelWeight*buffer[x] +
                                                       GChannelWeight*buffer[x + 1] +
                                                       RChannelWeight*buffer[x + 2]) >> ChannelWeight);
                              luminances[offset] = luminance;
                              offset++;
                           }
                        }
                        break;
                     case 4:
                        // 4 bytes without alpha channel value
                        {
                           var maxIndex = 4*width;
                           for (int x = 0; x < maxIndex; x += 4)
                           {
                              var luminance = (byte) ((BChannelWeight*buffer[x] +
                                                       GChannelWeight*buffer[x + 1] +
                                                       RChannelWeight*buffer[x + 2]) >> ChannelWeight);

                              luminances[offset] = luminance;
                              offset++;
                           }
                        }
                        break;
                     case 40:
                        // with alpha channel; some barcodes are completely black if you
                        // only look at the r, g and b channel but the alpha channel controls
                        // the view
                        {
                           var maxIndex = 4*width;
                           for (int x = 0; x < maxIndex; x += 4)
                           {
                              var luminance = (byte) ((BChannelWeight*buffer[x] +
                                                       GChannelWeight*buffer[x + 1] +
                                                       RChannelWeight*buffer[x + 2]) >> ChannelWeight);

                              // calculating the resulting luminance based upon a white background
                              // var alpha = buffer[x * pixelWidth + 3] / 255.0;
                              // luminance = (byte)(luminance * alpha + 255 * (1 - alpha));
                              var alpha = buffer[x + 3];
                              luminance = (byte) (((luminance*alpha) >> 8) + (255*(255 - alpha) >> 8) + 1);
                              luminances[offset] = luminance;
                              offset++;
                           }
                        }
                        break;
                     case 41:
                        // CMYK color space
                        {
                           var maxIndex = 4 * width;
                           for (int x = 0; x < maxIndex; x += 4)
                           {
                              var luminance = (byte) (255 - ((BChannelWeight*buffer[x] +
                                                              GChannelWeight*buffer[x + 1] +
                                                              RChannelWeight*buffer[x + 2]) >> ChannelWeight));
                              // Ignore value of k at the moment
                              luminances[offset] = luminance;
                              offset++;
                           }
                        }
                        break;
                     default:
                        throw new NotSupportedException();
                  }
               }
            }
         }
         finally
         {
            bitmap.UnlockBits(data);
         }
      }

      /// <summary>
      /// Should create a new luminance source with the right class type.
      /// The method is used in methods crop and rotate.
      /// </summary>
      /// <param name="newLuminances">The new luminances.</param>
      /// <param name="width">The width.</param>
      /// <param name="height">The height.</param>
      /// <returns></returns>
      protected override LuminanceSource CreateLuminanceSource(byte[] newLuminances, int width, int height)
      {
         return new BitmapLuminanceSource(width, height) { luminances = newLuminances };
      }
   }
}

================================================
FILE: shadowsocks-csharp/3rd/zxing/DecodeHintType.cs
================================================
/*
* Copyright 2007 ZXing authors
*
* 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
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/

using System;
using System.Collections.Generic;

namespace ZXing
{
   /// <summary>
   /// Encapsulates a type of hint that a caller may pass to a barcode reader to help it
   /// more quickly or accurately decode it. It is up to implementations to decide what,
   /// if anything, to do with the information that is supplied.
   /// <seealso cref="Reader.decode(BinaryBitmap, IDictionary{DecodeHintType, object})" />
   /// </summary>
   /// <author>Sean Owen</author>
   /// <author>dswitkin@google.com (Daniel Switkin)</author>
   public enum DecodeHintType
   {
      /// <summary>
      /// Unspecified, application-specific hint. Maps to an unspecified <see cref="System.Object" />.
      /// </summary>
      OTHER,

      /// <summary>
      /// Image is a pure monochrome image of a barcode. Doesn't matter what it maps to;
      /// use <see cref="bool" /> = true.
      /// </summary>
      PURE_BARCODE,

      /// <summary>
      /// Image is known to be of one of a few possible formats.
      /// Maps to a <see cref="System.Collections.ICollection" /> of <see cref="BarcodeFormat" />s.
      /// </summary>
      POSSIBLE_FORMATS,

      /// <summary>
      /// Spend more time to try to find a barcode; optimize for accuracy, not speed.
      /// Doesn't matter what it maps to; use <see cref="bool" /> = true.
      /// </summary>
      TRY_HARDER,

      /// <summary>
      /// Specifies what character encoding to use when decoding, where applicable (type String)
      /// </summary>
      CHARACTER_SET,

      /// <summary>
      /// Allowed lengths of encoded data -- reject anything else. Maps to an int[].
      /// </summary>
      ALLOWED_LENGTHS,

      /// <summary>
      /// Assume Code 39 codes employ a check digit. Maps to <see cref="bool" />.
      /// </summary>
      ASSUME_CODE_39_CHECK_DIGIT,

      /// <summary>
      /// The caller needs to be notified via callback when a possible <see cref="ResultPoint" />
      /// is found. Maps to a <see cref="ResultPointCallback" />.
      /// </summary>
      NEED_RESULT_POINT_CALLBACK,

      /// <summary>
      /// Assume MSI codes employ a check digit. Maps to <see cref="bool" />.
      /// </summary>
      ASSUME_MSI_CHECK_DIGIT,

      /// <summary>
      /// if Code39 could be detected try to use extended mode for full ASCII character set
      /// Maps to <see cref="bool" />.
      /// </summary>
      USE_CODE_39_EXTENDED_MODE,

      /// <summary>
      /// Don't fail if a Code39 is detected but can't be decoded in extended mode.
      /// Return the raw Code39 result instead. Maps to <see cref="bool" />.
      /// </summary>
      RELAXED_CODE_39_EXTENDED_MODE,

      /// <summary>
      /// 1D readers supporting rotation with TRY_HARDER enabled.
      /// But BarcodeReader class can do auto-rotating for 1D and 2D codes.
      /// Enabling that option prevents 1D readers doing double rotation.
      /// BarcodeReader enables that option automatically if "global" auto-rotation is enabled.
      /// Maps to <see cref="bool" />.
      /// </summary>
      TRY_HARDER_WITHOUT_ROTATION,

      /// <summary>
      /// Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed.
      /// For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to;
      /// use <see cref="bool" />.
      /// </summary>
      ASSUME_GS1,

      /// <summary>
      /// If true, return the start and end digits in a Codabar barcode instead of stripping them. They
      /// are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them
      /// to not be. Doesn't matter what it maps to; use <see cref="bool" />.
      /// </summary>
      RETURN_CODABAR_START_END,

      /// <summary>
      /// Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this.
      /// Maps to an <see cref="Array.int" /> of the allowed extension lengths, for example [2], [5], or [2, 5].
      /// If it is optional to have an extension, do not set this hint. If this is set,
      /// and a UPC or EAN barcode is found but an extension is not, then no result will be returned
      /// at all.
      /// </summary>
      ALLOWED_EAN_EXTENSIONS
   }
}

================================================
FILE: shadowsocks-csharp/3rd/zxing/EncodeHintType.cs
================================================
/*
* Copyright 2008 ZXing authors
*
* 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
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/

namespace ZXing
{
   /// <summary>
   /// These are a set of hints that you may pass to Writers to specify their behavior.
   /// </summary>
   /// <author>dswitkin@google.com (Daniel Switkin)</author>
   public enum EncodeHintType
   {
      /// <summary>
      /// Specifies the width of the barcode image
      /// type: <see cref="System.Int32" />
      /// </summary>
      WIDTH,

      /// <summary>
      /// Specifies the height of the barcode image
      /// type: <see cref="System.Int32" />
      /// </summary>
      HEIGHT,

      /// <summary>
      /// Don't put the content string into the output image.
      /// type: <see cref="System.Boolean" />
      /// </summary>
      PURE_BARCODE,

      /// <summary>
      /// Specifies what degree of error correction to use, for example in QR Codes.
      /// Type depends on the encoder. For example for QR codes it's type
      /// <see cref="ZXing.QrCode.Internal.ErrorCorrectionLevel" />
      /// For Aztec it is of type <see cref="System.Int32" />, representing the minimal percentage of error correction words. 
      /// Note: an Aztec symbol should have a minimum of 25% EC words.
      /// For PDF417 it is of type <see cref="ZXing.PDF417.Internal.PDF417ErrorCorrectionLevel"/> or <see cref="System.Int32" /> (between 0 and 8),
      /// </summary>
      ERROR_CORRECTION,

      /// <summary>
      /// Specifies what character encoding to use where applicable.
      /// type: <see cref="System.String" />
      /// </summary>
      CHARACTER_SET,

      /// <summary>
      /// Specifies margin, in pixels, to use when generating the barcode. The meaning can vary
      /// by format; for example it controls margin before and after the barcode horizontally for
      /// most 1D formats.
      /// type: <see cref="System.Int32" />
      /// </summary>
      MARGIN,

      /// <summary>
      /// Specifies whether to use compact mode for PDF417.
      /// type: <see cref="System.Boolean" />
      /// </summary>
      PDF417_COMPACT,

      /// <summary>
      /// Specifies what compaction mode to use for PDF417.
      /// type: <see cref="ZXing.PDF417.Internal.Compaction" />
      /// </summary>
      PDF417_COMPACTION,

      /// <summary>
      /// Specifies the minimum and maximum number of rows and columns for PDF417.
      /// type: <see cref="ZXing.PDF417.Internal.Dimensions" />
      /// </summary>
      PDF417_DIMENSIONS,

      /// <summary>
      /// Don't append ECI segment.
      /// That is against the specification of QR Code but some
      /// readers have problems if the charset is switched from
      /// ISO-8859-1 (default) to UTF-8 with the necessary ECI segment.
      /// If you set the property to true you can use UTF-8 encoding
      /// and the ECI segment is omitted.
      /// type: <see cref="System.Boolean" />
      /// </summary>
      DISABLE_ECI,

      /// <summary>
      /// Specifies the matrix shape for Data Matrix (type <see cref="ZXing.Datamatrix.Encoder.SymbolShapeHint"/>)
      /// </summary>
      DATA_MATRIX_SHAPE,

      /// <summary>
      /// Specifies a minimum barcode size (type <see cref="ZXing.Dimension"/>). Only applicable to Data Matrix now.
      /// </summary>
      MIN_SIZE,

      /// <summary>
      /// Specifies a maximum barcode size (type <see cref="ZXing.Dimension"/>). Only applicable to Data Matrix now.
      /// </summary>
      MAX_SIZE,

      /// <summary>
      /// if true, don't switch to codeset C for numbers
      /// </summary>
      CODE128_FORCE_CODESET_B,

      /// <summary>
      /// Specifies the default encodation for Data Matrix (type <see cref="ZXing.Datamatrix.Encoder.Encodation"/>)
      /// Make sure that the content fits into the encodation value, otherwise there will be an exception thrown.
      /// standard value: Encodation.ASCII
      /// </summary>
      DATA_MATRIX_DEFAULT_ENCODATION,

      /// <summary>
      /// Specifies the required number of layers for an Aztec code:
      /// a negative number (-1, -2, -3, -4) specifies a compact Aztec code
      /// 0 indicates to use the minimum number of layers (the default)
      /// a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code
      /// </summary>
      AZTEC_LAYERS,
   }
}

================================================
FILE: shadowsocks-csharp/3rd/zxing/LuminanceSource.cs
================================================
/*
* Copyright 2009 ZXing authors
*
* 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
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/

using System;
using System.Text;

namespace ZXing
{
   /// <summary> The purpose of this class hierarchy is to abstract different bitmap implementations across
   /// platforms into a standard interface for requesting greyscale luminance values. The interface
   /// only provides immutable methods; therefore crop and rotation create copies. This is to ensure
   /// that one Reader does not modify the original luminance source and leave it in an unknown state
   /// for other Readers in the chain.
   /// </summary>
   /// <author>  dswitkin@google.com (Daniel Switkin)
   /// </author>
   /// <author>www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source 
   /// </author>
   public abstract class LuminanceSource
   {
      private int width;
      private int height;

      protected LuminanceSource(int width, int height)
      {
         this.width = width;
         this.height = height;
      }

      /// <summary> Fetches one row of luminance data from the underlying platform's bitmap. Values range from
      /// 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have
      /// to bitwise and with 0xff for each value. It is preferable for implementations of this method
      /// to only fetch this row rather than the whole image, since no 2D Readers may be installed and
      /// getMatrix() may never be called.
      /// 
      /// </summary>
      /// <param name="y">The row to fetch, 0 &lt;= y &lt; Height.
      /// </param>
      /// <param name="row">An optional preallocated array. If null or too small, it will be ignored.
      /// Always use the returned object, and ignore the .length of the array.
      /// </param>
      /// <returns> An array containing the luminance data.
      /// </returns>
      public abstract byte[] getRow(int y, byte[] row);

      /// <summary> Fetches luminance data for the underlying bitmap. Values should be fetched using:
      /// int luminance = array[y * width + x] &amp; 0xff;
      /// 
      /// </summary>
      /// <returns> A row-major 2D array of luminance values. Do not use result.length as it may be
      /// larger than width * height bytes on some platforms. Do not modify the contents
      /// of the result.
      /// </returns>
      public abstract byte[] Matrix { get; }

      /// <returns> The width of the bitmap.</returns>
      virtual public int Width
      {
         get
         {
            return width;
         }
         protected set
         {
            width = value;
         }
      }

      /// <returns> The height of the bitmap.</returns>
      virtual public int Height
      {
         get
         {
            return height;
         }
         protected set
         {
            height = value;
         }
      }

      /// <returns> Whether this subclass supports cropping.</returns>
      virtual public bool CropSupported
      {
         get
         {
            return false;
         }
      }

      /// <summary> Returns a new object with cropped image data. Implementations may keep a reference to the
      /// original data rather than a copy. Only callable if CropSupported is true.
      /// 
      /// </summary>
      /// <param name="left">The left coordinate, 0 &lt;= left &lt; Width.
      /// </param>
      /// <param name="top">The top coordinate, 0 &lt;= top &lt;= Height.
      /// </param>
      /// <param name="width">The width of the rectangle to crop.
      /// </param>
      /// <param name="height">The height of the rectangle to crop.
      /// </param>
      /// <returns> A cropped version of this object.
      /// </returns>
      public virtual LuminanceSource crop(int left, int top, int width, int height)
      {
         throw new NotSupportedException("This luminance source does not support cropping.");
      }

      /// <returns> Whether this subclass supports counter-clockwise rotation.</returns>
      virtual public bool RotateSupported
      {
         get
         {
            return false;
         }
      }

      /// <summary>
      /// Returns a new object with rotated image data by 90 degrees counterclockwise.
      /// Only callable if {@link #isRotateSupported()} is true.
      /// </summary>
      /// <returns> A rotated version of this object.
      /// </returns>
      public virtual LuminanceSource rotateCounterClockwise()
      {
         throw new NotSupportedException("This luminance source does not support rotation.");
      }

      /// <summary>
      /// Returns a new object with rotated image data by 45 degrees counterclockwise.
      /// Only callable if {@link #isRotateSupported()} is true.
      /// </summary>
      /// <returns>A rotated version of this object.</returns>
      public virtual LuminanceSource rotateCounterClockwise45()
      {
         throw new NotSupportedException("This luminance source does not support rotation by 45 degrees.");
      }

      /// <summary>
      /// </summary>
      /// <returns>Whether this subclass supports invertion.</returns>
      virtual public bool InversionSupported
      {
         get
         {
            return false;
         }
      }

      override public String ToString()
      {
         var row = new byte[width];
         var result = new StringBuilder(height * (width + 1));
         for (int y = 0; y < height; y++)
         {
            row = getRow(y, row);
            for (int x = 0; x < width; x++)
            {
               int luminance = row[x] & 0xFF;
               char c;
               if (luminance < 0x40)
               {
                  c = '#';
               }
               else if (luminance < 0x80)
               {
                  c = '+';
               }
               else if (luminance < 0xC0)
               {
                  c = '.';
               }
               else
               {
                  c = ' ';
               }
               result.Append(c);
            }
            result.Append('\n');
         }
         return result.ToString();
      }
   }
}

================================================
FILE: shadowsocks-csharp/3rd/zxing/Result.cs
================================================
/*
* Copyright 2007 ZXing authors
*
* 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
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* 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.
*/

using System;
using System.Collections.Generic;

namespace ZXing
{
   /// <summary>
   /// Encapsulates the result of decoding a barcode within an image.
   /// </summary>
   public sealed class Result
   {
      /// <returns>raw text encoded by the barcode, if applicable, otherwise <code>null</code></returns>
      public String Text { get; private set; }

      /// <returns>raw bytes encoded by the barcode, if applicable, otherwise <code>null</code></returns>
      public byte[] RawBytes { get; private set; }

      /// <returns>
      /// points related to the barcode in the image. These are typically points
      /// identifying finder patterns or the corners of the barcode. The exact meaning is
      /// specific to the type of barcode that was decoded.
      /// </returns>
      public ResultPoint[] ResultPoints { get; private set; }

      /// <returns>{@link BarcodeFormat} representing the format of the barcode that was decoded</returns>
      public BarcodeFormat BarcodeFormat { get; private set; }

      /// <returns>
      /// {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be
      /// <code>null</code>. This contains optional metadata about what was detected about the barcode,
      /// like orientation.
      /// </returns>
      public IDictionary<ResultMetadataType, object> ResultMetadata { get; private set; }

      /// <summary>
      /// Gets the timestamp.
      /// </summary>
      public long Timestamp { get; private set; }

      /// <summary>
      /// Initializes a new instance of the <see cref="Result"/> class.
      /// </summary>
      /// <param name="text">The text.</param>
      /// <param name="rawBytes">The raw bytes.</param>
      /// <param name="resultPoints">The result points.</param>
      /// <param name="format">The format.</param>
      public Result(String text,
                    byte[] rawBytes,
                    ResultPoint[] resultPoints,
                    BarcodeFormat format)
         : this(text, rawBytes, resultPoints, format, DateTime.Now.Ticks)
      {
      }

      /// <summary>
      /// Initializes a new instance of the <see cref="Result"/> class.
      /// </summary>
      /// <param name="text">The text.</param>
      /// <param name="rawBytes">The raw bytes.</param>
      /// <param name="resultPoints">The result points.</param>
      /// <param name="format">The format.</param>
      /// <param name="timestamp">The timestamp.</param>
      public Result(String text, byte[] rawBytes, ResultPoint[] resultPoints, BarcodeFormat format, long timestamp)
      {
         if (text == null && rawBytes == null)
         {
            throw new ArgumentException("Text and bytes are null");
         }
         Text = text;
         RawBytes = rawBytes;
         ResultPoints = resultPoints;
         BarcodeFormat = format;
         ResultMetadata = null;
         Timestamp = timestamp;
      }

      /// <summary>
      /// Adds one metadata to the result
      /// </summary>
      /// <param name="type">The type.</param>
      /// <param name="value">The value.</param>
      public void putMetadata(ResultMetadataType type, Object value)
      {
         if (ResultMetadata == null)
         {
            ResultMetadata = new Dictionary<ResultMetadataType, object>();
         }
         ResultMetadata[type] = value;
      }

      /// <summary>
      /// Adds a list of metadata to the result
      /// </summary>
      /// <param name="metadata">The metadata.</param>
      public void putAllMetadata(IDictionary<ResultMetadataType, object> metadata)
      {
         if (metadata != null)
         {
            if (ResultMetadata == null)
            {
               ResultMetadata = metadata;
            }
            else
            {
               foreach (var entry in metadata)
                  ResultMetadata[entry.Key] = entry.Value;
            }
         }
      }

      /// <summary>
      /// Adds the result points.
      /// </summary>
      /// <param name="newPoints">The new points.</param>
      public void addResultPoints(ResultPoint[] newPoints)
      {
         var oldPoints = ResultPoints;
         if (oldPoints == null)
         {
            ResultPoints = newPoints;
         }
         else if (newPoints != null && newPoints.Length > 0)
         {
            var allPoints = new ResultPoint[oldPoints.Length + newPoints.Length];
            Array.Copy(oldPoints, 0, allPoints, 0, oldPoints.Length);
            Array.Copy(newPoints, 0, allPoints, oldPoints.Length, newPoints.Length);
            ResultPoints = allPoints;
         }
      }

      /// <summary>
      /// Returns a <see cref="System.String"/> that re
Download .txt
gitextract_vj9icqh0/

├── .github/
│   └── issue_template.md
├── .gitignore
├── CHANGES
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── appveyor.yml
├── packaging/
│   └── upload.sh
├── shadowsocks-csharp/
│   ├── 3rd/
│   │   ├── SimpleJson.cs
│   │   ├── opendns/
│   │   │   ├── DnsQuery.cs
│   │   │   ├── DnsResponse.cs
│   │   │   ├── Enum.cs
│   │   │   └── RR/
│   │   │       ├── Address.cs
│   │   │       ├── MX.cs
│   │   │       ├── ResourceRecord.cs
│   │   │       ├── ResourceRecordCollection.cs
│   │   │       └── SOA.cs
│   │   └── zxing/
│   │       ├── BarcodeFormat.cs
│   │       ├── BaseLuminanceSource.cs
│   │       ├── Binarizer.cs
│   │       ├── BinaryBitmap.cs
│   │       ├── BitmapLuminanceSource.cs
│   │       ├── DecodeHintType.cs
│   │       ├── EncodeHintType.cs
│   │       ├── LuminanceSource.cs
│   │       ├── Result.cs
│   │       ├── ResultMetadataType.cs
│   │       ├── ResultPoint.cs
│   │       ├── ResultPointCallback.cs
│   │       ├── WriterException.cs
│   │       ├── common/
│   │       │   ├── BitArray.cs
│   │       │   ├── BitMatrix.cs
│   │       │   ├── BitSource.cs
│   │       │   ├── DecoderResult.cs
│   │       │   ├── DefaultGridSampler.cs
│   │       │   ├── DetectorResult.cs
│   │       │   ├── GlobalHistogramBinarizer.cs
│   │       │   ├── GridSampler.cs
│   │       │   ├── HybridBinarizer.cs
│   │       │   ├── PerspectiveTransform.cs
│   │       │   ├── StringUtils.cs
│   │       │   ├── detector/
│   │       │   │   └── MathUtils.cs
│   │       │   └── reedsolomon/
│   │       │       ├── GenericGF.cs
│   │       │       ├── GenericGFPoly.cs
│   │       │       ├── ReedSolomonDecoder.cs
│   │       │       └── ReedSolomonEncoder.cs
│   │       └── qrcode/
│   │           ├── QRCodeReader.cs
│   │           ├── decoder/
│   │           │   ├── BitMatrixParser.cs
│   │           │   ├── DataBlock.cs
│   │           │   ├── DataMask.cs
│   │           │   ├── DecodedBitStreamParser.cs
│   │           │   ├── Decoder.cs
│   │           │   ├── ErrorCorrectionLevel.cs
│   │           │   ├── FormatInformation.cs
│   │           │   ├── Mode.cs
│   │           │   ├── QRCodeDecoderMetaData.cs
│   │           │   └── Version.cs
│   │           ├── detector/
│   │           │   ├── AlignmentPattern.cs
│   │           │   ├── AlignmentPatternFinder.cs
│   │           │   ├── Detector.cs
│   │           │   ├── FinderPattern.cs
│   │           │   ├── FinderPatternFinder.cs
│   │           │   └── FinderPatternInfo.cs
│   │           └── encoder/
│   │               ├── BlockPair.cs
│   │               ├── ByteMatrix.cs
│   │               ├── Encoder.cs
│   │               ├── MaskUtil.cs
│   │               ├── MatrixUtil.cs
│   │               └── QRCode.cs
│   ├── Controller/
│   │   ├── APIServer.cs
│   │   ├── AutoStartup.cs
│   │   ├── FileManager.cs
│   │   ├── GfwListUpdater.cs
│   │   ├── HttpPortForwarder.cs
│   │   ├── HttpProxy.cs
│   │   ├── HttpProxyRunner.cs
│   │   ├── I18N.cs
│   │   ├── Listener.cs
│   │   ├── Local.cs
│   │   ├── Logging.cs
│   │   ├── PACServer.cs
│   │   ├── ProxyAuth.cs
│   │   ├── ProxySocket.cs
│   │   ├── ShadowsocksController.cs
│   │   ├── Socks5Forwarder.cs
│   │   ├── SpeedTest.cs
│   │   ├── SystemProxy.cs
│   │   ├── UpdateChecker.cs
│   │   └── UpdateFreeNode.cs
│   ├── Data/
│   │   ├── cn.txt
│   │   ├── privoxy_conf.txt
│   │   ├── user-rule.txt
│   │   └── zh-tw.txt
│   ├── Encryption/
│   │   ├── EncryptorBase.cs
│   │   ├── EncryptorFactory.cs
│   │   ├── IEncryptor.cs
│   │   ├── IVEncryptor.cs
│   │   ├── Libcrypto.cs
│   │   ├── LibcryptoEncryptor.cs
│   │   ├── MbedTLS.cs
│   │   ├── MbedTLSEncryptor.cs
│   │   ├── RSA.cs
│   │   ├── Sodium.cs
│   │   └── SodiumEncryptor.cs
│   ├── Model/
│   │   ├── Configuration.cs
│   │   ├── Host.cs
│   │   ├── IPRangeSet.cs
│   │   ├── IPSegment.cs
│   │   ├── LRUCache.cs
│   │   ├── MinSearchTree.cs
│   │   ├── Server.cs
│   │   ├── ServerSelectStrategy.cs
│   │   └── ServerSpeedLog.cs
│   ├── Obfs/
│   │   ├── Auth.cs
│   │   ├── AuthAkarin.cs
│   │   ├── AuthChain.cs
│   │   ├── HttpSimpleObfs.cs
│   │   ├── IObfs.cs
│   │   ├── ObfsBase.cs
│   │   ├── ObfsFactory.cs
│   │   ├── Plain.cs
│   │   └── VerifySimpleObfs.cs
│   ├── Program.cs
│   ├── Properties/
│   │   ├── AssemblyInfo.cs
│   │   ├── Resources.Designer.cs
│   │   └── Resources.resx
│   ├── Util/
│   │   ├── Base64.cs
│   │   ├── CRC.cs
│   │   ├── EnvCheck.cs
│   │   ├── ServerName.cs
│   │   └── Util.cs
│   ├── View/
│   │   ├── ConfigForm.Designer.cs
│   │   ├── ConfigForm.cs
│   │   ├── ConfigForm.resx
│   │   ├── InputPassword.Designer.cs
│   │   ├── InputPassword.cs
│   │   ├── InputPassword.resx
│   │   ├── LogForm.Designer.cs
│   │   ├── LogForm.cs
│   │   ├── LogForm.resx
│   │   ├── MenuViewController.cs
│   │   ├── PortSettingsForm.Designer.cs
│   │   ├── PortSettingsForm.cs
│   │   ├── PortSettingsForm.resx
│   │   ├── QRCodeSplashForm.cs
│   │   ├── ResetPassword.Designer.cs
│   │   ├── ResetPassword.cs
│   │   ├── ResetPassword.resx
│   │   ├── ServerLogForm.Designer.cs
│   │   ├── ServerLogForm.cs
│   │   ├── ServerLogForm.resx
│   │   ├── SettingsForm.Designer.cs
│   │   ├── SettingsForm.cs
│   │   ├── SettingsForm.resx
│   │   ├── ShowTextForm.Designer.cs
│   │   ├── ShowTextForm.cs
│   │   ├── ShowTextForm.resx
│   │   ├── SubscribeForm.Designer.cs
│   │   ├── SubscribeForm.cs
│   │   └── SubscribeForm.resx
│   ├── app.config
│   ├── app.manifest
│   ├── shadowsocks-csharp-console.csproj
│   ├── shadowsocks-csharp.csproj
│   ├── shadowsocks-csharp4.0.csproj
│   └── ssr-win-4.0.xml
├── shadowsocks-csharp.sln
└── test/
    ├── Properties/
    │   └── AssemblyInfo.cs
    ├── ServerTest.cs
    ├── UnitTest.cs
    └── test.csproj
Download .txt
SYMBOL INDEX (1750 symbols across 138 files)

FILE: shadowsocks-csharp/3rd/SimpleJson.cs
  class JsonArray (line 71) | [EditorBrowsable(EditorBrowsableState.Never)]
    method JsonArray (line 83) | public JsonArray() { }
    method JsonArray (line 89) | public JsonArray(int capacity) : base(capacity) { }
    method ToString (line 95) | public override string ToString()
  method Add (line 225) | public void Add(KeyValuePair<string, object> item)
  method Clear (line 233) | public void Clear()
  method Contains (line 245) | public bool Contains(KeyValuePair<string, object> item)
  method CopyTo (line 255) | public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
  method Remove (line 292) | public bool Remove(KeyValuePair<string, object> item)
  method GetEnumerator (line 301) | public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
  method GetEnumerator (line 312) | IEnumerator IEnumerable.GetEnumerator()
  method ToString (line 323) | public override string ToString()
  method TryConvert (line 337) | public override bool TryConvert(ConvertBinder binder, out object result)
  method TryDeleteMember (line 369) | public override bool TryDeleteMember(DeleteMemberBinder binder)
  method TryGetIndex (line 387) | public override bool TryGetIndex(GetIndexBinder binder, object[] indexes...
  method TryGetMember (line 406) | public override bool TryGetMember(GetMemberBinder binder, out object res...
  method TrySetIndex (line 427) | public override bool TrySetIndex(SetIndexBinder binder, object[] indexes...
  method TrySetMember (line 446) | public override bool TrySetMember(SetMemberBinder binder, object value)
  method GetDynamicMemberNames (line 462) | public override IEnumerable<string> GetDynamicMemberNames()
  class SimpleJson (line 485) | internal
    method DeserializeObject (line 511) | public static object DeserializeObject(string json)
    method TryDeserializeObject (line 531) | public static bool TryDeserializeObject(string json, out object @object)
    method DeserializeObject (line 546) | public static object DeserializeObject(string json, Type type, IJsonSe...
    method DeserializeObject (line 560) | public static object DeserializeObject(string json, Type type)
    method DeserializeObject (line 565) | public static T DeserializeObject<T>(string json, IJsonSerializerStrat...
    method DeserializeObject (line 570) | public static T DeserializeObject<T>(string json)
    method SerializeObject (line 581) | public static string SerializeObject(object json, IJsonSerializerStrat...
    method SerializeObject (line 588) | public static string SerializeObject(object json)
    method ParseObject (line 593) | protected static IDictionary<string, object> ParseObject(char[] json, ...
    method ParseArray (line 650) | protected static JsonArray ParseArray(char[] json, ref int index, ref ...
    method ParseValue (line 685) | protected static object ParseValue(char[] json, ref int index, ref boo...
    method ParseString (line 714) | protected static string ParseString(char[] json, ref int index, ref bo...
    method ConvertFromUtf32 (line 823) | private static string ConvertFromUtf32(int utf32)
    method ParseNumber (line 837) | protected static object ParseNumber(char[] json, ref int index, ref bo...
    method GetLastIndexOfNumber (line 863) | protected static int GetLastIndexOfNumber(char[] json, int index)
    method EatWhitespace (line 872) | protected static void EatWhitespace(char[] json, ref int index)
    method LookAhead (line 878) | protected static int LookAhead(char[] json, int index)
    method NextToken (line 884) | [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveCo...
    method GetIndentString (line 970) | protected static string GetIndentString(int indent)
    method SerializeValue (line 980) | protected static bool SerializeValue(IJsonSerializerStrategy jsonSeria...
    method SerializeObject (line 1020) | protected static bool SerializeObject(IJsonSerializerStrategy jsonSeri...
    method SerializeArray (line 1059) | protected static bool SerializeArray(IJsonSerializerStrategy jsonSeria...
    method SerializeString (line 1084) | protected static bool SerializeString(string aString, StringBuilder bu...
    method SerializeNumber (line 1114) | protected static bool SerializeNumber(object number, StringBuilder bui...
    method IsNumeric (line 1152) | protected static bool IsNumeric(object value)
  type IJsonSerializerStrategy (line 1222) | internal
    method SerializeNonPrimitiveObject (line 1228) | bool SerializeNonPrimitiveObject(object input, out object output);
    method DeserializeObject (line 1230) | object DeserializeObject(object value, Type type);
  method PocoJsonSerializerStrategy (line 1249) | public PocoJsonSerializerStrategy()
  method DataContractJsonSerializerStrategy (line 1505) | public DataContractJsonSerializerStrategy()
  class ReflectionUtils (line 1568) | internal
    method GetAttribute (line 1574) | public static Attribute GetAttribute(MemberInfo info, Type type)
    method GetAttribute (line 1587) | public static Attribute GetAttribute(Type objectType, Type attributeType)
    method IsTypeGenericeCollectionInterface (line 1601) | public static bool IsTypeGenericeCollectionInterface(Type type)
    method IsTypeDictionary (line 1615) | public static bool IsTypeDictionary(Type type)
    method IsNullableType (line 1634) | public static bool IsNullableType(Type type)
    method ToNullableType (line 1645) | public static object ToNullableType(object obj, Type nullableType)
  method CacheResolver (line 1685) | public CacheResolver(MemberMapLoader memberMapLoader)
  method GetNewInstance (line 1690) | [SuppressMessage("Microsoft.Usage", "CA2201:DoNotRaiseReservedExceptionT...
  method LoadMaps (line 1738) | public SafeDictionary<string, MemberMap> LoadMaps(Type type)
  method CreateDynamicMethod (line 1752) | static DynamicMethod CreateDynamicMethod(string name, Type returnType, T...
  method CreateGetHandler (line 1762) | static GetHandler CreateGetHandler(FieldInfo fieldInfo)
  method CreateSetHandler (line 1781) | static SetHandler CreateSetHandler(FieldInfo fieldInfo)
  method CreateGetHandler (line 1803) | static GetHandler CreateGetHandler(PropertyInfo propertyInfo)
  method CreateSetHandler (line 1833) | static SetHandler CreateSetHandler(PropertyInfo propertyInfo)
  class MemberMap (line 1860) | internal
    method MemberMap (line 1871) | public MemberMap(PropertyInfo propertyInfo)
    method MemberMap (line 1879) | public MemberMap(FieldInfo fieldInfo)
  class SafeDictionary (line 1890) | internal
    method TryGetValue (line 1899) | public bool TryGetValue(TKey key, out TValue value)
    method GetEnumerator (line 1909) | public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
    method Add (line 1914) | public void Add(TKey key, TValue value)

FILE: shadowsocks-csharp/3rd/opendns/DnsQuery.cs
  class DnsQuery (line 28) | public class DnsQuery
    method DnsQuery (line 54) | public DnsQuery()
    method DnsQuery (line 62) | public DnsQuery(string _Domain, Types _Type)
    method Send (line 77) | public bool Send()
    method SendQuery (line 104) | private void SendQuery(string ipAddress)
    method SendQuery2 (line 131) | private void SendQuery2(IPAddress ipAddress, int port)
    method MakeQuery (line 164) | private byte[] MakeQuery()
    method ReadResponse (line 223) | private void ReadResponse()
    method GetResourceRecord (line 277) | private void GetResourceRecord(int i, ResourceRecordCollection Container)
    method GetName (line 377) | private string GetName()
    method ExtractName (line 393) | private int ExtractName(int ResourceDataCursor, StringBuilder Name)
    method CheckForServers (line 455) | private bool CheckForServers()
    method GetDefaultServers (line 478) | private ArrayList GetDefaultServers()

FILE: shadowsocks-csharp/3rd/opendns/DnsResponse.cs
  class DnsResponse (line 24) | public class DnsResponse
    method DnsResponse (line 111) | public DnsResponse(int ID, bool AA, bool TC, bool RD, bool RA, int RC)

FILE: shadowsocks-csharp/3rd/opendns/Enum.cs
  type ResponseCodes (line 19) | public enum ResponseCodes : int
  type Types (line 34) | public enum Types : int
  type Classes (line 58) | public enum Classes : int

FILE: shadowsocks-csharp/3rd/opendns/RR/Address.cs
  class Address (line 20) | public class Address : ResourceRecord
    method Address (line 34) | public Address(string _Name, Types _Type, Classes _Class, int _TimeToL...

FILE: shadowsocks-csharp/3rd/opendns/RR/MX.cs
  class MX (line 20) | public class MX : ResourceRecord
    method MX (line 25) | public MX(string _Name, Types _Type, Classes _Class, int _TimeToLive, ...

FILE: shadowsocks-csharp/3rd/opendns/RR/ResourceRecord.cs
  class ResourceRecord (line 21) | public class ResourceRecord
    method ResourceRecord (line 29) | public ResourceRecord()
    method ResourceRecord (line 33) | public ResourceRecord(string _Name, Types _Type, Classes _Class, int _...
    method ResourceRecord (line 41) | public ResourceRecord(string _Name, Types _Type, Classes _Class, int _...
    method ToString (line 50) | public override string ToString()

FILE: shadowsocks-csharp/3rd/opendns/RR/ResourceRecordCollection.cs
  class ResourceRecordCollection (line 22) | public class ResourceRecordCollection : ArrayList
    type SortFields (line 24) | public enum SortFields
    method Sort (line 30) | public void Sort(SortFields sortField, bool isAscending)
    class NameComparer (line 45) | private sealed class NameComparer : IComparer
      method Compare (line 47) | public int Compare(object x, object y)
    class TTLComparer (line 55) | private sealed class TTLComparer : IComparer
      method Compare (line 57) | public int Compare(object x, object y)

FILE: shadowsocks-csharp/3rd/opendns/RR/SOA.cs
  class SOA (line 20) | public class SOA : ResourceRecord
    method SOA (line 30) | public SOA(string _Name, Types _Type, Classes _Class, int _TimeToLive,...

FILE: shadowsocks-csharp/3rd/zxing/BarcodeFormat.cs
  type BarcodeFormat (line 23) | [System.Flags]

FILE: shadowsocks-csharp/3rd/zxing/BaseLuminanceSource.cs
  class BaseLuminanceSource (line 25) | public abstract class BaseLuminanceSource : LuminanceSource
    method BaseLuminanceSource (line 45) | protected BaseLuminanceSource(int width, int height)
    method BaseLuminanceSource (line 57) | protected BaseLuminanceSource(byte[] luminanceArray, int width, int he...
    method getRow (line 76) | override public byte[] getRow(int y, byte[] row)
    method rotateCounterClockwise (line 100) | public override LuminanceSource rotateCounterClockwise()
    method rotateCounterClockwise45 (line 124) | public override LuminanceSource rotateCounterClockwise45()
    method crop (line 152) | public override LuminanceSource crop(int left, int top, int width, int...
    method CreateLuminanceSource (line 204) | protected abstract LuminanceSource CreateLuminanceSource(byte[] newLum...

FILE: shadowsocks-csharp/3rd/zxing/Binarizer.cs
  class Binarizer (line 30) | public abstract class Binarizer
    method Binarizer (line 38) | protected internal Binarizer(LuminanceSource source)
    method getBlackRow (line 70) | public abstract BitArray getBlackRow(int y, BitArray row);
    method createBinarizer (line 86) | public abstract Binarizer createBinarizer(LuminanceSource source);

FILE: shadowsocks-csharp/3rd/zxing/BinaryBitmap.cs
  class BinaryBitmap (line 32) | public sealed class BinaryBitmap
    method BinaryBitmap (line 37) | public BinaryBitmap(Binarizer binarizer)
    method getBlackRow (line 79) | public BitArray getBlackRow(int y, BitArray row)
    method crop (line 134) | public BinaryBitmap crop(int left, int top, int width, int height)
    method rotateCounterClockwise (line 157) | public BinaryBitmap rotateCounterClockwise()
    method rotateCounterClockwise45 (line 168) | public BinaryBitmap rotateCounterClockwise45()
    method ToString (line 180) | public override string ToString()

FILE: shadowsocks-csharp/3rd/zxing/BitmapLuminanceSource.cs
  class BitmapLuminanceSource (line 24) | public partial class BitmapLuminanceSource : BaseLuminanceSource
    method BitmapLuminanceSource (line 31) | protected BitmapLuminanceSource(int width, int height)
    method BitmapLuminanceSource (line 41) | public BitmapLuminanceSource(Bitmap bitmap)
    method UnlockBits (line 223) | finally

FILE: shadowsocks-csharp/3rd/zxing/DecodeHintType.cs
  type DecodeHintType (line 30) | public enum DecodeHintType

FILE: shadowsocks-csharp/3rd/zxing/EncodeHintType.cs
  type EncodeHintType (line 23) | public enum EncodeHintType

FILE: shadowsocks-csharp/3rd/zxing/LuminanceSource.cs
  class LuminanceSource (line 32) | public abstract class LuminanceSource
    method LuminanceSource (line 37) | protected LuminanceSource(int width, int height)
    method getRow (line 57) | public abstract byte[] getRow(int y, byte[] row);
    method crop (line 118) | public virtual LuminanceSource crop(int left, int top, int width, int ...
    method rotateCounterClockwise (line 138) | public virtual LuminanceSource rotateCounterClockwise()
    method rotateCounterClockwise45 (line 148) | public virtual LuminanceSource rotateCounterClockwise45()
    method ToString (line 164) | override public String ToString()

FILE: shadowsocks-csharp/3rd/zxing/Result.cs
  class Result (line 25) | public sealed class Result
    method Result (line 62) | public Result(String text,
    method Result (line 78) | public Result(String text, byte[] rawBytes, ResultPoint[] resultPoints...
    method putMetadata (line 97) | public void putMetadata(ResultMetadataType type, Object value)
    method putAllMetadata (line 110) | public void putAllMetadata(IDictionary<ResultMetadataType, object> met...
    method addResultPoints (line 130) | public void addResultPoints(ResultPoint[] newPoints)
    method ToString (line 152) | public override String ToString()

FILE: shadowsocks-csharp/3rd/zxing/ResultMetadataType.cs
  type ResultMetadataType (line 24) | public enum ResultMetadataType

FILE: shadowsocks-csharp/3rd/zxing/ResultPoint.cs
  class ResultPoint (line 29) | public class ResultPoint
    method ResultPoint (line 40) | public ResultPoint()
    method ResultPoint (line 49) | public ResultPoint(float x, float y)
    method Equals (line 87) | public override bool Equals(Object other)
    method GetHashCode (line 101) | public override int GetHashCode()
    method ToString (line 113) | public override String ToString()
    method orderBestPatterns (line 128) | public static void orderBestPatterns(ResultPoint[] patterns)
    method distance (line 176) | public static float distance(ResultPoint pattern1, ResultPoint pattern2)
    method crossProductZ (line 184) | private static float crossProductZ(ResultPoint pointA, ResultPoint poi...

FILE: shadowsocks-csharp/3rd/zxing/WriterException.cs
  class WriterException (line 26) | [Serializable]
    method WriterException (line 32) | public WriterException()
    method WriterException (line 40) | public WriterException(String message)
    method WriterException (line 50) | public WriterException(String message, Exception innerExc)

FILE: shadowsocks-csharp/3rd/zxing/common/BitArray.cs
  class BitArray (line 25) | public sealed class BitArray
    method BitArray (line 59) | public BitArray()
    method BitArray (line 65) | public BitArray(int size)
    method BitArray (line 76) | private BitArray(int[] bits, int size)
    method ensureCapacity (line 82) | private void ensureCapacity(int size)
    method numberOfTrailingZeros (line 93) | private static int numberOfTrailingZeros(int num)
    method setBulk (line 116) | public void setBulk(int i, int newBits)
    method clear (line 123) | public void clear()
    method appendBit (line 136) | public void appendBit(bool bit)
    method appendBits (line 161) | public void appendBits(int value, int numBits)
    method appendBitArray (line 174) | public void appendBitArray(BitArray other)
    method xor (line 184) | public void xor(BitArray other)
    method toBytes (line 206) | public void toBytes(int bitOffset, byte[] array, int offset, int numBy...
    method makeArray (line 223) | private static int[] makeArray(int size)
    method Equals (line 235) | public override bool Equals(Object o)
    method GetHashCode (line 256) | public override int GetHashCode()
    method Clone (line 273) | public object Clone()

FILE: shadowsocks-csharp/3rd/zxing/common/BitMatrix.cs
  class BitMatrix (line 33) | public sealed partial class BitMatrix
    method BitMatrix (line 62) | public BitMatrix(int dimension)
    method BitMatrix (line 67) | public BitMatrix(int width, int height)
    method BitMatrix (line 79) | private BitMatrix(int width, int height, int rowSize, int[] bits)
    method flip (line 120) | public void flip(int x, int y)
    method setRegion (line 138) | public void setRegion(int left, int top, int width, int height)
    method getRow (line 174) | public BitArray getRow(int y, BitArray row)
    method setRow (line 197) | public void setRow(int y, BitArray row)
    method getTopLeftOnBit (line 207) | public int[] getTopLeftOnBit()
    method getBottomRightOnBit (line 231) | public int[] getBottomRightOnBit()

FILE: shadowsocks-csharp/3rd/zxing/common/BitSource.cs
  class BitSource (line 32) | public sealed class BitSource
    method BitSource (line 41) | public BitSource(byte[] bytes)
    method readBits (line 68) | public int readBits(int numBits)
    method available (line 119) | public int available()

FILE: shadowsocks-csharp/3rd/zxing/common/DecoderResult.cs
  class DecoderResult (line 28) | public sealed class DecoderResult
    method DecoderResult (line 57) | public DecoderResult(byte[] rawBytes, String text, IList<byte[]> byteS...
    method DecoderResult (line 62) | public DecoderResult(byte[] rawBytes, String text, IList<byte[]> byteS...

FILE: shadowsocks-csharp/3rd/zxing/common/DefaultGridSampler.cs
  class DefaultGridSampler (line 25) | public sealed class DefaultGridSampler : GridSampler
    method sampleGrid (line 27) | public override BitMatrix sampleGrid(BitMatrix image, int dimensionX, ...
    method sampleGrid (line 35) | public override BitMatrix sampleGrid(BitMatrix image, int dimensionX, ...

FILE: shadowsocks-csharp/3rd/zxing/common/DetectorResult.cs
  class DetectorResult (line 28) | public class DetectorResult
    method DetectorResult (line 33) | public DetectorResult(BitMatrix bits, ResultPoint[] points)

FILE: shadowsocks-csharp/3rd/zxing/common/GlobalHistogramBinarizer.cs
  class GlobalHistogramBinarizer (line 29) | public class GlobalHistogramBinarizer : Binarizer
    method GlobalHistogramBinarizer (line 43) | public GlobalHistogramBinarizer(LuminanceSource source)
    method getBlackRow (line 56) | public override BitArray getBlackRow(int y, BitArray row)
    method createBinarizer (line 155) | public override Binarizer createBinarizer(LuminanceSource source)
    method initArrays (line 160) | private void initArrays(int luminanceSize)
    method estimateBlackPoint (line 172) | private static bool estimateBlackPoint(int[] buckets, out int blackPoint)

FILE: shadowsocks-csharp/3rd/zxing/common/GridSampler.cs
  class GridSampler (line 34) | public abstract class GridSampler
    method setGridSampler (line 58) | public static void setGridSampler(GridSampler newGridSampler)
    method sampleGrid (line 93) | public abstract BitMatrix sampleGrid(BitMatrix image, int dimensionX, ...
    method sampleGrid (line 95) | public virtual BitMatrix sampleGrid(BitMatrix image, int dimensionX, i...
    method checkAndNudgePoints (line 116) | protected internal static bool checkAndNudgePoints(BitMatrix image, fl...

FILE: shadowsocks-csharp/3rd/zxing/common/HybridBinarizer.cs
  class HybridBinarizer (line 38) | public sealed class HybridBinarizer : GlobalHistogramBinarizer
    method HybridBinarizer (line 59) | public HybridBinarizer(LuminanceSource source)
    method createBinarizer (line 64) | public override Binarizer createBinarizer(LuminanceSource source)
    method binarizeEntireImage (line 74) | private void binarizeEntireImage()
    method calculateThresholdForBlock (line 121) | private static void calculateThresholdForBlock(byte[] luminances, int ...
    method cap (line 157) | private static int cap(int value, int min, int max)
    method thresholdBlock (line 171) | private static void thresholdBlock(byte[] luminances, int xoffset, int...
    method calculateBlackPoints (line 196) | private static int[][] calculateBlackPoints(byte[] luminances, int sub...

FILE: shadowsocks-csharp/3rd/zxing/common/PerspectiveTransform.cs
  class PerspectiveTransform (line 28) | public sealed class PerspectiveTransform
    method PerspectiveTransform (line 40) | private PerspectiveTransform(float a11, float a21, float a31, float a1...
    method quadrilateralToQuadrilateral (line 53) | public static PerspectiveTransform quadrilateralToQuadrilateral(float ...
    method transformPoints (line 61) | public void transformPoints(float[] points)
    method transformPoints (line 84) | public void transformPoints(float[] xValues, float[] yValues)
    method squareToQuadrilateral (line 97) | public static PerspectiveTransform squareToQuadrilateral(float x0, flo...
    method quadrilateralToSquare (line 126) | public static PerspectiveTransform quadrilateralToSquare(float x0, flo...
    method buildAdjoint (line 132) | internal PerspectiveTransform buildAdjoint()
    method times (line 146) | internal PerspectiveTransform times(PerspectiveTransform other)

FILE: shadowsocks-csharp/3rd/zxing/common/StringUtils.cs
  class StringUtils (line 28) | public static class StringUtils
    method guessEncoding (line 52) | public static String guessEncoding(byte[] bytes, IDictionary<DecodeHin...

FILE: shadowsocks-csharp/3rd/zxing/common/detector/MathUtils.cs
  class MathUtils (line 21) | public static class MathUtils
    method round (line 29) | public static int round(float d)
    method distance (line 34) | public static float distance(float aX, float aY, float bX, float bY)
    method distance (line 41) | public static float distance(int aX, int aY, int bX, int bY)

FILE: shadowsocks-csharp/3rd/zxing/common/reedsolomon/GenericGF.cs
  class GenericGF (line 29) | public sealed class GenericGF
    method GenericGF (line 61) | public GenericGF(int primitive, int size, int genBase)
    method initialize (line 73) | private void initialize()
    method checkInit (line 98) | private void checkInit()
    method buildMonomial (line 130) | internal GenericGFPoly buildMonomial(int degree, int coefficient)
    method addOrSubtract (line 151) | static internal int addOrSubtract(int a, int b)
    method exp (line 160) | internal int exp(int a)
    method log (line 172) | internal int log(int a)
    method inverse (line 187) | internal int inverse(int a)
    method multiply (line 204) | internal int multiply(int a, int b)
    method ToString (line 237) | override public String ToString()

FILE: shadowsocks-csharp/3rd/zxing/common/reedsolomon/GenericGFPoly.cs
  class GenericGFPoly (line 29) | internal sealed class GenericGFPoly
    method GenericGFPoly (line 44) | internal GenericGFPoly(GenericGF field, int[] coefficients)
    method getCoefficient (line 110) | internal int getCoefficient(int degree)
    method evaluateAt (line 120) | internal int evaluateAt(int a)
    method addOrSubtract (line 146) | internal GenericGFPoly addOrSubtract(GenericGFPoly other)
    method multiply (line 182) | internal GenericGFPoly multiply(GenericGFPoly other)
    method multiply (line 209) | internal GenericGFPoly multiply(int scalar)
    method multiplyByMonomial (line 228) | internal GenericGFPoly multiplyByMonomial(int degree, int coefficient)
    method divide (line 247) | internal GenericGFPoly[] divide(GenericGFPoly other)
    method ToString (line 277) | public override String ToString()

FILE: shadowsocks-csharp/3rd/zxing/common/reedsolomon/ReedSolomonDecoder.cs
  class ReedSolomonDecoder (line 40) | public sealed class ReedSolomonDecoder
    method ReedSolomonDecoder (line 44) | public ReedSolomonDecoder(GenericGF field)
    method decode (line 57) | public bool decode(int[] received, int twoS)
    method runEuclideanAlgorithm (line 102) | internal GenericGFPoly[] runEuclideanAlgorithm(GenericGFPoly a, Generi...
    method findErrorLocations (line 166) | private int[] findErrorLocations(GenericGFPoly errorLocator)
    method findErrorMagnitudes (line 193) | private int[] findErrorMagnitudes(GenericGFPoly errorEvaluator, int[] ...

FILE: shadowsocks-csharp/3rd/zxing/common/reedsolomon/ReedSolomonEncoder.cs
  class ReedSolomonEncoder (line 27) | public sealed class ReedSolomonEncoder
    method ReedSolomonEncoder (line 32) | public ReedSolomonEncoder(GenericGF field)
    method buildGenerator (line 39) | private GenericGFPoly buildGenerator(int degree)
    method encode (line 54) | public void encode(int[] toEncode, int ecBytes)

FILE: shadowsocks-csharp/3rd/zxing/qrcode/QRCodeReader.cs
  class QRCodeReader (line 29) | public class QRCodeReader
    method getDecoder (line 39) | protected Decoder getDecoder()
    method decode (line 49) | public Result decode(BinaryBitmap image)
    method decode (line 66) | public Result decode(BinaryBitmap image, IDictionary<DecodeHintType, o...
    method reset (line 124) | public void reset()
    method extractPureBits (line 137) | private static BitMatrix extractPureBits(BitMatrix image)
    method moduleSize (line 225) | private static bool moduleSize(int[] leftTopBlack, BitMatrix image, ou...

FILE: shadowsocks-csharp/3rd/zxing/qrcode/decoder/BitMatrixParser.cs
  class BitMatrixParser (line 22) | sealed class BitMatrixParser
    method createBitMatrixParser (line 31) | internal static BitMatrixParser createBitMatrixParser(BitMatrix bitMat...
    method BitMatrixParser (line 41) | private BitMatrixParser(BitMatrix bitMatrix)
    method readFormatInformation (line 55) | internal FormatInformation readFormatInformation()
    method readVersion (line 106) | internal Version readVersion()
    method copyBit (line 156) | private int copyBit(int i, int j, int versionBits)
    method readCodewords (line 170) | internal byte[] readCodewords()
    method remask (line 239) | internal void remask()
    method setMirror (line 258) | internal void setMirror(bool mirror)
    method mirror (line 266) | internal void mirror()

FILE: shadowsocks-csharp/3rd/zxing/qrcode/decoder/DataBlock.cs
  class DataBlock (line 28) | internal sealed class DataBlock
    method DataBlock (line 33) | private DataBlock(int numDataCodewords, byte[] codewords)
    method getDataBlocks (line 53) | internal static DataBlock[] getDataBlocks(byte[] rawCodewords, Version...

FILE: shadowsocks-csharp/3rd/zxing/qrcode/decoder/DataMask.cs
  class DataMask (line 34) | abstract class DataMask
    method DataMask (line 49) | private DataMask()
    method unmaskBitMatrix (line 61) | internal void unmaskBitMatrix(BitMatrix bits, int dimension)
    method isMasked (line 75) | internal abstract bool isMasked(int i, int j);
    method forReference (line 82) | internal static DataMask forReference(int reference)
    class DataMask000 (line 92) | private sealed class DataMask000 : DataMask
      method isMasked (line 94) | internal override bool isMasked(int i, int j)
    class DataMask001 (line 101) | private sealed class DataMask001 : DataMask
      method isMasked (line 103) | internal override bool isMasked(int i, int j)
    class DataMask010 (line 110) | private sealed class DataMask010 : DataMask
      method isMasked (line 112) | internal override bool isMasked(int i, int j)
    class DataMask011 (line 119) | private sealed class DataMask011 : DataMask
      method isMasked (line 121) | internal override bool isMasked(int i, int j)
    class DataMask100 (line 128) | private sealed class DataMask100 : DataMask
      method isMasked (line 130) | internal override bool isMasked(int i, int j)
    class DataMask101 (line 137) | private sealed class DataMask101 : DataMask
      method isMasked (line 139) | internal override bool isMasked(int i, int j)
    class DataMask110 (line 147) | private sealed class DataMask110 : DataMask
      method isMasked (line 149) | internal override bool isMasked(int i, int j)
    class DataMask111 (line 157) | private sealed class DataMask111 : DataMask
      method isMasked (line 159) | internal override bool isMasked(int i, int j)

FILE: shadowsocks-csharp/3rd/zxing/qrcode/decoder/DecodedBitStreamParser.cs
  class DecodedBitStreamParser (line 31) | internal static class DecodedBitStreamParser
    method decode (line 44) | internal static DecoderResult decode(byte[] bytes,
    method decodeHanziSegment (line 182) | private static bool decodeHanziSegment(BitSource bits,
    method decodeKanjiSegment (line 243) | private static bool decodeKanjiSegment(BitSource bits,
    method decodeByteSegment (line 303) | private static bool decodeByteSegment(BitSource bits,
    method toAlphaNumericChar (line 372) | private static char toAlphaNumericChar(int value)
    method decodeAlphanumericSegment (line 381) | private static bool decodeAlphanumericSegment(BitSource bits,
    method decodeNumericSegment (line 435) | private static bool decodeNumericSegment(BitSource bits,
    method parseECIValue (line 491) | private static int parseECIValue(BitSource bits)

FILE: shadowsocks-csharp/3rd/zxing/qrcode/decoder/Decoder.cs
  class Decoder (line 31) | public sealed class Decoder
    method Decoder (line 38) | public Decoder()
    method decode (line 52) | public DecoderResult decode(bool[][] image, IDictionary<DecodeHintType...
    method decode (line 74) | public DecoderResult decode(BitMatrix bits, IDictionary<DecodeHintType...
    method decode (line 121) | private DecoderResult decode(BitMatrixParser parser, IDictionary<Decod...
    method correctErrors (line 171) | private bool correctErrors(byte[] codewordBytes, int numDataCodewords)

FILE: shadowsocks-csharp/3rd/zxing/qrcode/decoder/ErrorCorrectionLevel.cs
  class ErrorCorrectionLevel (line 26) | public sealed class ErrorCorrectionLevel
    method ErrorCorrectionLevel (line 41) | private ErrorCorrectionLevel(int ordinal, int bits, String name)
    method ordinal (line 77) | public int ordinal()
    method ToString (line 88) | public override String ToString()
    method forBits (line 100) | public static ErrorCorrectionLevel forBits(int bits)

FILE: shadowsocks-csharp/3rd/zxing/qrcode/decoder/FormatInformation.cs
  class FormatInformation (line 34) | sealed class FormatInformation
    method FormatInformation (line 82) | private FormatInformation(int formatInfo)
    method numBitsDiffering (line 90) | internal static int numBitsDiffering(int a, int b)
    method decodeFormatInformation (line 113) | internal static FormatInformation decodeFormatInformation(int maskedFo...
    method doDecodeFormatInformation (line 127) | private static FormatInformation doDecodeFormatInformation(int maskedF...
    method GetHashCode (line 182) | public override int GetHashCode()
    method Equals (line 187) | public override bool Equals(Object o)

FILE: shadowsocks-csharp/3rd/zxing/qrcode/decoder/Mode.cs
  class Mode (line 26) | public sealed class Mode
    method Mode (line 84) | private Mode(int[] characterCountBitsForVersions, int bits, System.Str...
    method forBits (line 99) | public static Mode forBits(int bits)
    method getCharacterCountBits (line 134) | public int getCharacterCountBits(Version version)
    method ToString (line 174) | public override String ToString()

FILE: shadowsocks-csharp/3rd/zxing/qrcode/decoder/QRCodeDecoderMetaData.cs
  class QRCodeDecoderMetaData (line 23) | public sealed class QRCodeDecoderMetaData
    method QRCodeDecoderMetaData (line 31) | public QRCodeDecoderMetaData(bool mirrored)
    method applyMirroredCorrection (line 48) | public void applyMirroredCorrection(ResultPoint[] points)

FILE: shadowsocks-csharp/3rd/zxing/qrcode/decoder/Version.cs
  class Version (line 27) | public sealed class Version
    method Version (line 50) | private Version(int versionNumber, int[] alignmentPatternCenters, para...
    method getECBlocksForLevel (line 118) | public ECBlocks getECBlocksForLevel(ErrorCorrectionLevel ecLevel)
    method getProvisionalVersionForDimension (line 129) | public static Version getProvisionalVersionForDimension(int dimension)
    method getVersionForNumber (line 150) | public static Version getVersionForNumber(int versionNumber)
    method decodeVersionInformation (line 159) | internal static Version decodeVersionInformation(int versionBits)
    method buildFunctionPattern (line 191) | internal BitMatrix buildFunctionPattern()
    class ECBlocks (line 240) | public sealed class ECBlocks
      method ECBlocks (line 245) | internal ECBlocks(int ecCodewordsPerBlock, params ECB[] ecBlocks)
      method getECBlocks (line 293) | public ECB[] getECBlocks()
    class ECB (line 303) | public sealed class ECB
      method ECB (line 308) | internal ECB(int count, int dataCodewords)
    method ToString (line 344) | public override String ToString()
    method buildVersions (line 350) | private static Version[] buildVersions()

FILE: shadowsocks-csharp/3rd/zxing/qrcode/detector/AlignmentPattern.cs
  class AlignmentPattern (line 29) | public sealed class AlignmentPattern : ResultPoint
    method AlignmentPattern (line 33) | internal AlignmentPattern(float posX, float posY, float estimatedModul...
    method aboutEquals (line 42) | internal bool aboutEquals(float moduleSize, float i, float j)
    method combineEstimate (line 60) | internal AlignmentPattern combineEstimate(float i, float j, float newM...

FILE: shadowsocks-csharp/3rd/zxing/qrcode/detector/AlignmentPatternFinder.cs
  class AlignmentPatternFinder (line 40) | sealed class AlignmentPatternFinder
    method AlignmentPatternFinder (line 67) | internal AlignmentPatternFinder(BitMatrix image, int startX, int start...
    method find (line 86) | internal AlignmentPattern find()
    method centerFromEnd (line 182) | private static float? centerFromEnd(int[] stateCount, int end)
    method foundPatternCross (line 195) | private bool foundPatternCross(int[] stateCount)
    method crossCheckVertical (line 221) | private float? crossCheckVertical(int startI, int centerJ, int maxCoun...
    method handlePossibleCenter (line 295) | private AlignmentPattern handlePossibleCenter(int[] stateCount, int i,...

FILE: shadowsocks-csharp/3rd/zxing/qrcode/detector/Detector.cs
  class Detector (line 30) | public class Detector
    method Detector (line 39) | public Detector(BitMatrix image)
    method detect (line 72) | public virtual DetectorResult detect()
    method detect (line 84) | public virtual DetectorResult detect(IDictionary<DecodeHintType, objec...
    method processFinderPatternInfo (line 101) | protected internal virtual DetectorResult processFinderPatternInfo(Fin...
    method createTransform (line 167) | private static PerspectiveTransform createTransform(ResultPoint topLef...
    method sampleGrid (line 208) | private static BitMatrix sampleGrid(BitMatrix image, PerspectiveTransf...
    method computeDimension (line 217) | private static bool computeDimension(ResultPoint topLeft, ResultPoint ...
    method calculateModuleSize (line 241) | protected internal virtual float calculateModuleSize(ResultPoint topLe...
    method calculateModuleSizeOneWay (line 251) | private float calculateModuleSizeOneWay(ResultPoint pattern, ResultPoi...
    method sizeOfBlackWhiteBlackRunBothWays (line 274) | private float sizeOfBlackWhiteBlackRunBothWays(int fromX, int fromY, i...
    method sizeOfBlackWhiteBlackRun (line 324) | private float sizeOfBlackWhiteBlackRun(int fromX, int fromY, int toX, ...
    method findAlignmentInRegion (line 401) | protected AlignmentPattern findAlignmentInRegion(float overallEstModul...

FILE: shadowsocks-csharp/3rd/zxing/qrcode/detector/FinderPattern.cs
  class FinderPattern (line 27) | public sealed class FinderPattern : ResultPoint
    method FinderPattern (line 32) | internal FinderPattern(float posX, float posY, float estimatedModuleSize)
    method FinderPattern (line 39) | internal FinderPattern(float posX, float posY, float estimatedModuleSi...
    method aboutEquals (line 78) | internal bool aboutEquals(float moduleSize, float i, float j)
    method combineEstimate (line 98) | internal FinderPattern combineEstimate(float i, float j, float newModu...

FILE: shadowsocks-csharp/3rd/zxing/qrcode/detector/FinderPatternFinder.cs
  class FinderPatternFinder (line 31) | public class FinderPatternFinder
    method FinderPatternFinder (line 54) | public FinderPatternFinder(BitMatrix image)
    method FinderPatternFinder (line 64) | public FinderPatternFinder(BitMatrix image, ResultPointCallback result...
    method find (line 94) | internal virtual FinderPatternInfo find(IDictionary<DecodeHintType, ob...
    method centerFromEnd (line 244) | private static float? centerFromEnd(int[] stateCount, int end)
    method foundPatternCross (line 257) | protected internal static bool foundPatternCross(int[] stateCount)
    method crossCheckDiagonal (line 306) | private bool crossCheckDiagonal(int startI, int centerJ, int maxCount,...
    method crossCheckVertical (line 405) | private float? crossCheckVertical(int startI, int centerJ, int maxCoun...
    method crossCheckHorizontal (line 486) | private float? crossCheckHorizontal(int startJ, int centerI, int maxCo...
    method handlePossibleCenter (line 578) | protected bool handlePossibleCenter(int[] stateCount, int i, int j, bo...
    method findRowSkip (line 630) | private int findRowSkip()
    method haveMultiplyConfirmedCenters (line 666) | private bool haveMultiplyConfirmedCenters()
    method selectBestPatterns (line 701) | private FinderPattern[] selectBestPatterns()
    class FurthestFromAverageComparator (line 769) | private sealed class FurthestFromAverageComparator : IComparer<FinderP...
      method FurthestFromAverageComparator (line 773) | public FurthestFromAverageComparator(float f)
      method Compare (line 778) | public int Compare(FinderPattern x, FinderPattern y)
    class CenterComparator (line 787) | private sealed class CenterComparator : IComparer<FinderPattern>
      method CenterComparator (line 791) | public CenterComparator(float f)
      method Compare (line 796) | public int Compare(FinderPattern x, FinderPattern y)

FILE: shadowsocks-csharp/3rd/zxing/qrcode/detector/FinderPatternInfo.cs
  class FinderPatternInfo (line 24) | public sealed class FinderPatternInfo
    method FinderPatternInfo (line 34) | public FinderPatternInfo(FinderPattern[] patternCenters)

FILE: shadowsocks-csharp/3rd/zxing/qrcode/encoder/BlockPair.cs
  class BlockPair (line 19) | internal sealed class BlockPair
    method BlockPair (line 24) | public BlockPair(byte[] data, byte[] errorCorrection)

FILE: shadowsocks-csharp/3rd/zxing/qrcode/encoder/ByteMatrix.cs
  class ByteMatrix (line 27) | public sealed class ByteMatrix
    method ByteMatrix (line 38) | public ByteMatrix(int width, int height)
    method set (line 86) | public void set(int x, int y, byte value)
    method set (line 97) | public void set(int x, int y, bool value)
    method clear (line 106) | public void clear(byte value)
    method ToString (line 123) | override public String ToString()

FILE: shadowsocks-csharp/3rd/zxing/qrcode/encoder/Encoder.cs
  class Encoder (line 30) | public static class Encoder
    method calculateMaskPenalty (line 47) | private static int calculateMaskPenalty(ByteMatrix matrix)
    method encode (line 66) | public static QRCode encode(String content, ErrorCorrectionLevel ecLevel)
    method encode (line 78) | public static QRCode encode(String content,
    method getAlphanumericCode (line 176) | internal static int getAlphanumericCode(int code)
    method chooseMode (line 190) | public static Mode chooseMode(String content)
    method chooseMode (line 202) | private static Mode chooseMode(String content, String encoding)
    method chooseMaskPattern (line 207) | private static int chooseMaskPattern(BitArray bits,
    method chooseVersion (line 230) | private static Version chooseVersion(int numInputBits, ErrorCorrection...
    method terminateBits (line 257) | internal static void terminateBits(int numDataBytes, BitArray bits)
    method getNumDataBytesAndNumECBytesForBlockID (line 302) | internal static void getNumDataBytesAndNumECBytesForBlockID(int numTot...
    method interleaveWithECBytes (line 376) | internal static BitArray interleaveWithECBytes(BitArray bits,
    method generateECBytes (line 457) | internal static byte[] generateECBytes(byte[] dataBytes, int numEcByte...
    method appendModeInfo (line 482) | internal static void appendModeInfo(Mode mode, BitArray bits)
    method appendLengthInfo (line 495) | internal static void appendLengthInfo(int numLetters, Version version,...
    method appendBytes (line 512) | internal static void appendBytes(String content,
    method appendNumericBytes (line 523) | internal static void appendNumericBytes(String content, BitArray bits)
    method append8BitBytes (line 556) | internal static void append8BitBytes(String content, BitArray bits, St...

FILE: shadowsocks-csharp/3rd/zxing/qrcode/encoder/MaskUtil.cs
  class MaskUtil (line 27) | public static class MaskUtil
    method applyMaskPenaltyRule1 (line 41) | public static int applyMaskPenaltyRule1(ByteMatrix matrix)
    method applyMaskPenaltyRule2 (line 53) | public static int applyMaskPenaltyRule2(ByteMatrix matrix)
    method applyMaskPenaltyRule3 (line 80) | public static int applyMaskPenaltyRule3(ByteMatrix matrix)
    method isWhiteHorizontal (line 120) | private static bool isWhiteHorizontal(byte[] rowArray, int from, int to)
    method isWhiteVertical (line 132) | private static bool isWhiteVertical(byte[][] array, int col, int from,...
    method applyMaskPenaltyRule4 (line 150) | public static int applyMaskPenaltyRule4(ByteMatrix matrix)
    method getDataMaskBit (line 181) | public static bool getDataMaskBit(int maskPattern, int x, int y)
    method applyMaskPenaltyRule1Internal (line 236) | private static int applyMaskPenaltyRule1Internal(ByteMatrix matrix, bo...

FILE: shadowsocks-csharp/3rd/zxing/qrcode/encoder/MatrixUtil.cs
  class MatrixUtil (line 27) | public static class MatrixUtil
    method clearMatrix (line 128) | public static void clearMatrix(ByteMatrix matrix)
    method buildMatrix (line 142) | public static void buildMatrix(BitArray dataBits, ErrorCorrectionLevel...
    method embedBasicPatterns (line 164) | public static void embedBasicPatterns(Version version, ByteMatrix matrix)
    method embedTypeInfo (line 183) | public static void embedTypeInfo(ErrorCorrectionLevel ecLevel, int mas...
    method maybeEmbedVersionInfo (line 222) | public static void maybeEmbedVersionInfo(Version version, ByteMatrix m...
    method embedDataBits (line 256) | public static void embedDataBits(BitArray dataBits, int maskPattern, B...
    method findMSBSet (line 325) | public static int findMSBSet(int value_Renamed)
    method calculateBCHCode (line 366) | public static int calculateBCHCode(int value, int poly)
    method makeTypeInfoBits (line 389) | public static void makeTypeInfoBits(ErrorCorrectionLevel ecLevel, int ...
    method makeVersionInfoBits (line 418) | public static void makeVersionInfoBits(Version version, BitArray bits)
    method isEmpty (line 438) | private static bool isEmpty(int value)
    method embedTimingPatterns (line 443) | private static void embedTimingPatterns(ByteMatrix matrix)
    method embedDarkDotAtLeftBottomCorner (line 467) | private static void embedDarkDotAtLeftBottomCorner(ByteMatrix matrix)
    method embedHorizontalSeparationPattern (line 476) | private static void embedHorizontalSeparationPattern(int xStart, int y...
    method embedVerticalSeparationPattern (line 488) | private static void embedVerticalSeparationPattern(int xStart, int ySt...
    method embedPositionAdjustmentPattern (line 508) | private static void embedPositionAdjustmentPattern(int xStart, int ySt...
    method embedPositionDetectionPattern (line 519) | private static void embedPositionDetectionPattern(int xStart, int ySta...
    method embedPositionDetectionPatternsAndSeparators (line 534) | private static void embedPositionDetectionPatternsAndSeparators(ByteMa...
    method maybeEmbedPositionAdjustmentPatterns (line 569) | private static void maybeEmbedPositionAdjustmentPatterns(Version versi...

FILE: shadowsocks-csharp/3rd/zxing/qrcode/encoder/QRCode.cs
  class QRCode (line 24) | public sealed class QRCode
    method QRCode (line 34) | public QRCode()
    method ToString (line 85) | public override String ToString()
    method isValidMaskPattern (line 120) | public static bool isValidMaskPattern(int maskPattern)

FILE: shadowsocks-csharp/Controller/APIServer.cs
  class APIServer (line 13) | class APIServer : Listener.Service
    method APIServer (line 23) | public APIServer(ShadowsocksController controller, Configuration config)
    method Handle (line 29) | public bool Handle(byte[] firstPacket, int length, Socket socket)
    method CheckEnd (line 89) | private bool CheckEnd(string request)
    method HttpHandshakeRecv (line 128) | private void HttpHandshakeRecv(IAsyncResult ar)
    method process (line 167) | protected string process(string request)
    method SendCallback (line 280) | private void SendCallback(IAsyncResult ar)

FILE: shadowsocks-csharp/Controller/AutoStartup.cs
  class AutoStartup (line 7) | class AutoStartup
    method Set (line 12) | public static bool Set(bool enabled)
    method Switch (line 51) | public static bool Switch()
    method Check (line 91) | public static bool Check()

FILE: shadowsocks-csharp/Controller/FileManager.cs
  class FileManager (line 9) | public class FileManager
    method ByteArrayToFile (line 11) | public static bool ByteArrayToFile(string fileName, byte[] content)
    method UncompressFile (line 30) | public static void UncompressFile(string fileName, byte[] content)
    method DeflateCompress (line 55) | public static byte[] DeflateCompress(byte[] content, int index, int co...
    method DeflateDecompress (line 76) | public static byte[] DeflateDecompress(byte[] content, int index, int ...

FILE: shadowsocks-csharp/Controller/GfwListUpdater.cs
  class GFWListUpdater (line 10) | public class GFWListUpdater
    class ResultEventArgs (line 34) | public class ResultEventArgs : EventArgs
      method ResultEventArgs (line 38) | public ResultEventArgs(bool success)
    method http_DownloadGFWTemplateCompleted (line 44) | private void http_DownloadGFWTemplateCompleted(object sender, Download...
    method http_DownloadStringCompleted (line 72) | private void http_DownloadStringCompleted(object sender, DownloadStrin...
    method http_DownloadPACCompleted (line 144) | private void http_DownloadPACCompleted(object sender, DownloadStringCo...
    method UpdatePACFromGFWList (line 176) | public void UpdatePACFromGFWList(Configuration config)
    method UpdatePACFromGFWList (line 214) | public void UpdatePACFromGFWList(Configuration config, string url)
    method ParseResult (line 231) | public List<string> ParseResult(string response)

FILE: shadowsocks-csharp/Controller/HttpPortForwarder.cs
  class HttpPortForwarder (line 11) | class HttpPortForwarder : Listener.Service
    method HttpPortForwarder (line 16) | public HttpPortForwarder(int targetPort, Configuration config)
    method Handle (line 22) | public bool Handle(byte[] firstPacket, int length, Socket socket)
    class Handler (line 28) | class Handler
      method Start (line 44) | public void Start(Configuration config, byte[] firstPacket, int leng...
      method RspHttpHandshakeReceive (line 60) | private void RspHttpHandshakeReceive()
      method HttpHandshakeRecv (line 103) | private void HttpHandshakeRecv(IAsyncResult ar)
      method HttpHandshakeAuthEndSend (line 131) | private void HttpHandshakeAuthEndSend(IAsyncResult ar)
      method StartConnect (line 150) | private void StartConnect(IAsyncResult ar)
      method Connect (line 165) | private void Connect()
      method ConnectCallback (line 188) | private void ConnectCallback(IAsyncResult ar)
      method HandshakeReceive (line 206) | private void HandshakeReceive()
      method StartPipe (line 224) | private void StartPipe(IAsyncResult ar)
      method PipeRemoteReceiveCallback (line 245) | private void PipeRemoteReceiveCallback(IAsyncResult ar)
      method PipeConnectionReceiveCallback (line 271) | private void PipeConnectionReceiveCallback(IAsyncResult ar)
      method PipeRemoteSendCallback (line 297) | private void PipeRemoteSendCallback(IAsyncResult ar)
      method PipeConnectionSendCallback (line 316) | private void PipeConnectionSendCallback(IAsyncResult ar)
      method Close (line 335) | public void Close()

FILE: shadowsocks-csharp/Controller/HttpProxy.cs
  class HttpPraser (line 9) | class HttpPraser
    method HttpPraser (line 21) | public HttpPraser(bool redir = false)
    method ParseHostAndPort (line 26) | private static string ParseHostAndPort(string str, ref int port)
    method ParseURL (line 61) | protected string ParseURL(string url, string host, int port)
    method HostToHandshakeBuffer (line 101) | public void HostToHandshakeBuffer(string host, int port, ref byte[] re...
    method AppendRequest (line 138) | protected int AppendRequest(ref byte[] Packet, ref int PacketLength)
    method ParseHttpHeader (line 174) | protected Dictionary<string, string> ParseHttpHeader(string header)
    method HeaderDictToString (line 193) | protected string HeaderDictToString(Dictionary<string, string> dict)
    method HandshakeReceive (line 210) | public int HandshakeReceive(byte[] _firstPacket, int _firstPacketLengt...
    method Http200 (line 306) | public string Http200()
    method Http407 (line 311) | public string Http407()
    method Http500 (line 326) | public string Http500()

FILE: shadowsocks-csharp/Controller/HttpProxyRunner.cs
  class HttpProxyRunner (line 16) | class HttpProxyRunner
    method HttpProxyRunner (line 25) | static HttpProxyRunner()
    method HasExited (line 54) | public bool HasExited()
    method Kill (line 68) | public static void Kill()
    method Start (line 97) | public void Start(Configuration configuration)
    method Restart (line 114) | public void Restart()
    method Stop (line 136) | public void Stop()
    method GetFreePort (line 156) | private int GetFreePort()

FILE: shadowsocks-csharp/Controller/I18N.cs
  class I18N (line 9) | public class I18N
    method Init (line 13) | static void Init(string res)
    method I18N (line 30) | static I18N()
    method GetString (line 49) | public static string GetString(string key)

FILE: shadowsocks-csharp/Controller/Listener.cs
  class Listener (line 12) | public class Listener
    type Service (line 14) | public interface Service
      method Handle (line 16) | bool Handle(byte[] firstPacket, int length, Socket socket);
    method Listener (line 30) | public Listener(IList<Service> services)
    method GetServices (line 36) | public IList<Service> GetServices()
    method CheckIfPortInUse (line 41) | private bool CheckIfPortInUse(int port)
    method isConfigChange (line 63) | public bool isConfigChange(Configuration config)
    method Start (line 81) | public void Start(Configuration config, int port)
    method Stop (line 171) | public void Stop()
    method ResetTimeout (line 187) | private void ResetTimeout(Double time, Socket socket)
    method timer_Elapsed (line 222) | private void timer_Elapsed(object sender, ElapsedEventArgs eventArgs, ...
    method AcceptCallback (line 248) | public void AcceptCallback(IAsyncResult ar)
    method ReceiveCallback (line 329) | private void ReceiveCallback(IAsyncResult ar)

FILE: shadowsocks-csharp/Controller/Local.cs
  class CallbackStatus (line 16) | class CallbackStatus
    method CallbackStatus (line 20) | public CallbackStatus()
    method SetIfEqu (line 25) | public void SetIfEqu(int newStatus, int oldStatus)
  class Local (line 55) | class Local : Listener.Service
    method Local (line 62) | public Local(Configuration config, ServerTransferTotal transfer, IPRan...
    method Accept (line 69) | protected bool Accept(byte[] firstPacket, int length)
    method Handle (line 94) | public bool Handle(byte[] firstPacket, int length, Socket socket)
  class HandlerConfig (line 106) | class HandlerConfig : ICloneable
    method Clone (line 132) | public object Clone()
  class Handler (line 158) | class Handler
    type ConnectState (line 210) | enum ConnectState
    method ResetTimeout (line 235) | private void ResetTimeout(double time, bool reset_keep_alive = true)
    method timer_Elapsed (line 282) | private void timer_Elapsed(object sender, ElapsedEventArgs e)
    method setServerTransferTotal (line 351) | public void setServerTransferTotal(ServerTransferTotal transfer)
    method LogSocketException (line 356) | public int LogSocketException(Exception e)
    method ReConnect (line 478) | public bool ReConnect()
    method Start (line 515) | public void Start(byte[] firstPacket, int length, string rsp_protocol)
    method BeginConnect (line 550) | private void BeginConnect(IPAddress ipAddress, int serverPort)
    method TryReconnect (line 635) | public bool TryReconnect()
    method CloseSocket (line 656) | private void CloseSocket(ref Socket sock)
    method CloseSocket (line 678) | private void CloseSocket(ref ProxySocketTunLocal sock)
    method CloseSocket (line 700) | private void CloseSocket(ref ProxyEncryptSocket sock)
    method Shutdown (line 722) | public override void Shutdown()
    method Close (line 728) | public void Close()
    method ConnectProxyServer (line 816) | private bool ConnectProxyServer(string strRemoteHost, int iRemotePort)
    method Connect (line 843) | private void Connect()
    method ConnectCallback (line 1011) | private void ConnectCallback(IAsyncResult ar)
    method doConnectionTCPRecv (line 1044) | private void doConnectionTCPRecv()
    method endConnectionTCPRecv (line 1056) | private int endConnectionTCPRecv(IAsyncResult ar)
    method doConnectionUDPRecv (line 1067) | private void doConnectionUDPRecv()
    method endConnectionUDPRecv (line 1081) | private int endConnectionUDPRecv(IAsyncResult ar, ref EndPoint endPoint)
    method doRemoteTCPRecv (line 1094) | private void doRemoteTCPRecv()
    method endRemoteTCPRecv (line 1104) | private int endRemoteTCPRecv(IAsyncResult ar)
    method doRemoteUDPRecv (line 1125) | private void doRemoteUDPRecv()
    method endRemoteUDPRecv (line 1138) | private int endRemoteUDPRecv(IAsyncResult ar, ref EndPoint endPoint)
    method doConnectionRecv (line 1149) | private void doConnectionRecv()
    method SetObfsPlugin (line 1155) | private void SetObfsPlugin()
    method GetQueryString (line 1170) | private string GetQueryString()
    method GetQueryPort (line 1208) | private int GetQueryPort()
    method StartPipe (line 1243) | private void StartPipe()
    method ConnectionSend (line 1308) | private void ConnectionSend(byte[] buffer, int bytesToSend)
    method UDPoverTCPConnectionSend (line 1321) | private void UDPoverTCPConnectionSend(byte[] send_buffer, int bytesToS...
    method PipeRemoteReceiveCallback (line 1361) | private void PipeRemoteReceiveCallback(IAsyncResult ar)
    method PipeRemoteReceiveLoop (line 1443) | private void PipeRemoteReceiveLoop()
    method PipeRemoteUDPReceiveCallback (line 1536) | private void PipeRemoteUDPReceiveCallback(IAsyncResult ar)
    method RemoteSend (line 1595) | private int RemoteSend(byte[] bytes, int length)
    method RemoteSendto (line 1633) | private void RemoteSendto(byte[] bytes, int length)
    method PipeConnectionReceiveCallback (line 1640) | private void PipeConnectionReceiveCallback(IAsyncResult ar)
    method PipeConnectionUDPReceiveCallback (line 1724) | private void PipeConnectionUDPReceiveCallback(IAsyncResult ar)
    method PipeRemoteUDPSendCallback (line 1777) | private void PipeRemoteUDPSendCallback(IAsyncResult ar)
    method PipeConnectionUDPSendCallbackNoRecv (line 1794) | private void PipeConnectionUDPSendCallbackNoRecv(IAsyncResult ar)
    method PipeConnectionUDPSendCallback (line 1810) | private void PipeConnectionUDPSendCallback(IAsyncResult ar)
    method getServerUrl (line 1828) | protected string getServerUrl(out string remarks)
    method LogException (line 1840) | private void LogException(Exception e)
    method LogExceptionAndClose (line 1849) | private void LogExceptionAndClose(Exception e)

FILE: shadowsocks-csharp/Controller/Logging.cs
  type LogLevel (line 11) | public enum LogLevel
  class Logging (line 20) | public class Logging
    method OpenLogFile (line 32) | public static bool OpenLogFile()
    method CloseLogFile (line 71) | private static void CloseLogFile()
    method Clear (line 80) | public static void Clear()
    method Error (line 90) | public static void Error(object o)
    method Info (line 96) | public static void Info(object o)
    method Debug (line 102) | [Conditional("DEBUG")]
    method ToString (line 109) | private static string ToString(StackFrame[] stacks)
    method UpdateLogFile (line 119) | protected static void UpdateLogFile()
    method LogUsefulException (line 133) | public static void LogUsefulException(Exception e)
    method LogSocketException (line 180) | public static bool LogSocketException(string remarks, string server, E...
    method Log (line 254) | public static void Log(LogLevel level, object s)
    method LogBin (line 267) | [Conditional("DEBUG")]
  class StreamWriterWithTimestamp (line 282) | public class StreamWriterWithTimestamp : StreamWriter
    method StreamWriterWithTimestamp (line 284) | public StreamWriterWithTimestamp(Stream stream) : base(stream)
    method GetTimestamp (line 288) | private string GetTimestamp()
    method WriteLine (line 293) | public override void WriteLine(string value)
    method Write (line 298) | public override void Write(string value)

FILE: shadowsocks-csharp/Controller/PACServer.cs
  class PACServer (line 15) | class PACServer : Listener.Service
    method PACServer (line 30) | public PACServer()
    method UpdateConfiguration (line 36) | public void UpdateConfiguration(Configuration config)
    method Handle (line 41) | public bool Handle(byte[] firstPacket, int length, Socket socket)
    method TouchPACFile (line 131) | public string TouchPACFile()
    method TouchUserRuleFile (line 144) | internal string TouchUserRuleFile()
    method GetPACContent (line 157) | private string GetPACContent()
    method SendResponse (line 169) | public void SendResponse(byte[] firstPacket, int length, Socket socket...
    method SendCallback (line 212) | private void SendCallback(IAsyncResult ar)
    method WatchPacFile (line 224) | private void WatchPacFile()
    method WatchUserRuleFile (line 240) | private void WatchUserRuleFile()
    method Watcher_Changed (line 256) | private void Watcher_Changed(object sender, FileSystemEventArgs e)
    method UserRuleFileWatcher_Changed (line 264) | private void UserRuleFileWatcher_Changed(object sender, FileSystemEven...
    method GetPACAddress (line 272) | private string GetPACAddress(byte[] requestBuf, int length, IPEndPoint...

FILE: shadowsocks-csharp/Controller/ProxyAuth.cs
  class ProtocolException (line 14) | public class ProtocolException : Exception
    method ProtocolException (line 16) | public ProtocolException(string info)
  class ProxyAuthHandler (line 23) | class ProxyAuthHandler
    method ProxyAuthHandler (line 44) | public ProxyAuthHandler(Configuration config, ServerTransferTotal tran...
    method CloseSocket (line 66) | private void CloseSocket(ref Socket sock)
    method Close (line 92) | private void Close()
    method AuthConnection (line 100) | bool AuthConnection(Socket connection, string authUser, string authPass)
    method HandshakeReceive (line 117) | private void HandshakeReceive()
    method RspSocks4aHandshakeReceive (line 151) | private void RspSocks4aHandshakeReceive()
    method RspSocks5HandshakeReceive (line 195) | private void RspSocks5HandshakeReceive()
    method HandshakeAuthReceiveCallback (line 247) | private void HandshakeAuthReceiveCallback()
    method HandshakeReceive2Callback (line 279) | private void HandshakeReceive2Callback()
    method HandshakeReceive3Callback (line 320) | private void HandshakeReceive3Callback(int recv_size)
    method RspSocks5UDPHeader (line 355) | private void RspSocks5UDPHeader(int bytesRead)
    method RspSocks5TCPHeader (line 420) | private void RspSocks5TCPHeader()
    method RspHttpHandshakeReceive (line 438) | private void RspHttpHandshakeReceive()
    method HttpHandshakeRecv (line 498) | private bool HttpHandshakeRecv()
    method Connect (line 523) | private void Connect()
    method Dispose (line 613) | private void Dispose()

FILE: shadowsocks-csharp/Controller/ProxySocket.cs
  class IHandler (line 12) | public abstract class IHandler
    method Shutdown (line 15) | public abstract void Shutdown();
  class CallbackState (line 18) | public class CallbackState
  class ProxySocketTun (line 26) | public class ProxySocketTun
    method ProxySocketTun (line 43) | public ProxySocketTun(Socket socket)
    method ProxySocketTun (line 48) | public ProxySocketTun(AddressFamily af, SocketType type, ProtocolType ...
    method GetSocket (line 53) | public Socket GetSocket()
    method Shutdown (line 94) | public void Shutdown(SocketShutdown how)
    method Close (line 99) | public void Close()
    method BeginConnect (line 108) | public IAsyncResult BeginConnect(EndPoint ep, AsyncCallback callback, ...
    method EndConnect (line 115) | public void EndConnect(IAsyncResult ar)
    method Receive (line 120) | public int Receive(byte[] buffer, int size, SocketFlags flags)
    method BeginReceive (line 125) | public IAsyncResult BeginReceive(byte[] buffer, int size, SocketFlags ...
    method EndReceive (line 134) | public int EndReceive(IAsyncResult ar)
    method SendAll (line 150) | public int SendAll(byte[] buffer, int size, SocketFlags flags)
    method Send (line 161) | public virtual int Send(byte[] buffer, int size, SocketFlags flags)
    method BeginSend (line 166) | public int BeginSend(byte[] buffer, int size, SocketFlags flags, Async...
    method EndSend (line 176) | public int EndSend(IAsyncResult ar)
    method BeginReceiveFrom (line 181) | public IAsyncResult BeginReceiveFrom(byte[] buffer, int size, SocketFl...
    method GetAsyncResultSize (line 190) | public int GetAsyncResultSize(IAsyncResult ar)
    method GetAsyncResultBuffer (line 196) | public byte[] GetAsyncResultBuffer(IAsyncResult ar)
    method ConnectSocks5ProxyServer (line 202) | public bool ConnectSocks5ProxyServer(string strRemoteHost, int iRemote...
    method SetTcpServer (line 382) | public void SetTcpServer(string server, int port)
    method SetUdpServer (line 388) | public void SetUdpServer(string server, int port)
    method SetUdpEndPoint (line 394) | public void SetUdpEndPoint(IPEndPoint ep)
    method ConnectHttpProxyServer (line 399) | public bool ConnectHttpProxyServer(string strRemoteHost, int iRemotePo...
  class ProxySocketTunLocal (line 436) | public class ProxySocketTunLocal : ProxySocketTun
    method ProxySocketTunLocal (line 440) | public ProxySocketTunLocal(Socket socket)
    method ProxySocketTunLocal (line 445) | public ProxySocketTunLocal(AddressFamily af, SocketType type, Protocol...
    method Send (line 451) | public override int Send(byte[] buffer, int size, SocketFlags flags)
  class ProxyEncryptSocket (line 484) | class ProxyEncryptSocket
    method ProxyEncryptSocket (line 515) | public ProxyEncryptSocket(AddressFamily af, SocketType type, ProtocolT...
    method GetSocket (line 520) | public Socket GetSocket()
    method Shutdown (line 585) | public void Shutdown(SocketShutdown how)
    method Close (line 590) | public void Close()
    method BeginConnect (line 622) | public IAsyncResult BeginConnect(EndPoint ep, AsyncCallback callback, ...
    method EndConnect (line 629) | public void EndConnect(IAsyncResult ar)
    method CreateEncryptor (line 634) | public void CreateEncryptor(string method, string password)
    method SetProtocol (line 641) | public void SetProtocol(IObfs protocol)
    method SetObfs (line 646) | public void SetObfs(IObfs obfs)
    method SetObfsPlugin (line 651) | public void SetObfsPlugin(Server server, int head_len)
    method Receive (line 676) | public int Receive(byte[] recv_buffer, int size, SocketFlags flags, ou...
    method BeginReceive (line 710) | public IAsyncResult BeginReceive(byte[] buffer, int size, SocketFlags ...
    method EndReceive (line 719) | public int EndReceive(IAsyncResult ar, out bool sendback)
    method SendAll (line 757) | public int SendAll(byte[] buffer, int size, SocketFlags flags)
    method Send (line 768) | public int Send(byte[] buffer, int size, SocketFlags flags)
    method BeginReceiveFrom (line 799) | public IAsyncResult BeginReceiveFrom(byte[] buffer, int size, SocketFl...
    method RemoveRemoteUDPRecvBufferHeader (line 808) | private bool RemoveRemoteUDPRecvBufferHeader(byte[] remoteRecvBuffer, ...
    method ParseUDPHeader (line 850) | protected static byte[] ParseUDPHeader(byte[] buffer, ref int len)
    method AddRemoteUDPRecvBufferHeader (line 892) | protected void AddRemoteUDPRecvBufferHeader(byte[] decryptBuffer, byte...
    method EndReceiveFrom (line 901) | public int EndReceiveFrom(IAsyncResult ar, ref EndPoint ep)
    method BeginSendTo (line 935) | public int BeginSendTo(byte[] buffer, int size, SocketFlags flags, Asy...
    method EndSendTo (line 1005) | public int EndSendTo(IAsyncResult ar)
    method GetAsyncResultSize (line 1010) | public int GetAsyncResultSize(IAsyncResult ar)
    method GetAsyncProtocolSize (line 1016) | public int GetAsyncProtocolSize(IAsyncResult ar)
    method GetAsyncResultBuffer (line 1022) | public byte[] GetAsyncResultBuffer(IAsyncResult ar)
    method GetProxyUdpEndPoint (line 1028) | public IPEndPoint GetProxyUdpEndPoint()
    method ConnectSocks5ProxyServer (line 1033) | public bool ConnectSocks5ProxyServer(string strRemoteHost, int iRemote...
    method SetTcpServer (line 1216) | public void SetTcpServer(string server, int port)
    method SetUdpServer (line 1222) | public void SetUdpServer(string server, int port)
    method SetUdpEndPoint (line 1228) | public void SetUdpEndPoint(IPEndPoint ep)
    method ConnectHttpProxyServer (line 1233) | public bool ConnectHttpProxyServer(string strRemoteHost, int iRemotePo...

FILE: shadowsocks-csharp/Controller/ShadowsocksController.cs
  type ProxyMode (line 12) | public enum ProxyMode
  class ShadowsocksController (line 20) | public class ShadowsocksController
    class PathEventArgs (line 41) | public class PathEventArgs : EventArgs
    method ShadowsocksController (line 62) | public ShadowsocksController()
    method Start (line 77) | public void Start()
    method ReportError (line 82) | protected void ReportError(Exception e)
    method ReloadIPRange (line 87) | public void ReloadIPRange()
    method GetConfiguration (line 98) | public Configuration GetConfiguration()
    method GetCurrentConfiguration (line 103) | public Configuration GetCurrentConfiguration()
    method FindFirstMatchServer (line 108) | private int FindFirstMatchServer(Server server, List<Server> servers)
    method AppendConfiguration (line 120) | public void AppendConfiguration(Configuration mergeConfig, List<Server...
    method MergeConfiguration (line 134) | public List<Server> MergeConfiguration(Configuration mergeConfig, List...
    method MergeGetConfiguration (line 161) | public Configuration MergeGetConfiguration(Configuration mergeConfig)
    method MergeConfiguration (line 171) | public void MergeConfiguration(Configuration mergeConfig)
    method SaveServersConfig (line 177) | public bool SaveServersConfig(string config)
    method SaveServersConfig (line 188) | public void SaveServersConfig(Configuration config)
    method SaveServersPortMap (line 199) | public void SaveServersPortMap(Configuration config)
    method AddServerBySSURL (line 206) | public bool AddServerBySSURL(string ssURL, string force_group = null, ...
    method ToggleMode (line 239) | public void ToggleMode(ProxyMode mode)
    method ToggleRuleMode (line 249) | public void ToggleRuleMode(int mode)
    method ToggleSelectRandom (line 259) | public void ToggleSelectRandom(bool enabled)
    method ToggleSameHostForSameTargetRandom (line 265) | public void ToggleSameHostForSameTargetRandom(bool enabled)
    method SelectServerIndex (line 271) | public void SelectServerIndex(int index)
    method Stop (line 277) | public void Stop()
    method ClearTransferTotal (line 310) | public void ClearTransferTotal(string server_addr)
    method TouchPACFile (line 325) | public void TouchPACFile()
    method TouchUserRuleFile (line 334) | public void TouchUserRuleFile()
    method UpdatePACFromGFWList (line 343) | public void UpdatePACFromGFWList()
    method UpdatePACFromOnlinePac (line 351) | public void UpdatePACFromOnlinePac(string url)
    method Reload (line 359) | protected void Reload()
    method SaveConfig (line 513) | protected void SaveConfig(Configuration newConfig)
    method UpdateSystemProxy (line 520) | private void UpdateSystemProxy()
    method pacServer_PACFileChanged (line 530) | private void pacServer_PACFileChanged(object sender, EventArgs e)
    method pacServer_PACUpdateCompleted (line 535) | private void pacServer_PACUpdateCompleted(object sender, GFWListUpdate...
    method pacServer_PACUpdateError (line 541) | private void pacServer_PACUpdateError(object sender, ErrorEventArgs e)
    method ShowConfigForm (line 547) | public void ShowConfigForm(int index)

FILE: shadowsocks-csharp/Controller/Socks5Forwarder.cs
  class Socks5Forwarder (line 14) | class Socks5Forwarder : Listener.Service
    method Socks5Forwarder (line 22) | public Socks5Forwarder(Configuration config, IPRangeSet IPRange)
    method Handle (line 28) | public bool Handle(byte[] firstPacket, int length, Socket socket)
    method Handle (line 33) | public bool Handle(byte[] firstPacket, int length, Socket socket, stri...
    method IsHandle (line 51) | public int IsHandle(byte[] firstPacket, int length, Socket socket)
    class Handler (line 201) | class Handler
      method Start (line 229) | public void Start(Configuration config, IPRangeSet IPRange, byte[] f...
      method Connect (line 241) | private void Connect()
      method ConnectProxyServer (line 371) | private bool ConnectProxyServer(string strRemoteHost, int iRemotePort)
      method ConnectCallback (line 389) | private void ConnectCallback(IAsyncResult ar)
      method ResetTimeout (line 414) | private void ResetTimeout(Double time)
      method timer_Elapsed (line 458) | private void timer_Elapsed(object sender, ElapsedEventArgs e)
      method StartPipe (line 467) | private void StartPipe()
      method PipeRemoteReceiveCallback (line 491) | private void PipeRemoteReceiveCallback(IAsyncResult ar)
      method PipeRemoteReceiveLoop (line 527) | private void PipeRemoteReceiveLoop()
      method PipeConnectionReceiveCallback (line 581) | private void PipeConnectionReceiveCallback(IAsyncResult ar)
      method CloseSocket (line 611) | private void CloseSocket(ProxySocketTun sock)
      method Close (line 632) | public void Close()
      method Shutdown (line 649) | public override void Shutdown()

FILE: shadowsocks-csharp/Controller/SpeedTest.cs
  class SpeedTester (line 10) | class SpeedTester
    type TransLog (line 13) | struct TransLog
    method BeginConnect (line 33) | public void BeginConnect()
    method EndConnect (line 38) | public void EndConnect()
    method BeginUpload (line 43) | public void BeginUpload()
    method BeginDownload (line 48) | public bool BeginDownload()
    method AddDownloadSize (line 58) | public bool AddDownloadSize(int size)
    method AddProtocolRecvSize (line 83) | public void AddProtocolRecvSize(int size)
    method AddRecvSize (line 88) | public void AddRecvSize(int size)
    method AddUploadSize (line 93) | public bool AddUploadSize(int size)
    method TransferLog (line 115) | public string TransferLog()
  class ProtocolResponseDetector (line 134) | class ProtocolResponseDetector
    type Protocol (line 136) | public enum Protocol
    method ProtocolResponseDetector (line 154) | public ProtocolResponseDetector()
    method OnSend (line 159) | public void OnSend(byte[] send_data, int length)
    method OnRecv (line 197) | public int OnRecv(byte[] recv_data, int length)
    method Finish (line 236) | protected void Finish()

FILE: shadowsocks-csharp/Controller/SystemProxy.cs
  type INTERNET_OPTION (line 14) | public enum INTERNET_OPTION
  type INTERNET_PER_CONN_OptionEnum (line 38) | public enum INTERNET_PER_CONN_OptionEnum
  type INTERNET_OPTION_PER_CONN_FLAGS (line 55) | [Flags]
  type INTERNET_OPTION_PER_CONN_FLAGS_UI (line 73) | [Flags]
  type INTERNET_PER_CONN_OPTION_OptionUnion (line 87) | [StructLayout(LayoutKind.Explicit)]
    method Dispose (line 98) | public void Dispose()
    method Dispose (line 104) | private void Dispose(bool disposing)
  type INTERNET_PER_CONN_OPTION (line 117) | [StructLayout(LayoutKind.Sequential)]
  type INTERNET_PER_CONN_OPTION_LIST (line 125) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
    method Dispose (line 139) | public void Dispose()
    method Dispose (line 145) | private void Dispose(bool disposing)
  class WinINet (line 163) | public static class WinINet
    method SetIEProxy (line 168) | private static void SetIEProxy(bool enable, bool global, string proxyS...
    method SetIEProxy (line 306) | public static void SetIEProxy(bool enable, bool global, string proxySe...
  class RemoteAccessService (line 330) | internal static class RemoteAccessService
    type RasFieldSizeConstants (line 332) | private enum RasFieldSizeConstants
    type RasEntryName (line 356) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
    method RasEnumEntries (line 402) | [DllImport("rasapi32.dll", CharSet = CharSet.Auto)]
    method GetAllConns (line 425) | public static uint GetAllConns(ref string[] allConns)
  class SystemProxy (line 474) | public class SystemProxy
    method NotifyIE (line 481) | public static void NotifyIE()
    method RegistrySetValue (line 489) | public static void RegistrySetValue(RegistryKey registry, string name,...
    method OpenUserRegKey (line 500) | public static RegistryKey OpenUserRegKey(string name, bool writable)
    method Update (line 516) | public static void Update(Configuration config, bool forceDisable)
    method CopyProxySettingFromLan (line 601) | private static void CopyProxySettingFromLan()
    method BytePushback (line 632) | private static void BytePushback(byte[] buffer, ref int buffer_len, in...
    method BytePushback (line 638) | private static void BytePushback(byte[] buffer, ref int buffer_len, st...
    method GenConnectionSettings (line 646) | private static byte[] GenConnectionSettings(Configuration config, int ...
    method IEProxyUpdate (line 678) | private static void IEProxyUpdate(Configuration config, int sysProxyMode)
  class NativeMethods (line 712) | internal static class NativeMethods
    method InternetSetOption (line 714) | [DllImport("wininet.dll", CharSet = CharSet.Auto, SetLastError = true)]

FILE: shadowsocks-csharp/Controller/UpdateChecker.cs
  class UpdateChecker (line 11) | public class UpdateChecker
    method CheckUpdate (line 40) | public void CheckUpdate(Configuration config)
    method CompareVersion (line 72) | public static int CompareVersion(string l, string r)
    class VersionComparer (line 88) | public class VersionComparer : IComparer<string>
      method Compare (line 91) | public int Compare(string x, string y)
    method ParseVersionFromURL (line 98) | private static string ParseVersionFromURL(string url)
    method SortVersions (line 111) | private void SortVersions(List<string> versions)
    method IsNewVersion (line 116) | private bool IsNewVersion(string url)
    method http_DownloadStringCompleted (line 162) | private void http_DownloadStringCompleted(object sender, DownloadStrin...

FILE: shadowsocks-csharp/Controller/UpdateFreeNode.cs
  class UpdateFreeNode (line 14) | public class UpdateFreeNode
    method CheckUpdate (line 25) | public void CheckUpdate(Configuration config, ServerSubscribe subscrib...
    method http_DownloadStringCompleted (line 62) | private void http_DownloadStringCompleted(object sender, DownloadStrin...
  class UpdateSubscribeManager (line 90) | public class UpdateSubscribeManager
    method CreateTask (line 99) | public void CreateTask(Configuration config, UpdateFreeNode updater, i...
    method Next (line 124) | public bool Next()

FILE: shadowsocks-csharp/Encryption/EncryptorBase.cs
  type EncryptorInfo (line 6) | public struct EncryptorInfo
    method EncryptorInfo (line 14) | public EncryptorInfo(int key, int iv, bool display, int type, string n...
  class EncryptorBase (line 23) | public abstract class EncryptorBase
    method EncryptorBase (line 28) | protected EncryptorBase(string method, string password)
    method GetPasswordHash (line 37) | protected byte[] GetPasswordHash()
    method SetIV (line 43) | public abstract bool SetIV(byte[] iv);
    method Encrypt (line 44) | public abstract void Encrypt(byte[] buf, int length, byte[] outbuf, ou...
    method Decrypt (line 46) | public abstract void Decrypt(byte[] buf, int length, byte[] outbuf, ou...
    method ResetEncrypt (line 47) | public abstract void ResetEncrypt();
    method ResetDecrypt (line 48) | public abstract void ResetDecrypt();
    method Dispose (line 50) | public abstract void Dispose();
    method getIV (line 51) | public abstract byte[] getIV();
    method getKey (line 52) | public abstract byte[] getKey();
    method getInfo (line 53) | public abstract EncryptorInfo getInfo();

FILE: shadowsocks-csharp/Encryption/EncryptorFactory.cs
  class EncryptorFactory (line 7) | public static class EncryptorFactory
    method EncryptorFactory (line 14) | static EncryptorFactory()
    method GetEncryptor (line 59) | public static List<string> GetEncryptor()
    method GetEncryptor (line 64) | public static IEncryptor GetEncryptor(string method, string password, ...
    method GetEncryptorInfo (line 77) | public static EncryptorInfo GetEncryptorInfo(string method)

FILE: shadowsocks-csharp/Encryption/IEncryptor.cs
  type IEncryptor (line 7) | public interface IEncryptor : IDisposable
    method SetIV (line 9) | bool SetIV(byte[] iv);
    method Encrypt (line 10) | void Encrypt(byte[] buf, int length, byte[] outbuf, out int outlength);
    method Decrypt (line 11) | void Decrypt(byte[] buf, int length, byte[] outbuf, out int outlength);
    method ResetEncrypt (line 12) | void ResetEncrypt();
    method ResetDecrypt (line 13) | void ResetDecrypt();
    method getIV (line 14) | byte[] getIV();
    method getKey (line 15) | byte[] getKey();
    method getInfo (line 16) | EncryptorInfo getInfo();

FILE: shadowsocks-csharp/Encryption/IVEncryptor.cs
  class IVEncryptor (line 9) | public abstract class IVEncryptor
    method IVEncryptor (line 32) | public IVEncryptor(string method, string password, bool cache)
    method getCiphers (line 38) | protected abstract Dictionary<string, EncryptorInfo> getCiphers();
    method SetIV (line 40) | public override bool SetIV(byte[] iv)
    method getIV (line 51) | public override byte[] getIV()
    method getKey (line 55) | public override byte[] getKey()
    method getInfo (line 61) | public override EncryptorInfo getInfo()
    method InitKey (line 66) | protected void InitKey(string method, string password)
    method bytesToKey (line 101) | protected void bytesToKey(byte[] password, byte[] key)
    method randBytes (line 123) | protected static void randBytes(byte[] buf, int length)
    method initCipher (line 131) | protected virtual void initCipher(byte[] iv, bool isCipher)
    method cipherUpdate (line 148) | protected abstract void cipherUpdate(bool isCipher, int length, byte[]...
    method Encrypt (line 150) | public override void Encrypt(byte[] buf, int length, byte[] outbuf, ou...
    method Decrypt (line 169) | public override void Decrypt(byte[] buf, int length, byte[] outbuf, ou...
    method ResetEncrypt (line 216) | public override void ResetEncrypt()
    method ResetDecrypt (line 223) | public override void ResetDecrypt()
  class NoneEncryptor (line 230) | public class NoneEncryptor
    method NoneEncryptor (line 233) | public NoneEncryptor(string method, string password, bool cache)
    method SupportedCiphers (line 243) | public static List<string> SupportedCiphers()
    method getCiphers (line 248) | protected override Dictionary<string, EncryptorInfo> getCiphers()
    method cipherUpdate (line 253) | protected override void cipherUpdate(bool isCipher, int length, byte[]...
    method Dispose (line 266) | public override void Dispose()
    method Dispose (line 277) | protected virtual void Dispose(bool disposing)

FILE: shadowsocks-csharp/Encryption/Libcrypto.cs
  class Libcrypto (line 11) | class Libcrypto
    method Libcrypto (line 17) | static Libcrypto()
    method isSupport (line 62) | public static bool isSupport()
    method is_cipher (line 75) | public static bool is_cipher(string cipher_name)
    method init (line 89) | public static IntPtr init(string cipher_name, byte[] key, byte[] iv, i...
    method update (line 120) | public static int update(IntPtr ctx, byte[] data, int length, byte[] o...
    method clean (line 127) | public static void clean(IntPtr ctx)
    method LoadLibrary (line 133) | [DllImport("Kernel32.dll")]
    method OpenSSL_add_all_ciphers (line 139) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method EVP_add_cipher (line 142) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method EVP_get_cipherbyname (line 145) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method EVP_aes_128_cfb (line 148) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method EVP_rc4 (line 151) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method EVP_CIPHER_CTX_new (line 154) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method EVP_CIPHER_CTX_cleanup (line 157) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method EVP_CIPHER_CTX_free (line 160) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method EVP_CipherInit_ex (line 163) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method EVP_CipherUpdate (line 166) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]

FILE: shadowsocks-csharp/Encryption/LibcryptoEncryptor.cs
  class LibcryptoEncryptor (line 8) | public class LibcryptoEncryptor
    method LibcryptoEncryptor (line 19) | public LibcryptoEncryptor(string method, string password, bool cache)
    method InitAviable (line 25) | public static void InitAviable()
    method SupportedCiphers (line 73) | public static List<string> SupportedCiphers()
    method isSupport (line 78) | public static bool isSupport()
    method getCiphers (line 83) | protected override Dictionary<string, EncryptorInfo> getCiphers()
    method initCipher (line 88) | protected override void initCipher(byte[] iv, bool isCipher)
    method cipherUpdate (line 131) | protected override void cipherUpdate(bool isCipher, int length, byte[]...
    method Dispose (line 143) | public override void Dispose()
    method Dispose (line 154) | protected virtual void Dispose(bool disposing)

FILE: shadowsocks-csharp/Encryption/MbedTLS.cs
  class MbedTLS (line 11) | public class MbedTLS
    type HMAC (line 27) | public interface HMAC
      method ComputeHash (line 29) | byte[] ComputeHash(byte[] buffer, int offset, int count);
    class HMAC_MD5 (line 32) | public class HMAC_MD5 : HMAC
      method HMAC_MD5 (line 36) | public HMAC_MD5(byte[] key)
      method ComputeHash (line 41) | public byte[] ComputeHash(byte[] buffer, int offset, int count)
    class HMAC_SHA1 (line 49) | public class HMAC_SHA1 : HMAC
      method HMAC_SHA1 (line 53) | public HMAC_SHA1(byte[] key)
      method ComputeHash (line 58) | public byte[] ComputeHash(byte[] buffer, int offset, int count)
    method MbedTLS (line 66) | static MbedTLS()
    method MD5 (line 96) | public static byte[] MD5(byte[] input)
    method SHA1 (line 103) | public static byte[] SHA1(byte[] input)
    method SHA512 (line 110) | public static byte[] SHA512(byte[] input)
    method LoadLibrary (line 117) | [DllImport("Kernel32.dll")]
    method cipher_info_from_string (line 120) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method cipher_init (line 123) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method cipher_setup (line 126) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method cipher_setkey (line 130) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method cipher_set_iv (line 133) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method cipher_reset (line 136) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method cipher_update (line 139) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method cipher_free (line 142) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method md5 (line 145) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method ss_md (line 148) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method ss_hmac_ex (line 151) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method cipher_get_size_ex (line 154) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]

FILE: shadowsocks-csharp/Encryption/MbedTLSEncryptor.cs
  class MbedTLSEncryptor (line 7) | public class MbedTLSEncryptor
    method MbedTLSEncryptor (line 18) | public MbedTLSEncryptor(string method, string password, bool cache)
    method SupportedCiphers (line 42) | public static List<string> SupportedCiphers()
    method getCiphers (line 47) | protected override Dictionary<string, EncryptorInfo> getCiphers()
    method initCipher (line 52) | protected override void initCipher(byte[] iv, bool isCipher)
    method cipherUpdate (line 100) | protected override void cipherUpdate(bool isCipher, int length, byte[]...
    method Dispose (line 115) | public override void Dispose()
    method Dispose (line 126) | protected virtual void Dispose(bool disposing)

FILE: shadowsocks-csharp/Encryption/RSA.cs
  class RSA (line 8) | class RSA
    method SignatureVerify (line 10) | public static bool SignatureVerify(string p_strKeyPublic, byte[] rgb, ...

FILE: shadowsocks-csharp/Encryption/Sodium.cs
  class Sodium (line 11) | public class Sodium
    method Sodium (line 15) | static Sodium()
    method LoadLibrary (line 39) | [DllImport("Kernel32.dll")]
    method crypto_stream_salsa20_xor_ic (line 42) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method crypto_stream_xsalsa20_xor_ic (line 45) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method crypto_stream_chacha20_xor_ic (line 48) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method crypto_stream_xchacha20_xor_ic (line 51) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
    method crypto_stream_chacha20_ietf_xor_ic (line 54) | [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]

FILE: shadowsocks-csharp/Encryption/SodiumEncryptor.cs
  class SodiumEncryptor (line 7) | public class SodiumEncryptor
    method SodiumEncryptor (line 28) | public SodiumEncryptor(string method, string password, bool cache)
    method getCiphers (line 62) | protected override Dictionary<string, EncryptorInfo> getCiphers()
    method SupportedCiphers (line 67) | public static List<string> SupportedCiphers()
    method cipherUpdate (line 72) | protected override void cipherUpdate(bool isCipher, int length, byte[]...
    method ResetEncrypt (line 112) | public override void ResetEncrypt()
    method ResetDecrypt (line 119) | public override void ResetDecrypt()
    method crypto_stream_chacha20_ietf_xor_ic (line 126) | void crypto_stream_chacha20_ietf_xor_ic(byte[] c, byte[] m, ulong mlen...
    method Dispose (line 131) | public override void Dispose()

FILE: shadowsocks-csharp/Model/Configuration.cs
  class UriVisitTime (line 13) | public class UriVisitTime : IComparable
    method CompareTo (line 19) | public int CompareTo(object other)
  type PortMapType (line 30) | public enum PortMapType : int
  type ProxyRuleMode (line 37) | public enum ProxyRuleMode : int
  class PortMapConfig (line 46) | [Serializable]
  class PortMapConfigCache (line 57) | public class PortMapConfigCache
  class ServerSubscribe (line 66) | [Serializable]
  class GlobalConfiguration (line 77) | public class GlobalConfiguration
  class ConfigurationException (line 82) | [Serializable()]
    method ConfigurationException (line 85) | public ConfigurationException() : base() { }
    method ConfigurationException (line 86) | public ConfigurationException(string message) : base(message) { }
    method ConfigurationException (line 87) | public ConfigurationException(string message, System.Exception inner) ...
    method ConfigurationException (line 88) | protected ConfigurationException(System.Runtime.Serialization.Serializ...
  class ConfigurationWarning (line 92) | [Serializable()]
    method ConfigurationWarning (line 95) | public ConfigurationWarning() : base() { }
    method ConfigurationWarning (line 96) | public ConfigurationWarning(string message) : base(message) { }
    method ConfigurationWarning (line 97) | public ConfigurationWarning(string message, System.Exception inner) : ...
    method ConfigurationWarning (line 98) | protected ConfigurationWarning(System.Runtime.Serialization.Serializat...
  class Configuration (line 103) | [Serializable]
    method SetPassword (line 155) | public static void SetPassword(string password)
    method SetPasswordTry (line 160) | public static bool SetPasswordTry(string old_password, string password)
    method KeepCurrentServer (line 167) | public bool KeepCurrentServer(int localPort, string targetAddr, string...
    method GetCurrentServer (line 200) | public Server GetCurrentServer(int localPort, ServerSelectStrategy.Fil...
    method FlushPortMapCache (line 303) | public void FlushPortMapCache()
    method GetPortMapCache (line 362) | public Dictionary<int, PortMapConfigCache> GetPortMapCache()
    method CheckServer (line 367) | public static void CheckServer(Server server)
    method Configuration (line 384) | public Configuration()
    method CopyFrom (line 412) | public void CopyFrom(Configuration config)
    method FixConfiguration (line 445) | public void FixConfiguration()
    method randString (line 492) | private static string randString(int len)
    method LoadFile (line 504) | public static Configuration LoadFile(string filename)
    method Load (line 521) | public static Configuration Load()
    method Save (line 526) | public static void Save(Configuration config)
    method Load (line 571) | public static Configuration Load(string config_str)
    method GetDefaultServer (line 612) | public static Server GetDefaultServer()
    method isDefaultConfig (line 617) | public bool isDefaultConfig()
    method CopyServer (line 624) | public static Server CopyServer(Server server)
    method GetErrorServer (line 642) | public static Server GetErrorServer()
    method CheckPort (line 649) | public static void CheckPort(int port)
    method CheckPassword (line 657) | private static void CheckPassword(string password)
    method CheckServer (line 666) | private static void CheckServer(string server)
    class JsonSerializerStrategy (line 674) | private class JsonSerializerStrategy : SimpleJson.PocoJsonSerializerSt...
      method DeserializeObject (line 677) | public override object DeserializeObject(object value, Type type)
  class ServerTrans (line 688) | [Serializable]
    method AddUpload (line 694) | void AddUpload(long bytes)
    method AddDownload (line 701) | void AddDownload(long bytes)
  class ServerTransferTotal (line 710) | [Serializable]
    method Load (line 719) | public static ServerTransferTotal Load()
    method Init (line 755) | public void Init()
    method Save (line 763) | public static void Save(ServerTransferTotal config)
    method Clear (line 789) | public void Clear(string server)
    method AddUpload (line 801) | public void AddUpload(string server, Int64 size)
    method AddDownload (line 822) | public void AddDownload(string server, Int64 size)
    class JsonSerializerStrategy (line 844) | private class JsonSerializerStrategy : SimpleJson.PocoJsonSerializerSt...
      method DeserializeObject (line 846) | public override object DeserializeObject(object value, Type type)

FILE: shadowsocks-csharp/Model/Host.cs
  class HostNode (line 8) | class HostNode
    method HostNode (line 14) | public HostNode()
    method HostNode (line 21) | public HostNode(bool sub, string addr)
  class HostMap (line 29) | public class HostMap
    method Instance (line 37) | public static HostMap Instance()
    method Clear (line 42) | public void Clear(HostMap newInstance)
    method AddHost (line 54) | public void AddHost(string host, string addr)
    method GetHost (line 91) | public bool GetHost(string host, out string addr)
    method GetIP (line 121) | public bool GetIP(IPAddress ip, out string addr)
    method LoadHostFile (line 128) | public bool LoadHostFile()

FILE: shadowsocks-csharp/Model/IPRangeSet.cs
  class IPRangeSet (line 9) | public class IPRangeSet
    method IPRangeSet (line 16) | public IPRangeSet()
    method InsertRange (line 21) | public void InsertRange(uint begin, uint end)
    method Insert (line 33) | public void Insert(uint begin, uint size)
    method Insert (line 38) | public void Insert(IPAddress addr, uint size)
    method Insert (line 45) | public void Insert(IPAddress addr_beg, IPAddress addr_end)
    method isIn (line 54) | public bool isIn(uint ip)
    method IsInIPRange (line 62) | public bool IsInIPRange(IPAddress addr)
    method LoadApnic (line 69) | public bool LoadApnic(string zone)
    method LoadChn (line 120) | public bool LoadChn()
    method Reverse (line 157) | public void Reverse()

FILE: shadowsocks-csharp/Model/IPSegment.cs
  class IPAddressCmp (line 8) | public class IPAddressCmp : System.Net.IPAddress, IComparable
    method IPAddressCmp (line 10) | public IPAddressCmp(System.Net.IPAddress ip)
    method IPAddressCmp (line 15) | public IPAddressCmp(byte[] ip)
    method IPAddressCmp (line 20) | public IPAddressCmp(string ip)
    method FromString (line 25) | public static System.Net.IPAddress FromString(string ip)
    method CompareTo (line 32) | public int CompareTo(object obj)
    method ToIPv6 (line 51) | public IPAddressCmp ToIPv6()
    method Inc (line 61) | public IPAddressCmp Inc()
  class IPSegment (line 85) | public class IPSegment
    method IPSegment (line 89) | public IPSegment(object val = null)
    method insert (line 94) | public bool insert(IPAddressCmp ipStart, IPAddressCmp ipEnd, object val)
    method Get (line 167) | public object Get(IPAddressCmp ip)

FILE: shadowsocks-csharp/Model/LRUCache.cs
  class LRUCache (line 8) | public class LRUCache<K, V>
    method LRUCache (line 16) | public LRUCache(int sweep_time = 60 * 60)
    method SetTimeout (line 21) | public void SetTimeout(int time)
    method Clear (line 26) | public void Clear()
    method isTimeout (line 36) | public bool isTimeout(K key)
    method ContainsKey (line 48) | public bool ContainsKey(K key)
    method Get (line 56) | public V Get(K key)
    method Set (line 78) | public V Set(K key, V val)
    method Del (line 101) | public void Del(K key)
    method Sweep (line 116) | public void Sweep()

FILE: shadowsocks-csharp/Model/MinSearchTree.cs
  type MinSearchTreeNode (line 7) | public struct MinSearchTreeNode
  class MinSearchTree (line 15) | public class MinSearchTree
    method MinSearchTree (line 22) | public MinSearchTree(int size)
    method GetLevel (line 38) | protected int GetLevel(int size)
    method _Init (line 50) | protected void _Init(int index, int level, int range_min, int range_max)
    method Init (line 65) | public void Init()
    method Clone (line 79) | public MinSearchTree Clone()
    method Update (line 89) | public void Update(int[] add_list)
    method Update (line 103) | public void Update(Dictionary<int, long> add_map)
    method Maintain (line 121) | protected void Maintain(int index)
    method Update (line 140) | public void Update(int index, int add = 1)
    method FindMinCount (line 147) | public int FindMinCount(int index, int range_min, int range_max, out l...
    method FindNthMin (line 190) | public int FindNthMin(int index, int range_min, int range_max, int nth...
    method FindMinCount2 (line 225) | public int FindMinCount2(int index, int range_min, int range_max, out ...
    method FindNthMin2 (line 248) | public int FindNthMin2(int range_min, int range_max, int nth)
    method RandomFindIndex (line 272) | public int RandomFindIndex(int range_min, int range_max, Random random)
    method GetMin (line 281) | public long GetMin(int range_min, int range_max)

FILE: shadowsocks-csharp/Model/Server.cs
  class DnsBuffer (line 16) | public class DnsBuffer
    method isExpired (line 22) | public bool isExpired(string host)
    method UpdateDns (line 29) | public void UpdateDns(string host, IPAddress ip)
  class Connections (line 38) | public class Connections
    method AddRef (line 41) | public bool AddRef(IHandler socket)
    method DecRef (line 56) | public bool DecRef(IHandler socket)
    method CloseAll (line 75) | public void CloseAll()
  class Server (line 104) | [Serializable]
    method CopyServer (line 136) | public void CopyServer(Server Server)
    method CopyServerInfo (line 146) | public void CopyServerInfo(Server Server)
    method GetForwardServerRef (line 152) | public static Server GetForwardServerRef()
    method SetConnections (line 157) | public void SetConnections(Connections Connections)
    method GetConnections (line 162) | public Connections GetConnections()
    method DnsBuffer (line 167) | public DnsBuffer DnsBuffer()
    method ServerSpeedLog (line 172) | public ServerSpeedLog ServerSpeedLog()
    method SetServerSpeedLog (line 176) | public void SetServerSpeedLog(ServerSpeedLog log)
    method FriendlyName (line 206) | public string FriendlyName()
    method HiddenName (line 236) | public string HiddenName(bool hide = true)
    method Clone (line 271) | public Server Clone()
    method Server (line 291) | public Server()
    method Server (line 311) | public Server(string ssURL, string force_group) : this()
    method isMatchServer (line 327) | public bool isMatchServer(Server server)
    method ParseParam (line 344) | private Dictionary<string, string> ParseParam(string param_str)
    method ServerFromSSR (line 362) | public void ServerFromSSR(string ssrURL, string force_group)
    method ServerFromSS (line 430) | public void ServerFromSS(string ssURL, string force_group)
    method GetSSLinkForServer (line 454) | public string GetSSLinkForServer()
    method GetSSRLinkForServer (line 461) | public string GetSSRLinkForServer()
    method isEnable (line 489) | public bool isEnable()
    method setEnable (line 494) | public void setEnable(bool enable)
    method getObfsData (line 499) | public object getObfsData()
    method setObfsData (line 503) | public void setObfsData(object data)
    method getProtocolData (line 508) | public object getProtocolData()
    method setProtocolData (line 512) | public void setProtocolData(object data)
    method tcpingLatency (line 517) | public void tcpingLatency()

FILE: shadowsocks-csharp/Model/ServerSelectStrategy.cs
  class ServerSelectStrategy (line 7) | public class ServerSelectStrategy
    type ServerIndex (line 20) | private struct ServerIndex
      method ServerIndex (line 24) | public ServerIndex(int i, Server s)
    method lowerBound (line 30) | private int lowerBound(List<double> data, double target)
    method Algorithm2 (line 45) | private double Algorithm2(ServerSpeedLog serverSpeedLog) // perfer les...
    method Algorithm3 (line 69) | private double Algorithm3(ServerSpeedLog serverSpeedLog) // perfer les...
    method Algorithm4 (line 93) | private double Algorithm4(ServerSpeedLog serverSpeedLog, long avg_spee...
    method SubSelect (line 122) | protected int SubSelect(List<Server> configs, int curIndex, string alg...
    method Select (line 350) | public int Select(List<Server> configs, int curIndex, string algorithm...

FILE: shadowsocks-csharp/Model/ServerSpeedLog.cs
  class TransLog (line 7) | public class TransLog
    method TransLog (line 14) | public TransLog(int s, DateTime t)
  class ErrorLog (line 24) | public class ErrorLog
    method ErrorLog (line 28) | public ErrorLog(int no)
  class ServerSpeedLogShow (line 35) | [Serializable]
  class ServerSpeedLog (line 55) | public class ServerSpeedLog
    method ServerSpeedLog (line 77) | public ServerSpeedLog()
    method ServerSpeedLog (line 82) | public ServerSpeedLog(long upload, long download)
    method GetTransSpeed (line 91) | public void GetTransSpeed(out long upload, out long download)
    method ClearTrans (line 97) | public void ClearTrans()
    method Translate (line 106) | public ServerSpeedLogShow Translate()
    method UpdateMaxTrans (line 191) | protected static long UpdateMaxTrans(long lastMaxTrans, List<TransLog>...
    method ClearError (line 291) | public void ClearError()
    method ClearMaxSpeed (line 308) | public void ClearMaxSpeed()
    method Clear (line 316) | public void Clear()
    method AddConnectTimes (line 338) | public void AddConnectTimes()
    method AddDisconnectTimes (line 345) | public void AddDisconnectTimes()
    method Sweep (line 352) | protected void Sweep()
    method AddNoErrorTimes (line 379) | public void AddNoErrorTimes()
    method AddErrorTimes (line 388) | public void AddErrorTimes()
    method AddTimeoutTimes (line 398) | public void AddTimeoutTimes()
    method AddErrorDecodeTimes (line 408) | public void AddErrorDecodeTimes()
    method AddErrorEmptyTimes (line 418) | public void AddErrorEmptyTimes()
    method UpdateTransLog (line 428) | protected static void UpdateTransLog(List<TransLog> transLog, int byte...
    method AddUploadBytes (line 511) | public void AddUploadBytes(int bytes, DateTime now, bool updateMaxTrans)
    method AddDownloadBytes (line 519) | public void AddDownloadBytes(int bytes, DateTime now, bool updateMaxTr...
    method AddDownloadRawBytes (line 527) | public void AddDownloadRawBytes(long bytes)
    method ResetErrorDecodeTimes (line 534) | public void ResetErrorDecodeTimes()
    method ResetContinurousTimes (line 543) | public void ResetContinurousTimes()
    method ResetEmptyTimes (line 551) | public void ResetEmptyTimes()
    method AddConnectTime (line 558) | public void AddConnectTime(int millisecond)

FILE: shadowsocks-csharp/Obfs/Auth.cs
  class AuthData (line 9) | public class AuthData : VerifyData
  class AuthSHA1 (line 15) | public class AuthSHA1 : VerifySimpleBase
    method AuthSHA1 (line 17) | public AuthSHA1(string method)
    method SupportedObfs (line 31) | public static List<string> SupportedObfs()
    method GetObfs (line 36) | public override Dictionary<string, int[]> GetObfs()
    method InitData (line 41) | public override object InitData()
    method PackData (line 46) | public void PackData(byte[] data, int datalength, byte[] outdata, out ...
    method PackAuthData (line 59) | public void PackAuthData(byte[] data, int datalength, byte[] outdata, ...
    method ClientPreEncrypt (line 103) | public override byte[] ClientPreEncrypt(byte[] plaindata, int dataleng...
    method ClientPostDecrypt (line 153) | public override byte[] ClientPostDecrypt(byte[] plaindata, int datalen...
  class AuthSHA1V2 (line 188) | public class AuthSHA1V2 : VerifySimpleBase
    method AuthSHA1V2 (line 190) | public AuthSHA1V2(string method)
    method SupportedObfs (line 204) | public static List<string> SupportedObfs()
    method GetObfs (line 209) | public override Dictionary<string, int[]> GetObfs()
    method InitData (line 214) | public override object InitData()
    method isKeepAlive (line 219) | public override bool isKeepAlive()
    method isAlwaysSendback (line 224) | public override bool isAlwaysSendback()
    method PackData (line 229) | public void PackData(byte[] data, int datalength, byte[] outdata, out ...
    method PackAuthData (line 256) | public void PackAuthData(byte[] data, int datalength, byte[] outdata, ...
    method ClientPreEncrypt (line 315) | public override byte[] ClientPreEncrypt(byte[] plaindata, int dataleng...
    method ClientPostDecrypt (line 368) | public override byte[] ClientPostDecrypt(byte[] plaindata, int datalen...
  class AuthSHA1V4 (line 411) | public class AuthSHA1V4 : VerifySimpleBase
    method AuthSHA1V4 (line 413) | public AuthSHA1V4(string method)
    method SupportedObfs (line 429) | public static List<string> SupportedObfs()
    method GetObfs (line 434) | public override Dictionary<string, int[]> GetObfs()
    method InitData (line 439) | public override object InitData()
    method isKeepAlive (line 444) | public override bool isKeepAlive()
    method isAlwaysSendback (line 449) | public override bool isAlwaysSendback()
    method GetOverhead (line 454) | public override int GetOverhead()
    method PackData (line 459) | public void PackData(byte[] data, int datalength, byte[] outdata, out ...
    method PackAuthData (line 488) | public void PackAuthData(byte[] data, int datalength, byte[] outdata, ...
    method ClientPreEncrypt (line 552) | public override byte[] ClientPreEncrypt(byte[] plaindata, int dataleng...
    method ClientPostDecrypt (line 605) | public override byte[] ClientPostDecrypt(byte[] plaindata, int datalen...
  class AuthDataAes128 (line 657) | protected class AuthDataAes128 : AuthData
  method AuthAES128SHA1 (line 662) | public AuthAES128SHA1(string method)
  method SupportedObfs (line 704) | public static List<string> SupportedObfs()
  method GetObfs (line 709) | public override Dictionary<string, int[]> GetObfs()
  method InitData (line 714) | public override object InitData()
  method isKeepAlive (line 719) | public override bool isKeepAlive()
  method isAlwaysSendback (line 724) | public override bool isAlwaysSendback()
  method GetOverhead (line 729) | public override int GetOverhead()
  method CreateHMAC (line 734) | protected MbedTLS.HMAC CreateHMAC(byte[] key)
  method Sync (line 743) | protected void Sync()
  method RandomInMin (line 762) | protected int RandomInMin(int dataLengthMin, int dataLengthMax)
  method AddPacket (line 772) | protected void AddPacket(int length)
  method StatisticsInit (line 795) | protected void StatisticsInit(AuthDataAes128 authData)
  method GetRandLen (line 808) | protected int GetRandLen(int datalength, int fulldatalength, bool nopadd...
  method GenRandLenFull (line 823) | protected int GenRandLenFull(int packetlength, int fulldatalength, bool ...
  method GenRandLen (line 838) | protected int GenRandLen(int packetlength, int maxpacketlength)
  method PackData (line 844) | public void PackData(byte[] data, int datalength, int fulldatalength, by...
  method PackAuthData (line 889) | public void PackAuthData(byte[] data, int datalength, byte[] outdata, ou...

FILE: shadowsocks-csharp/Obfs/AuthAkarin.cs
  class AuthAkarin (line 10) | class AuthAkarin : VerifySimpleBase
    class AuthDataAesChain (line 12) | protected class AuthDataAesChain : AuthData
    method AuthAkarin (line 16) | public AuthAkarin(string method)
    method SupportedObfs (line 55) | public static List<string> SupportedObfs()
    method GetObfs (line 60) | public override Dictionary<string, int[]> GetObfs()
    method InitData (line 65) | public override object InitData()
    method isKeepAlive (line 70) | public override bool isKeepAlive()
    method isAlwaysSendback (line 75) | public override bool isAlwaysSendback()
    method GetOverhead (line 80) | public override int GetOverhead()
    method CreateHMAC (line 85) | protected MbedTLS.HMAC CreateHMAC(byte[] key)
    method GetSendRandLen (line 90) | protected virtual int GetSendRandLen(int datalength, xorshift128plus r...
    method GetRecvRandLen (line 110) | protected virtual int GetRecvRandLen(int datalength, xorshift128plus r...
    method UdpGetRandLen (line 130) | protected int UdpGetRandLen(xorshift128plus random, byte[] last_hash)
    method GetSendRandLen (line 136) | protected int GetSendRandLen(int datalength)
    method PackData (line 141) | public void PackData(byte[] data, int datalength, byte[] outdata, out ...
    method PackAuthData (line 203) | public void PackAuthData(byte[] data, int datalength, byte[] outdata, ...
    method ClientPreEncrypt (line 323) | public override byte[] ClientPreEncrypt(byte[] plaindata, int dataleng...
    method ClientPostDecrypt (line 417) | public override byte[] ClientPostDecrypt(byte[] plaindata, int datalen...
    method ClientUdpPreEncrypt (line 477) | public override byte[] ClientUdpPreEncrypt(byte[] plaindata, int datal...
    method ClientUdpPostDecrypt (line 535) | public override byte[] ClientUdpPostDecrypt(byte[] plaindata, int data...
  class AuthAkarin_spec_a (line 565) | class AuthAkarin_spec_a : AuthAkarin
    method AuthAkarin_spec_a (line 567) | public AuthAkarin_spec_a(string method)
    method SupportedObfs (line 580) | public static new List<string> SupportedObfs()
    method GetObfs (line 585) | public override Dictionary<string, int[]> GetObfs()
    method InitDataSizeList (line 590) | protected void InitDataSizeList()
    method SetServerInfo (line 613) | public override void SetServerInfo(ServerInfo serverInfo)
    method FindPos (line 619) | protected int FindPos(int[] arr, int key)
    method GetSendRandLen (line 643) | protected override int GetSendRandLen(int datalength, xorshift128plus ...
    method GetRecvRandLen (line 680) | protected override int GetRecvRandLen(int datalength, xorshift128plus ...

FILE: shadowsocks-csharp/Obfs/AuthChain.cs
  class xorshift128plus (line 10) | class xorshift128plus
    method xorshift128plus (line 15) | public xorshift128plus(int init_loop_ = 4)
    method next (line 21) | public UInt64 next()
    method init_from_bin (line 32) | public void init_from_bin(byte[] bytes)
    method init_from_bin (line 40) | public void init_from_bin(byte[] bytes, int datalength)
  class AuthChain_a (line 54) | class AuthChain_a : VerifySimpleBase
    class AuthDataAesChain (line 56) | protected class AuthDataAesChain : AuthData
    method AuthChain_a (line 60) | public AuthChain_a(string method)
    method SupportedObfs (line 96) | public static List<string> SupportedObfs()
    method GetObfs (line 101) | public override Dictionary<string, int[]> GetObfs()
    method InitData (line 106) | public override object InitData()
    method isKeepAlive (line 111) | public override bool isKeepAlive()
    method isAlwaysSendback (line 116) | public override bool isAlwaysSendback()
    method GetOverhead (line 121) | public override int GetOverhead()
    method CreateHMAC (line 126) | protected MbedTLS.HMAC CreateHMAC(byte[] key)
    method GetRandLen (line 131) | protected virtual int GetRandLen(int datalength, xorshift128plus rando...
    method UdpGetRandLen (line 145) | protected int UdpGetRandLen(xorshift128plus random, byte[] last_hash)
    method GetRandStartPos (line 151) | protected int GetRandStartPos(int rand_len, xorshift128plus random)
    method GetRandLen (line 158) | protected int GetRandLen(int datalength)
    method PackData (line 163) | public void PackData(byte[] data, int datalength, byte[] outdata, out ...
    method OnInitAuthData (line 207) | public virtual void OnInitAuthData(UInt64 unixTimestamp)
    method PackAuthData (line 212) | public void PackAuthData(byte[] data, int datalength, byte[] outdata, ...
    method ClientPreEncrypt (line 320) | public override byte[] ClientPreEncrypt(byte[] plaindata, int dataleng...
    method ClientPostDecrypt (line 414) | public override byte[] ClientPostDecrypt(byte[] plaindata, int datalen...
    method ClientUdpPreEncrypt (line 481) | public override byte[] ClientUdpPreEncrypt(byte[] plaindata, int datal...
    method ClientUdpPostDecrypt (line 534) | public override byte[] ClientUdpPostDecrypt(byte[] plaindata, int data...
  class AuthChain_b (line 558) | class AuthChain_b : AuthChain_a
    method AuthChain_b (line 560) | public AuthChain_b(string method)
    method SupportedObfs (line 573) | public static new List<string> SupportedObfs()
    method GetObfs (line 578) | public override Dictionary<string, int[]> GetObfs()
    method InitDataSizeList (line 583) | protected virtual void InitDataSizeList()
    method SetServerInfo (line 606) | public override void SetServerInfo(ServerInfo serverInfo)
    method FindPos (line 612) | protected int FindPos(int[] arr, int key)
    method GetRandLen (line 636) | protected override int GetRandLen(int datalength, xorshift128plus rand...
  class AuthChain_c (line 670) | class AuthChain_c : AuthChain_b
    method AuthChain_c (line 672) | public AuthChain_c(string method)
    method SupportedObfs (line 684) | public static new List<string> SupportedObfs()
    method GetObfs (line 689) | public override Dictionary<string, int[]> GetObfs()
    method InitDataSizeList (line 694) | protected override void InitDataSizeList()
    method SetServerInfo (line 708) | public override void SetServerInfo(ServerInfo serverInfo)
    method GetRandLen (line 714) | protected override int GetRandLen(int datalength, xorshift128plus rand...
  class AuthChain_d (line 740) | class AuthChain_d : AuthChain_c
    method AuthChain_d (line 742) | public AuthChain_d(string method)
    method SupportedObfs (line 752) | public static new List<string> SupportedObfs()
    method GetObfs (line 757) | public override Dictionary<string, int[]> GetObfs()
    method CheckAndPatchDataSize (line 762) | protected void CheckAndPatchDataSize(List<int> data_list, xorshift128p...
    method InitDataSizeList (line 771) | protected override void InitDataSizeList()
    method SetServerInfo (line 791) | public override void SetServerInfo(ServerInfo serverInfo)
    method GetRandLen (line 797) | protected override int GetRandLen(int datalength, xorshift128plus rand...
  class AuthChain_e (line 814) | class AuthChain_e : AuthChain_d
    method AuthChain_e (line 816) | public AuthChain_e(string method)
    method SupportedObfs (line 826) | public static new List<string> SupportedObfs()
    method GetObfs (line 831) | public override Dictionary<string, int[]> GetObfs()
    method GetRandLen (line 836) | protected override int GetRandLen(int datalength, xorshift128plus rand...
  class AuthChain_f (line 852) | class AuthChain_f : AuthChain_e
    method AuthChain_f (line 854) | public AuthChain_f(string method)
    method SupportedObfs (line 864) | public static new List<string> SupportedObfs()
    method GetObfs (line 869) | public override Dictionary<string, int[]> GetObfs()
    method InitDataSizeList (line 878) | protected override void InitDataSizeList()
    method SetServerInfo (line 904) | public override void SetServerInfo(ServerInfo serverInfo)
    method OnInitAuthData (line 922) | public override void OnInitAuthData(UInt64 unixTimestamp)

FILE: shadowsocks-csharp/Obfs/HttpSimpleObfs.cs
  class HttpSimpleObfs (line 7) | class HttpSimpleObfs : ObfsBase
    method HttpSimpleObfs (line 9) | public HttpSimpleObfs(string method)
    method SupportedObfs (line 58) | public static List<string> SupportedObfs()
    method GetObfs (line 63) | public override Dictionary<string, int[]> GetObfs()
    method data2urlencode (line 68) | private string data2urlencode(byte[] encryptdata, int datalength)
    method boundary (line 78) | private string boundary()
    method ClientEncode (line 89) | public override byte[] ClientEncode(byte[] encryptdata, int datalength...
    method FindSubArray (line 209) | private int FindSubArray(byte[] array, int length, byte[] subArray)
    method ClientDecode (line 227) | public override byte[] ClientDecode(byte[] encryptdata, int datalength...
  class TlsAuthData (line 264) | public class TlsAuthData
  class TlsTicketAuthObfs (line 270) | class TlsTicketAuthObfs : ObfsBase
    method TlsTicketAuthObfs (line 272) | public TlsTicketAuthObfs(string method)
    method SupportedObfs (line 294) | public static List<string> SupportedObfs()
    method GetObfs (line 299) | public override Dictionary<string, int[]> GetObfs()
    method InitData (line 304) | public override object InitData()
    method isAlwaysSendback (line 309) | public override bool isAlwaysSendback()
    method GetOverhead (line 314) | public override int GetOverhead()
    method sni (line 319) | protected byte[] sni(string url)
    method to_val (line 340) | protected byte to_val(char c)
    method to_bin (line 352) | protected byte[] to_bin(string str)
    method hmac_sha1 (line 362) | protected void hmac_sha1(byte[] data, int length)
    method PackAuthData (line 374) | public void PackAuthData(byte[] outdata)
    method PackData (line 400) | protected void PackData(byte[] data, ref int start, int len, byte[] ou...
    method ClientEncode (line 413) | public override byte[] ClientEncode(byte[] encryptdata, int datalength...
    method ClientDecode (line 582) | public override byte[] ClientDecode(byte[] encryptdata, int datalength...

FILE: shadowsocks-csharp/Obfs/IObfs.cs
  class ObfsException (line 5) | public class ObfsException : Exception
    method ObfsException (line 7) | public ObfsException(string info)
  class ServerInfo (line 13) | public class ServerInfo
    method ServerInfo (line 27) | public ServerInfo(string host, int port, string param, object data, by...
    method SetIV (line 42) | public void SetIV(byte[] iv)
  type IObfs (line 47) | public interface IObfs : IDisposable
    method Name (line 49) | string Name();
    method isKeepAlive (line 50) | bool isKeepAlive();
    method isAlwaysSendback (line 51) | bool isAlwaysSendback();
    method ClientPreEncrypt (line 52) | byte[] ClientPreEncrypt(byte[] plaindata, int datalength, out int outl...
    method ClientEncode (line 53) | byte[] ClientEncode(byte[] encryptdata, int datalength, out int outlen...
    method ClientDecode (line 54) | byte[] ClientDecode(byte[] encryptdata, int datalength, out int outlen...
    method ClientPostDecrypt (line 55) | byte[] ClientPostDecrypt(byte[] plaindata, int datalength, out int out...
    method ClientUdpPreEncrypt (line 56) | byte[] ClientUdpPreEncrypt(byte[] plaindata, int datalength, out int o...
    method ClientUdpPostDecrypt (line 57) | byte[] ClientUdpPostDecrypt(byte[] plaindata, int datalength, out int ...
    method InitData (line 58) | object InitData();
    method SetServerInfo (line 59) | void SetServerInfo(ServerInfo serverInfo);
    method SetServerInfoIV (line 60) | void SetServerInfoIV(byte[] iv);
    method GetSentLength (line 61) | long GetSentLength();
    method GetOverhead (line 62) | int GetOverhead();
    method GetTcpMSS (line 63) | int GetTcpMSS();

FILE: shadowsocks-csharp/Obfs/ObfsBase.cs
  class ObfsBase (line 7) | public abstract class ObfsBase: IObfs
    method ObfsBase (line 9) | protected ObfsBase(string method)
    method GetObfs (line 18) | public abstract Dictionary<string, int[]> GetObfs();
    method Name (line 20) | public string Name()
    method isKeepAlive (line 25) | public virtual bool isKeepAlive()
    method isAlwaysSendback (line 30) | public virtual bool isAlwaysSendback()
    method ClientPreEncrypt (line 36) | public virtual byte[] ClientPreEncrypt(byte[] plaindata, int datalengt...
    method ClientEncode (line 41) | public abstract byte[] ClientEncode(byte[] encryptdata, int datalength...
    method ClientDecode (line 42) | public abstract byte[] ClientDecode(byte[] encryptdata, int datalength...
    method ClientPostDecrypt (line 43) | public virtual byte[] ClientPostDecrypt(byte[] plaindata, int dataleng...
    method ClientUdpPreEncrypt (line 48) | public virtual byte[] ClientUdpPreEncrypt(byte[] plaindata, int datale...
    method ClientUdpPostDecrypt (line 53) | public virtual byte[] ClientUdpPostDecrypt(byte[] plaindata, int datal...
    method InitData (line 59) | public virtual object InitData()
    method SetServerInfo (line 63) | public virtual void SetServerInfo(ServerInfo serverInfo)
    method SetServerInfoIV (line 67) | public virtual void SetServerInfoIV(byte[] iv)
    method GetHeadSize (line 71) | public static int GetHeadSize(byte[] plaindata, int defaultValue)
    method GetSentLength (line 86) | public long GetSentLength()
    method GetOverhead (line 90) | public virtual int GetOverhead()
    method GetTcpMSS (line 95) | public int GetTcpMSS()
    method Dispose (line 104) | public void Dispose()
    method Dispose (line 110) | protected virtual void Dispose(bool disposing)

FILE: shadowsocks-csharp/Obfs/ObfsFactory.cs
  class ObfsFactory (line 7) | public static class ObfsFactory
    method ObfsFactory (line 13) | static ObfsFactory()
    method GetObfs (line 84) | public static IObfs GetObfs(string method)

FILE: shadowsocks-csharp/Obfs/Plain.cs
  class Plain (line 6) | public class Plain : ObfsBase
    method Plain (line 8) | public Plain(string method)
    method SupportedObfs (line 17) | public static List<string> SupportedObfs()
    method GetObfs (line 22) | public override Dictionary<string, int[]> GetObfs()
    method ClientEncode (line 27) | public override byte[] ClientEncode(byte[] encryptdata, int datalength...
    method ClientDecode (line 33) | public override byte[] ClientDecode(byte[] encryptdata, int datalength...

FILE: shadowsocks-csharp/Obfs/VerifySimpleObfs.cs
  class VerifyData (line 9) | public class VerifyData
  class VerifySimpleBase (line 13) | public abstract class VerifySimpleBase : ObfsBase
    method VerifySimpleBase (line 15) | public VerifySimpleBase(string method)
    method InitData (line 26) | public override object InitData()
    method SetServerInfo (line 31) | public override void SetServerInfo(ServerInfo serverInfo)
    method LinearRandomInt (line 36) | public int LinearRandomInt(int max)
    method NonLinearRandomInt (line 41) | public int NonLinearRandomInt(int max)
    method TrapezoidRandomFloat (line 65) | public double TrapezoidRandomFloat(double d) // -1 <= d <= 1
    method TrapezoidRandomInt (line 79) | public int TrapezoidRandomInt(int max, double d)
    method ClientEncode (line 85) | public override byte[] ClientEncode(byte[] encryptdata, int datalength...
    method ClientDecode (line 91) | public override byte[] ClientDecode(byte[] encryptdata, int datalength...
  class VerifyDeflateObfs (line 99) | public class VerifyDeflateObfs : VerifySimpleBase
    method VerifyDeflateObfs (line 101) | public VerifyDeflateObfs(string method)
    method SupportedObfs (line 109) | public static List<string> SupportedObfs()
    method GetObfs (line 114) | public override Dictionary<string, int[]> GetObfs()
    method PackData (line 119) | public void PackData(byte[] data, int datalength, byte[] outdata, out ...
    method ClientPreEncrypt (line 134) | public override byte[] ClientPreEncrypt(byte[] plaindata, int dataleng...
    method ClientPostDecrypt (line 169) | public override byte[] ClientPostDecrypt(byte[] plaindata, int datalen...

FILE: shadowsocks-csharp/Program.cs
  class Program (line 16) | static class Program
    method Main (line 26) | [STAThread]

FILE: shadowsocks-csharp/Properties/Resources.Designer.cs
  class Resources (line 22) | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resource...
    method Resources (line 31) | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Mic...

FILE: shadowsocks-csharp/Util/Base64.cs
  class Base64 (line 6) | public static class Base64
    method DecodeBase64 (line 8) | public static string DecodeBase64(string val)
    method DecodeBase64ToBytes (line 13) | public static byte[] DecodeBase64ToBytes(string val)
    method EncodeUrlSafeBase64 (line 19) | public static string EncodeUrlSafeBase64(byte[] val, bool trim)
    method DecodeUrlSafeBase64ToBytes (line 27) | public static byte[] DecodeUrlSafeBase64ToBytes(string val)
    method EncodeUrlSafeBase64 (line 33) | public static string EncodeUrlSafeBase64(string val, bool trim = true)
    method DecodeUrlSafeBase64 (line 38) | public static string DecodeUrlSafeBase64(string val)
    method DecodeStandardSSRUrlSafeBase64 (line 43) | public static string DecodeStandardSSRUrlSafeBase64(string val)

FILE: shadowsocks-csharp/Util/CRC.cs
  class CRC32 (line 7) | class CRC32
    method CreateCRC32Table (line 11) | public static ulong[] CreateCRC32Table()
    method CalcCRC32 (line 32) | public static ulong CalcCRC32(byte[] input, int len, ulong value = 0xf...
    method CalcCRC32 (line 36) | public static ulong CalcCRC32(byte[] input, int index, int len, ulong ...
    method SetCRC32 (line 46) | public static void SetCRC32(byte[] buffer)
    method SetCRC32 (line 51) | public static void SetCRC32(byte[] buffer, int length)
    method SetCRC32 (line 55) | public static void SetCRC32(byte[] buffer, int index, int length)
    method CheckCRC32 (line 64) | public static bool CheckCRC32(byte[] buffer, int length)
  class Adler32 (line 72) | class Adler32
    method CalcAdler32 (line 74) | public static ulong CalcAdler32(byte[] input, int len)
    method CheckAdler32 (line 88) | public static bool CheckAdler32(byte[] input, int len)
    method CheckAdler32 (line 95) | public static bool CheckAdler32(byte[] input, int len, uint xor)

FILE: shadowsocks-csharp/Util/EnvCheck.cs
  class EnvCheck (line 7) | public class EnvCheck
    method CheckDotNet45 (line 13) | public static bool CheckDotNet45()

FILE: shadowsocks-csharp/Util/ServerName.cs
  class ServerName (line 7) | public static class ServerName
    method HideServerAddr (line 9) | public static string HideServerAddr(string addr)
    method HideAddr (line 37) | private static string HideAddr(string addr, char separator)

FILE: shadowsocks-csharp/Util/Util.cs
  class Utils (line 22) | public class Utils
    method ReleaseMemory (line 46) | public static void ReleaseMemory()
    method UnGzip (line 73) | public static string UnGzip(byte[] buf)
    method RandBytes (line 91) | public static void RandBytes(byte[] buf, int length)
    method RandUInt32 (line 99) | public static UInt32 RandUInt32()
    method Shuffle (line 107) | public static void Shuffle<T>(IList<T> list, Random rng)
    method BitCompare (line 120) | public static bool BitCompare(byte[] target, int target_offset, byte[]...
    method FindStr (line 130) | public static int FindStr(byte[] target, int targetLength, byte[] m)
    method isMatchSubNet (line 154) | public static bool isMatchSubNet(IPAddress ip, IPAddress net, int netm...
    method isMatchSubNet (line 169) | public static bool isMatchSubNet(IPAddress ip, string netmask)
    method isLocal (line 190) | public static bool isLocal(IPAddress ip)
    method isLocal (line 223) | public static bool isLocal(Socket socket)
    method isLAN (line 228) | public static bool isLAN(IPAddress ip)
    method isLAN (line 275) | public static bool isLAN(Socket socket)
    method GetTimestamp (line 280) | public static String GetTimestamp(DateTime value)
    method urlDecode (line 285) | public static string urlDecode(string str)
    method SetArrayMinSize (line 315) | public static void SetArrayMinSize<T>(ref T[] array, int size)
    method SetArrayMinSize2 (line 323) | public static void SetArrayMinSize2<T>(ref T[] array, int size)
    method QueryDns (line 331) | public static IPAddress QueryDns(string host, string dns_servers, bool...
    method _QueryDns (line 339) | public static IPAddress _QueryDns(string host, string dns_servers, boo...
    method GetExecutablePath (line 455) | public static string GetExecutablePath()
    method RunAsAdmin (line 460) | public static int RunAsAdmin(string Arguments)
    method GetDpiMul (line 484) | public static int GetDpiMul()
    method isVirusExist (line 494) | public static bool isVirusExist()
    type DeviceCap (line 534) | public enum DeviceCap
    method GetScreenPhysicalSize (line 540) | public static Point GetScreenPhysicalSize()
    method GetDeviceCaps (line 552) | [DllImport("gdi32.dll")]
    method SetProcessWorkingSetSize (line 555) | [DllImport("kernel32.dll")]

FILE: shadowsocks-csharp/View/ConfigForm.Designer.cs
  class ConfigForm (line 3) | partial class ConfigForm
    method Dispose (line 14) | protected override void Dispose(bool disposing)
    method InitializeComponent (line 29) | private void InitializeComponent()

FILE: shadowsocks-csharp/View/ConfigForm.cs
  class ConfigForm (line 18) | public partial class ConfigForm : Form
    method ConfigForm (line 32) | public ConfigForm(ShadowsocksController controller, UpdateChecker upda...
    method CreateFont (line 123) | private Font CreateFont()
    method UpdateTexts (line 142) | private void UpdateTexts()
    method controller_ConfigChanged (line 188) | private void controller_ConfigChanged(object sender, EventArgs e)
    method ShowWindow (line 193) | private void ShowWindow()
    method SaveOldSelectedServer (line 200) | private int SaveOldSelectedServer()
    method DrawLogo (line 257) | private void DrawLogo(int width)
    method GenQR (line 271) | private void GenQR(string ssconfig)
    method LoadSelectedServer (line 315) | private void LoadSelectedServer()
    method LoadConfiguration (line 381) | private void LoadConfiguration(Configuration configuration)
    method SetServerListSelectedIndex (line 414) | public void SetServerListSelectedIndex(int index)
    method LoadCurrentConfiguration (line 423) | private void LoadCurrentConfiguration()
    method ServersListBox_SelectedIndexChanged (line 433) | private void ServersListBox_SelectedIndexChanged(object sender, EventA...
    method UpdateServersListBoxTopIndex (line 457) | private void UpdateServersListBoxTopIndex(int style = 0)
    method AddButton_Click (line 474) | private void AddButton_Click(object sender, EventArgs e)
    method DeleteButton_Click (line 490) | private void DeleteButton_Click(object sender, EventArgs e)
    method OKButton_Click (line 528) | private void OKButton_Click(object sender, EventArgs e)
    method CancelButton_Click (line 554) | private void CancelButton_Click(object sender, EventArgs e)
    method ConfigForm_Shown (line 559) | private void ConfigForm_Shown(object sender, EventArgs e)
    method ConfigForm_FormClosed (line 564) | private void ConfigForm_FormClosed(object sender, FormClosedEventArgs e)
    method UpButton_Click (line 569) | private void UpButton_Click(object sender, EventArgs e)
    method DownButton_Click (line 619) | private void DownButton_Click(object sender, EventArgs e)
    method TextBox_Enter (line 670) | private void TextBox_Enter(object sender, EventArgs e)
    method TextBox_MouseUp (line 681) | private void TextBox_MouseUp(object sender, MouseEventArgs e)
    method LinkUpdate_LinkClicked (line 689) | private void LinkUpdate_LinkClicked(object sender, LinkLabelLinkClicke...
    method PasswordLabel_CheckedChanged (line 694) | private void PasswordLabel_CheckedChanged(object sender, EventArgs e)
    method UpdateObfsTextbox (line 706) | private void UpdateObfsTextbox()
    method ObfsCombo_TextChanged (line 727) | private void ObfsCombo_TextChanged(object sender, EventArgs e)
    method checkSSRLink_CheckedChanged (line 732) | private void checkSSRLink_CheckedChanged(object sender, EventArgs e)
    method checkAdvSetting_CheckedChanged (line 742) | private void checkAdvSetting_CheckedChanged(object sender, EventArgs e)
    method Update_SSR_controls_Visable (line 747) | private void Update_SSR_controls_Visable()
    method IPLabel_CheckedChanged (line 777) | private void IPLabel_CheckedChanged(object sender, EventArgs e)

FILE: shadowsocks-csharp/View/InputPassword.Designer.cs
  class InputPassword (line 3) | partial class InputPassword
    method Dispose (line 14) | protected override void Dispose(bool disposing)
    method InitializeComponent (line 29) | private void InitializeComponent()

FILE: shadowsocks-csharp/View/InputPassword.cs
  class InputPassword (line 13) | public partial class InputPassword : Form
    method InputPassword (line 17) | public InputPassword()
    method buttonOK_Click (line 25) | private void buttonOK_Click(object sender, EventArgs e)
    method InputPassword_KeyDown (line 32) | private void InputPassword_KeyDown(object sender, KeyEventArgs e)

FILE: shadowsocks-csharp/View/LogForm.Designer.cs
  class LogForm (line 3) | partial class LogForm
    method Dispose (line 14) | protected override void Dispose(bool disposing)
    method InitializeComponent (line 29) | private void InitializeComponent()

FILE: shadowsocks-csharp/View/LogForm.cs
  class LogForm (line 15) | public partial class LogForm : Form
    method LogForm (line 25) | public LogForm(ShadowsocksController controller)
    method UpdateTexts (line 36) | private void UpdateTexts()
    method closeToolStripMenuItem_Click (line 49) | private void closeToolStripMenuItem_Click(object sender, EventArgs e)
    method showInExplorerToolStripMenuItem_Click (line 54) | private void showInExplorerToolStripMenuItem_Click(object sender, Even...
    method LogForm_Load (line 67) | private void LogForm_Load(object sender, EventArgs e)
    method ReadLog (line 72) | private void ReadLog()
    method refreshTimer_Tick (line 120) | private void refreshTimer_Tick(object sender, EventArgs e)
    method LogForm_Shown (line 125) | private void LogForm_Shown(object sender, EventArgs e)
    method fontToolStripMenuItem_Click (line 130) | private void fontToolStripMenuItem_Click(object sender, EventArgs e)
    method wrapTextToolStripMenuItem_Click (line 142) | private void wrapTextToolStripMenuItem_Click(object sender, EventArgs e)
    method alwaysOnTopToolStripMenuItem_Click (line 147) | private void alwaysOnTopToolStripMenuItem_Click(object sender, EventAr...
    method wrapTextToolStripMenuItem_CheckedChanged (line 152) | private void wrapTextToolStripMenuItem_CheckedChanged(object sender, E...
    method alwaysOnTopToolStripMenuItem_CheckedChanged (line 158) | private void alwaysOnTopToolStripMenuItem_CheckedChanged(object sender...
    method clearLogToolStripMenuItem_Click (line 163) | private void clearLogToolStripMenuItem_Click(object sender, EventArgs e)

FILE: shadowsocks-csharp/View/MenuViewController.cs
  class EventParams (line 22) | public class EventParams {
    method EventParams (line 26) | public EventParams(object sender, EventArgs e) {
  class MenuViewController (line 32) | public class MenuViewController {
    method MenuViewController (line 78) | public MenuViewController(ShadowsocksController controller) {
    method timerDetectVirus_Elapsed (line 123) | private void timerDetectVirus_Elapsed(object sender, System.Timers.Ela...
    method timerDelayCheckUpdate_Elapsed (line 129) | private void timerDelayCheckUpdate_Elapsed(object sender, System.Timer...
    method timerUpdateLatency_Elapsed (line 146) | private void timerUpdateLatency_Elapsed(object sender, System.Timers.E...
    method controller_Errored (line 163) | void controller_Errored(object sender, System.IO.ErrorEventArgs e) {
    method UpdateTrayIcon (line 167) | private void UpdateTrayIcon() {
    method CreateMenuItem (line 242) | private MenuItem CreateMenuItem(string text, EventHandler click) {
    method CreateMenuGroup (line 246) | private MenuItem CreateMenuGroup(string text, MenuItem[] items) {
    method LoadMenu (line 250) | private void LoadMenu() {
    method controller_ConfigChanged (line 320) | private void controller_ConfigChanged(object sender, EventArgs e) {
    method controller_ToggleModeChanged (line 325) | private void controller_ToggleModeChanged(object sender, EventArgs e) {
    method controller_ToggleRuleModeChanged (line 330) | private void controller_ToggleRuleModeChanged(object sender, EventArgs...
    method controller_FileReadyToOpen (line 335) | void controller_FileReadyToOpen(object sender, ShadowsocksController.P...
    method ShowBalloonTip (line 341) | void ShowBalloonTip(string title, string content, ToolTipIcon icon, in...
    method controller_UpdatePACFromGFWListError (line 348) | void controller_UpdatePACFromGFWListError(object sender, System.IO.Err...
    method controller_UpdatePACFromGFWListCompleted (line 354) | void controller_UpdatePACFromGFWListCompleted(object sender, GFWListUp...
    method updateFreeNodeChecker_NewFreeNodeFound (line 362) | void updateFreeNodeChecker_NewFreeNodeFound(object sender, EventArgs e) {
    method updateChecker_NewVersionFound (line 568) | void updateChecker_NewVersionFound(object sender, EventArgs e) {
    method UpdateItem_Clicked (line 587) | void UpdateItem_Clicked(object sender, EventArgs e) {
    method notifyIcon1_BalloonTipClicked (line 591) | void notifyIcon1_BalloonTipClicked(object sender, EventArgs e) {
    method UpdateSysProxyMode (line 596) | private void UpdateSysProxyMode(Configuration config) {
    method UpdateProxyRule (line 603) | private void UpdateProxyRule(Configuration config) {
    method LoadCurrentConfiguration (line 611) | private void LoadCurrentConfiguration() {
    method UpdateServersMenu (line 621) | private void UpdateServersMenu() {
    method ShowConfigForm (line 685) | private void ShowConfigForm(bool addNode) {
    method ShowConfigForm (line 703) | private void ShowConfigForm(int index) {
    method ShowSettingForm (line 717) | private void ShowSettingForm() {
    method ShowPortMapForm (line 730) | private void ShowPortMapForm() {
    method ShowServerLogForm (line 747) | private void ShowServerLogForm() {
    method ShowGlobalLogForm (line 764) | private void ShowGlobalLogForm() {
    method ShowSubscribeSettingForm (line 781) | private void ShowSubscribeSettingForm() {
    method configForm_FormClosed (line 798) | void configForm_FormClosed(object sender, FormClosedEventArgs e) {
    method settingsForm_FormClosed (line 810) | void settingsForm_FormClosed(object sender, FormClosedEventArgs e) {
    method serverLogForm_FormClosed (line 815) | void serverLogForm_FormClosed(object sender, FormClosedEventArgs e) {
    method portMapForm_FormClosed (line 820) | void portMapForm_FormClosed(object sender, FormClosedEventArgs e) {
    method globalLogForm_FormClosed (line 825) | void globalLogForm_FormClosed(object sender, FormClosedEventArgs e) {
    method subScribeForm_FormClosed (line 830) | void subScribeForm_FormClosed(object sender, FormClosedEventArgs e) {
    method Config_Click (line 837) | private void Config_Click(object sender, EventArgs e) {
    method Import_Click (line 846) | private void Import_Click(object sender, EventArgs e) {
    method Setting_Click (line 863) | private void Setting_Click(object sender, EventArgs e) {
    method Quit (line 867) | private void Quit() {
    method Quit_Click (line 896) | private void Quit_Click(object sender, EventArgs e) {
    method OpenWiki_Click (line 900) | private void OpenWiki_Click(object sender, EventArgs e) {
    method FeedbackItem_Click (line 904) | private void FeedbackItem_Click(object sender, EventArgs e) {
    method ResetPasswordItem_Click (line 908) | private void ResetPasswordItem_Click(object sender, EventArgs e) {
    method AboutItem_Click (line 914) | private void AboutItem_Click(object sender, EventArgs e) {
    method DonateItem_Click (line 918) | private void DonateItem_Click(object sender, EventArgs e) {
    method GetAsyncKeyState (line 922) | [DllImport("user32.dll")]
    method notifyIcon1_Click (line 925) | private void notifyIcon1_Click(object sender, MouseEventArgs e) {
    method NoModifyItem_Click (line 948) | private void NoModifyItem_Click(object sender, EventArgs e) {
    method EnableItem_Click (line 952) | private void EnableItem_Click(object sender, EventArgs e) {
    method GlobalModeItem_Click (line 956) | private void GlobalModeItem_Click(object sender, EventArgs e) {
    method PACModeItem_Click (line 960) | private void PACModeItem_Click(object sender, EventArgs e) {
    method RuleBypassLanItem_Click (line 964) | private void RuleBypassLanItem_Click(object sender, EventArgs e) {
    method RuleBypassChinaItem_Click (line 968) | private void RuleBypassChinaItem_Click(object sender, EventArgs e) {
    method RuleBypassNotChinaItem_Click (line 972) | private void RuleBypassNotChinaItem_Click(object sender, EventArgs e) {
    method RuleUserItem_Click (line 976) | private void RuleUserItem_Click(object sender, EventArgs e) {
    method RuleBypassDisableItem_Click (line 980) | private void RuleBypassDisableItem_Click(object sender, EventArgs e) {
    method SelectSameHostForSameTargetItem_Click (line 984) | private void SelectSameHostForSameTargetItem_Click(object sender, Even...
    method CopyPACURLItem_Click (line 989) | private void CopyPACURLItem_Click(object sender, EventArgs e) {
    method EditPACFileItem_Click (line 1001) | private void EditPACFileItem_Click(object sender, EventArgs e) {
    method UpdatePACFromGFWListItem_Click (line 1005) | private void UpdatePACFromGFWListItem_Click(object sender, EventArgs e) {
    method UpdatePACFromLanIPListItem_Click (line 1009) | private void UpdatePACFromLanIPListItem_Click(object sender, EventArgs...
    method UpdatePACFromCNWhiteListItem_Click (line 1013) | private void UpdatePACFromCNWhiteListItem_Click(object sender, EventAr...
    method UpdatePACFromCNOnlyListItem_Click (line 1017) | private void UpdatePACFromCNOnlyListItem_Click(object sender, EventArg...
    method UpdatePACFromCNIPListItem_Click (line 1021) | private void UpdatePACFromCNIPListItem_Click(object sender, EventArgs ...
    method EditUserRuleFileForGFWListItem_Click (line 1025) | private void EditUserRuleFileForGFWListItem_Click(object sender, Event...
    method AServerItem_Click (line 1029) | private void AServerItem_Click(object sender, EventArgs e) {
    method CheckUpdate_Click (line 1039) | private void CheckUpdate_Click(object sender, EventArgs e) {
    method CheckNodeUpdateUseProxy_Click (line 1043) | private void CheckNodeUpdateUseProxy_Click(object sender, EventArgs e) {
    method CheckNodeUpdate_Click (line 1047) | private void CheckNodeUpdate_Click(object sender, EventArgs e) {
    method ShowLogItem_Click (line 1051) | private void ShowLogItem_Click(object sender, EventArgs e) {
    method ShowPortMapItem_Click (line 1055) | private void ShowPortMapItem_Click(object sender, EventArgs e) {
    method ShowServerLogItem_Click (line 1059) | private void ShowServerLogItem_Click(object sender, EventArgs e) {
    method SubscribeSetting_Click (line 1063) | private void SubscribeSetting_Click(object sender, EventArgs e) {
    method DisconnectCurrent_Click (line 1067) | private void DisconnectCurrent_Click(object sender, EventArgs e) {
    method URL_Split (line 1075) | private void URL_Split(string text, ref List<string> out_urls) {
    method CopyAddress_Click (line 1092) | private void CopyAddress_Click(object sender, EventArgs e) {
    method ScanQRCode (line 1112) | private bool ScanQRCode(Screen screen, Bitmap fullImage, Rectangle cro...
    method ScanQRCodeStretch (line 1142) | private bool ScanQRCodeStretch(Screen screen, Bitmap fullImage, Rectan...
    method GetScanRect (line 1172) | private Rectangle GetScanRect(int width, int height, int index, out do...
    method ScanScreenQRCode (line 1229) | private void ScanScreenQRCode(bool ss_only) {
    method ScanQRCodeItem_Click (line 1289) | private void ScanQRCodeItem_Click(object sender, EventArgs e) {
    method splash_FormClosed (line 1293) | void splash_FormClosed(object sender, FormClosedEventArgs e) {
    method openURLFromQRCode (line 1297) | void openURLFromQRCode(object sender, FormClosedEventArgs e) {
    method showURLFromQRCode (line 1301) | void showURLFromQRCode() {
    method showURLFromQRCode (line 1308) | void showURLFromQRCode(object sender, FormClosedEventArgs e) {
    method showURLFromQRCode (line 1312) | void showURLFromQRCode(object sender, System.EventArgs e) {

FILE: shadowsocks-csharp/View/PortSettingsForm.Designer.cs
  class PortSettingsForm (line 3) | partial class PortSettingsForm
    method Dispose (line 14) | protected override void Dispose(bool disposing)
    method InitializeComponent (line 29) | private void InitializeComponent()

FILE: shadowsocks-csharp/View/PortSettingsForm.cs
  class PortSettingsForm (line 14) | public partial class PortSettingsForm : Form
    method PortSettingsForm (line 20) | public PortSettingsForm(ShadowsocksController controller)
    method UpdateTexts (line 42) | private void UpdateTexts()
    method controller_ConfigChanged (line 59) | private void controller_ConfigChanged(object sender, EventArgs e)
    method PortMapForm_FormClosed (line 64) | private void PortMapForm_FormClosed(object sender, FormClosedEventArgs e)
    method LoadCurrentConfiguration (line 69) | private void LoadCurrentConfiguration()
    method OKButton_Click (line 76) | private void OKButton_Click(object sender, EventArgs e)
    method CancelButton_Click (line 83) | private void CancelButton_Click(object sender, EventArgs e)
    method LoadConfiguration (line 88) | private void LoadConfiguration(Configuration configuration)
    method ServerListText2Key (line 134) | private string ServerListText2Key(string text)
    method SaveSelectedServer (line 145) | private void SaveSelectedServer()
    method LoadSelectedServer (line 191) | private void LoadSelectedServer()
    method GetID (line 230) | private string GetID(string text)
    method GetDisplayText (line 239) | private string GetDisplayText(Server s)
    method GetIDText (line 244) | private string GetIDText(string id)
    method listPorts_SelectedIndexChanged (line 256) | private void listPorts_SelectedIndexChanged(object sender, EventArgs e)
    method Add_Click (line 262) | private void Add_Click(object sender, EventArgs e)
    method Del_Click (line 284) | private void Del_Click(object sender, EventArgs e)
    method comboBoxType_SelectedIndexChanged (line 296) | private void comboBoxType_SelectedIndexChanged(object sender, EventArg...

FILE: shadowsocks-csharp/View/QRCodeSplashForm.cs
  class QRCodeSplashForm (line 15) | public class QRCodeSplashForm : PerPixelAlphaForm
    method QRCodeSplashForm (line 19) | public QRCodeSplashForm()
    method QRCodeSplashForm_Load (line 52) | private void QRCodeSplashForm_Load(object sender, EventArgs e)
    method timer_Tick (line 82) | void timer_Tick(object sender, EventArgs e)
  class Win32 (line 155) | class Win32
    type Point (line 158) | [StructLayout(LayoutKind.Sequential)]
      method Point (line 164) | public Point(Int32 x, Int32 y) { this.x = x; this.y = y; }
    type Size (line 168) | [StructLayout(LayoutKind.Sequential)]
      method Size (line 174) | public Size(Int32 cx, Int32 cy) { this.cx = cx; this.cy = cy; }
    type ARGB (line 178) | [StructLayout(LayoutKind.Sequential, Pack = 1)]
    type BLENDFUNCTION (line 188) | [StructLayout(LayoutKind.Sequential, Pack = 1)]
    method UpdateLayeredWindow (line 206) | [DllImport("user32.dll", ExactSpelling = true, SetLastError = true)]
    method GetDC (line 209) | [DllImport("user32.dll", ExactSpelling = true, SetLastError = true)]
    method ReleaseDC (line 212) | [DllImport("user32.dll", ExactSpelling = true)]
    method CreateCompatibleDC (line 215) | [DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)]
    method DeleteDC (line 218) | [DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)]
    method SelectObject (line 221) | [DllImport("gdi32.dll", ExactSpelling = true)]
    method DeleteObject (line 224) | [DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)]
  class PerPixelAlphaForm (line 229) | public class PerPixelAlphaForm : Form
    method PerPixelAlphaForm (line 234) | public PerPixelAlphaForm()
    method SetBitmap (line 240) | public void SetBitmap(Bitmap bitmap)
    method SetBitmap (line 247) | public void SetBitmap(Bitmap bitmap, byte opacity)

FILE: shadowsocks-csharp/View/ResetPassword.Designer.cs
  class ResetPassword (line 3) | partial class ResetPassword
    method Dispose (line 14) | protected override void Dispose(bool disposing)
    method InitializeComponent (line 29) | private void InitializeComponent()

FILE: shadowsocks-csharp/View/ResetPassword.cs
  class ResetPassword (line 10) | public partial class ResetPassword : Form
    method ResetPassword (line 12) | public ResetPassword()
    method buttonOK_Click (line 19) | private void buttonOK_Click(object sender, EventArgs e)
    method ResetPassword_KeyDown (line 34) | private void ResetPassword_KeyDown(object sender, KeyEventArgs e)

FILE: shadowsocks-csharp/View/ServerLogForm.Designer.cs
  class ServerLogForm (line 3) | partial class ServerLogForm
    method Dispose (line 14) | protected override void Dispose(bool disposing)
    method InitializeComponent (line 29) | private void InitializeComponent()

FILE: shadowsocks-csharp/View/ServerLogForm.cs
  class ServerLogForm (line 15) | public partial class ServerLogForm : Form
    class DoubleBufferListView (line 17) | class DoubleBufferListView : DataGridView
      method DoubleBufferListView (line 19) | public DoubleBufferListView()
    method ServerLogForm (line 47) | public ServerLogForm(ShadowsocksController controller)
    method CreateMenuGroup (line 124) | private MenuItem CreateMenuGroup(string text, MenuItem[] items)
    method CreateMenuItem (line 129) | private MenuItem CreateMenuItem(string text, EventHandler click)
    method UpdateTitle (line 134) | private void UpdateTitle()
    method UpdateTexts (line 142) | private void UpdateTexts()
    method controller_ConfigChanged (line 151) | private void controller_ConfigChanged(object sender, EventArgs e)
    method FormatBytes (line 156) | private string FormatBytes(long bytes)
    method SetBackColor (line 205) | public bool SetBackColor(DataGridViewCell cell, Color newColor)
    method SetCellToolTipText (line 215) | public bool SetCellToolTipText(DataGridViewCell cell, string newString)
    method SetCellText (line 225) | public bool SetCellText(DataGridViewCell cell, string newString)
    method SetCellText (line 235) | public bool SetCellText(DataGridViewCell cell, long newInteger)
    method ColorMix (line 245) | byte ColorMix(byte a, byte b, double alpha)
    method ColorMix (line 249) | Color ColorMix(Color a, Color b, double alpha)
    method UpdateLogThread (line 255) | public void UpdateLogThread()
    method UpdateLog (line 270) | public void UpdateLog()
    method RefreshLog (line 282) | public void RefreshLog()
    method autosizeColumns (line 641) | private void autosizeColumns()
    method autosizeItem_Click (line 689) | private void autosizeItem_Click(object sender, EventArgs e)
    method copyLinkItem_Click (line 694) | private void copyLinkItem_Click(object sender, EventArgs e)
    method copyGroupLinkItem_Click (line 708) | private void copyGroupLinkItem_Click(object sender, EventArgs e)
    method copyEnableLinksItem_Click (line 729) | private void copyEnableLinksItem_Click(object sender, EventArgs e)
    method copyLinksItem_Click (line 746) | private void copyLinksItem_Click(object sender, EventArgs e)
    method topmostItem_Click (line 761) | private void topmostItem_Click(object sender, EventArgs e)
    method DisconnectForward_Click (line 767) | private void DisconnectForward_Click(object sender, EventArgs e)
    method Disconnect_Click (line 772) | private void Disconnect_Click(object sender, EventArgs e)
    method ClearMaxSpeed_Click (line 783) | private void ClearMaxSpeed_Click(object sender, EventArgs e)
    method ClearSelectedTotal_Click (line 792) | private void ClearSelectedTotal_Click(object sender, EventArgs e)
    method ClearTotal_Click (line 805) | private void ClearTotal_Click(object sender, EventArgs e)
    method ClearItem_Click (line 814) | private void ClearItem_Click(object sender, EventArgs e)
    method timer_Tick (line 823) | private void timer_Tick(object sender, EventArgs e)
    method ServerDataGrid_MouseUp (line 852) | private void ServerDataGrid_MouseUp(object sender, MouseEventArgs e)
    method ServerDataGrid_CellClick (line 906) | private void ServerDataGrid_CellClick(object sender, DataGridViewCellE...
    method ServerDataGrid_CellDoubleClick (line 948) | private void ServerDataGrid_CellDoubleClick(object sender, DataGridVie...
    method ServerLogForm_FormClosed (line 997) | private void ServerLogForm_FormClosed(object sender, FormClosedEventAr...
    method Str2Long (line 1009) | private long Str2Long(String str)
    method ServerDataGrid_SortCompare (line 1044) | private void ServerDataGrid_SortCompare(object sender, DataGridViewSor...
    method ServerLogForm_Move (line 1104) | private void ServerLogForm_Move(object sender, EventArgs e)
    method WndProc (line 1109) | protected override void WndProc(ref Message message)
    method ServerLogForm_ResizeEnd (line 1132) | private void ServerLogForm_ResizeEnd(object sender, EventArgs e)
    method ServerDataGrid_ColumnWidthChanged (line 1147) | private void ServerDataGrid_ColumnWidthChanged(object sender, DataGrid...

FILE: shadowsocks-csharp/View/SettingsForm.Designer.cs
  class SettingsForm (line 3) | partial class SettingsForm
    method Dispose (line 14) | protected override void Dispose(bool disposing)
    method InitializeComponent (line 29) | private void InitializeComponent()

FILE: shadowsocks-csharp/View/SettingsForm.cs
  class SettingsForm (line 14) | public partial class SettingsForm : Form
    method SettingsForm (line 21) | public SettingsForm(ShadowsocksController controller)
    method SettingsForm_FormClosed (line 62) | private void SettingsForm_FormClosed(object sender, FormClosedEventArg...
    method UpdateTexts (line 67) | private void UpdateTexts()
    method controller_ConfigChanged (line 113) | private void controller_ConfigChanged(object sender, EventArgs e)
    method ShowWindow (line 118) | private void ShowWindow()
    method SaveOldSelectedServer (line 124) | private int SaveOldSelectedServer()
    method LoadSelectedServer (line 168) | private void LoadSelectedServer()
    method LoadCurrentConfiguration (line 206) | private void LoadCurrentConfiguration()
    method OKButton_Click (line 212) | private void OKButton_Click(object sender, EventArgs e)
    method CancelButton_Click (line 222) | private void CancelButton_Click(object sender, EventArgs e)
    method buttonDefault_Click (line 227) | private void buttonDefault_Click(object sender, EventArgs e)

FILE: shadowsocks-csharp/View/ShowTextForm.Designer.cs
  class ShowTextForm (line 3) | partial class ShowTextForm
    method Dispose (line 14) | protected override void Dispose(bool disposing)
    method InitializeComponent (line 29) | private void InitializeComponent()

FILE: shadowsocks-csharp/View/ShowTextForm.cs
  class ShowTextForm (line 13) | public partial class ShowTextForm : Form
    method ShowTextForm (line 15) | public ShowTextForm(string title, string text)
    method GenQR (line 25) | private void GenQR(string ssconfig)
    method textBox_TextChanged (line 66) | private void textBox_TextChanged(object sender, EventArgs e)
    method ShowTextForm_SizeChanged (line 71) | private void ShowTextForm_SizeChanged(object sender, EventArgs e)
    method textBox_KeyPress (line 77) | private void textBox_KeyPress(object sender, KeyPressEventArgs e)

FILE: shadowsocks-csharp/View/SubscribeForm.Designer.cs
  class SubscribeForm (line 3) | partial class SubscribeForm
    method Dispose (line 14) | protected override void Dispose(bool disposing)
    method InitializeComponent (line 29) | private void InitializeComponent()

FILE: shadowsocks-csharp/View/SubscribeForm.cs
  class SubscribeForm (line 14) | public partial class SubscribeForm : Form
    method SubscribeForm (line 21) | public SubscribeForm(ShadowsocksController controller)
    method UpdateTexts (line 35) | private void UpdateTexts()
    method SubscribeForm_FormClosed (line 46) | private void SubscribeForm_FormClosed(object sender, FormClosedEventAr...
    method controller_ConfigChanged (line 51) | private void controller_ConfigChanged(object sender, EventArgs e)
    method LoadCurrentConfiguration (line 56) | private void LoadCurrentConfiguration()
    method LoadAllSettings (line 70) | private void LoadAllSettings()
    method SaveAllSettings (line 79) | private int SaveAllSettings()
    method buttonCancel_Click (line 85) | private void buttonCancel_Click(object sender, EventArgs e)
    method buttonOK_Click (line 90) | private void buttonOK_Click(object sender, EventArgs e)
    method UpdateList (line 102) | private void UpdateList()
    method SetSelectIndex (line 112) | private void SetSelectIndex(int index)
    method UpdateSelected (line 120) | private void UpdateSelected(int index)
    method SaveSelected (line 141) | private void SaveSelected(int index)
    method listServerSubscribe_SelectedIndexChanged (line 155) | private void listServerSubscribe_SelectedIndexChanged(object sender, E...
    method buttonAdd_Click (line 167) | private void buttonAdd_Click(object sender, EventArgs e)
    method buttonDel_Click (line 186) | private void buttonDel_Click(object sender, EventArgs e)

FILE: test/ServerTest.cs
  class ServerTest (line 9) | [TestClass]
    method TestServerFromSSR (line 12) | [TestMethod]
    method TestHideServerName (line 45) | [TestMethod]

FILE: test/UnitTest.cs
  class UnitTest (line 10) | [TestClass]
    method TestCompareVersion (line 13) | [TestMethod]
    method RunEncryptionRound (line 25) | private void RunEncryptionRound(IEncryptor encryptor, IEncryptor decry...
    method TestPolarSSLEncryption (line 60) | [TestMethod]
    method RunSinglePolarSSLEncryptionThread (line 79) | private void RunSinglePolarSSLEncryptionThread()
    method TestRC4Encryption (line 99) | [TestMethod]
    method RunSingleRC4EncryptionThread (line 118) | private void RunSingleRC4EncryptionThread()
    method TestSodiumEncryption (line 139) | [TestMethod]
    method RunSingleSodiumEncryptionThread (line 158) | private void RunSingleSodiumEncryptionThread()
Condensed preview — 171 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,838K chars).
[
  {
    "path": ".github/issue_template.md",
    "chars": 97,
    "preview": "本项目不再进行功能性更新,仅接受BUG反馈。\n\n请谨慎斟酌自己的issue是否值得一提。\n\n作者耐心很差,请勿提傻逼issue浪费作者时间。\n\n傻逼issue会被lock,傻逼会被block。\n"
  },
  {
    "path": ".gitignore",
    "chars": 134,
    "preview": "Backup/\nbin/\nobj/\npub/\n7zip*/\ntemp/\nshadowsocks-csharp/shadowsocks-csharp.csproj.user\nTestResults\n*.suo\n*.user\n*.exe\n\n/t"
  },
  {
    "path": "CHANGES",
    "chars": 1936,
    "preview": "2.4 2015-07-11\n- Support UDP relay\n- Support online PAC\n- Migrate update checker to GitHub releases\n- Other fixes\n\n2.3.1"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 469,
    "preview": "How to Contribute\n=================\n\nPull Requests\n-------------\n\n1. Pull requests are welcome.\n2. Make sure to pass the"
  },
  {
    "path": "LICENSE",
    "chars": 35817,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\r\n                       Version 3, 29 June 2007\r\n\r\n Copyright (C) 2007 Fr"
  },
  {
    "path": "README.md",
    "chars": 782,
    "preview": "ShadowsocksR for Windows\n=======================\n\n### 相关说明\n\n当初本项目的目的是为了配合[ss-panel-v3-mod_Uim](https://github.com/Anankk"
  },
  {
    "path": "appveyor.yml",
    "chars": 449,
    "preview": "version: 1.0.{build}\nimage: Visual Studio 2015\nenvironment:\n  matrix:\n    - platform: Any CPU\n      configuration: Debug"
  },
  {
    "path": "packaging/upload.sh",
    "chars": 317,
    "preview": "#!/bin/bash\n\nversion=$1\n\nrsync --progress -e ssh shadowsocks-csharp/bin/x86/Release/Shadowsocks-win-dotnet4.0-$1.zip frs"
  },
  {
    "path": "shadowsocks-csharp/3rd/SimpleJson.cs",
    "chars": 74025,
    "preview": "//-----------------------------------------------------------------------\r\n// <copyright file=\"SimpleJson.cs\" company=\"T"
  },
  {
    "path": "shadowsocks-csharp/3rd/opendns/DnsQuery.cs",
    "chars": 18300,
    "preview": "/* \n * Author: Ruy Delgado <ruydelgado@gmail.com>\n * Title: OpenDNS\n * Description: DNS Client Library \n * Revision: 1.0"
  },
  {
    "path": "shadowsocks-csharp/3rd/opendns/DnsResponse.cs",
    "chars": 3500,
    "preview": "/* \n * Author: Ruy Delgado <ruydelgado@gmail.com>\n * Title: OpenDNS\n * Description: DNS Client Library \n * Revision: 1.0"
  },
  {
    "path": "shadowsocks-csharp/3rd/opendns/Enum.cs",
    "chars": 1195,
    "preview": "/* \n * Author: Ruy Delgado <ruydelgado@gmail.com>\n * Title: OpenDNS\n * Description: DNS Client Library \n * Revision: 1.0"
  },
  {
    "path": "shadowsocks-csharp/3rd/opendns/RR/Address.cs",
    "chars": 798,
    "preview": "/* \n * Author: Ruy Delgado <ruydelgado@gmail.com>\n * Title: OpenDNS\n * Description: DNS Client Library \n * Revision: 1.0"
  },
  {
    "path": "shadowsocks-csharp/3rd/opendns/RR/MX.cs",
    "chars": 652,
    "preview": "/* \n * Author: Ruy Delgado <ruydelgado@gmail.com>\n * Title: OpenDNS\n * Description: DNS Client Library \n * Revision: 1.0"
  },
  {
    "path": "shadowsocks-csharp/3rd/opendns/RR/ResourceRecord.cs",
    "chars": 1373,
    "preview": "/* \n * Author: Ruy Delgado <ruydelgado@gmail.com>\n * Title: OpenDNS\n * Description: DNS Client Library \n * Revision: 1.0"
  },
  {
    "path": "shadowsocks-csharp/3rd/opendns/RR/ResourceRecordCollection.cs",
    "chars": 1373,
    "preview": "/* \n * Author: Ruy Delgado <ruydelgado@gmail.com>\n * Title: OpenDNS\n * Description: DNS Client Library \n * Revision: 1.0"
  },
  {
    "path": "shadowsocks-csharp/3rd/opendns/RR/SOA.cs",
    "chars": 929,
    "preview": "/* \n * Author: Ruy Delgado <ruydelgado@gmail.com>\n * Title: OpenDNS\n * Description: DNS Client Library \n * Revision: 1.0"
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/BarcodeFormat.cs",
    "chars": 2567,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/BaseLuminanceSource.cs",
    "chars": 7621,
    "preview": "/*\r\n* Copyright 2012 ZXing.Net authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may"
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/Binarizer.cs",
    "chars": 4419,
    "preview": "/*\r\n* Copyright 2009 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/BinaryBitmap.cs",
    "chars": 6670,
    "preview": "/*\r\n* Copyright 2009 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/BitmapLuminanceSource.cs",
    "chars": 10686,
    "preview": "/*\r\n* Copyright 2012 ZXing.Net authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may"
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/DecodeHintType.cs",
    "chars": 4958,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/EncodeHintType.cs",
    "chars": 4975,
    "preview": "/*\r\n* Copyright 2008 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/LuminanceSource.cs",
    "chars": 6844,
    "preview": "/*\r\n* Copyright 2009 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/Result.cs",
    "chars": 5781,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/ResultMetadataType.cs",
    "chars": 3682,
    "preview": "/*\r\n * Copyright 2008 ZXing authors\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/ResultPoint.cs",
    "chars": 6500,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/ResultPointCallback.cs",
    "chars": 950,
    "preview": "/*\r\n* Copyright 2009 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/WriterException.cs",
    "chars": 1722,
    "preview": "/*\r\n* Copyright 2008 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/common/BitArray.cs",
    "chars": 8072,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/common/BitMatrix.cs",
    "chars": 7922,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/common/BitSource.cs",
    "chars": 4155,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/common/DecoderResult.cs",
    "chars": 2498,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/common/DefaultGridSampler.cs",
    "chars": 4233,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/common/DetectorResult.cs",
    "chars": 1410,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/common/GlobalHistogramBinarizer.cs",
    "chars": 8959,
    "preview": "/*\r\n* Copyright 2009 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/common/GridSampler.cs",
    "chars": 8946,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/common/HybridBinarizer.cs",
    "chars": 12532,
    "preview": "/*\r\n* Copyright 2009 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/common/PerspectiveTransform.cs",
    "chars": 6384,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/common/StringUtils.cs",
    "chars": 9534,
    "preview": "/*\r\n * Copyright (C) 2010 ZXing authors\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/common/detector/MathUtils.cs",
    "chars": 1515,
    "preview": "/*\n * Copyright 2012 ZXing authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/common/reedsolomon/GenericGF.cs",
    "chars": 7453,
    "preview": "/*\r\n * Copyright 2007 ZXing authors\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/common/reedsolomon/GenericGFPoly.cs",
    "chars": 11173,
    "preview": "/*\r\n * Copyright 2007 ZXing authors\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/common/reedsolomon/ReedSolomonDecoder.cs",
    "chars": 8644,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/common/reedsolomon/ReedSolomonEncoder.cs",
    "chars": 2946,
    "preview": "/*\r\n* Copyright 2008 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/QRCodeReader.cs",
    "chars": 8819,
    "preview": "/*\r\n * Copyright 2007 ZXing authors\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/decoder/BitMatrixParser.cs",
    "chars": 10054,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/decoder/DataBlock.cs",
    "chars": 5554,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/decoder/DataMask.cs",
    "chars": 6018,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/decoder/DecodedBitStreamParser.cs",
    "chars": 18818,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/decoder/Decoder.cs",
    "chars": 7153,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/decoder/ErrorCorrectionLevel.cs",
    "chars": 3348,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/decoder/FormatInformation.cs",
    "chars": 9363,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/decoder/Mode.cs",
    "chars": 5753,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/decoder/QRCodeDecoderMetaData.cs",
    "chars": 2027,
    "preview": "/*\r\n * Copyright 2013 ZXing authors\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/decoder/Version.cs",
    "chars": 21952,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/detector/AlignmentPattern.cs",
    "chars": 2695,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/detector/AlignmentPatternFinder.cs",
    "chars": 12592,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/detector/Detector.cs",
    "chars": 19558,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/detector/FinderPattern.cs",
    "chars": 3625,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/detector/FinderPatternFinder.cs",
    "chars": 30999,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/detector/FinderPatternInfo.cs",
    "chars": 2094,
    "preview": "/*\r\n* Copyright 2007 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/encoder/BlockPair.cs",
    "chars": 1136,
    "preview": "/*\r\n* Copyright 2008 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/encoder/ByteMatrix.cs",
    "chars": 4338,
    "preview": "/*\r\n * Copyright 2008 ZXing authors\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/encoder/Encoder.cs",
    "chars": 24132,
    "preview": "/*\r\n* Copyright 2008 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/encoder/MaskUtil.cs",
    "chars": 9326,
    "preview": "/*\r\n* Copyright 2008 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/encoder/MatrixUtil.cs",
    "chars": 29074,
    "preview": "/*\r\n* Copyright 2008 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/3rd/zxing/qrcode/encoder/QRCode.cs",
    "chars": 3640,
    "preview": "/*\r\n* Copyright 2008 ZXing authors\r\n*\r\n* Licensed under the Apache License, Version 2.0 (the \"License\");\r\n* you may not "
  },
  {
    "path": "shadowsocks-csharp/Controller/APIServer.cs",
    "chars": 11206,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Net;\nusing System.Net.Sockets;\nusing Sh"
  },
  {
    "path": "shadowsocks-csharp/Controller/AutoStartup.cs",
    "chars": 3813,
    "preview": "using System;\r\nusing System.Windows.Forms;\r\nusing Microsoft.Win32;\r\n\r\nnamespace Shadowsocks.Controller\r\n{\r\n    class Au"
  },
  {
    "path": "shadowsocks-csharp/Controller/FileManager.cs",
    "chars": 3699,
    "preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.IO.Compression;\r\nusing System.Text;\r\n\r"
  },
  {
    "path": "shadowsocks-csharp/Controller/GfwListUpdater.cs",
    "chars": 9847,
    "preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing System.Net;\r\nusing System.IO;\r\nusing Shadow"
  },
  {
    "path": "shadowsocks-csharp/Controller/HttpPortForwarder.cs",
    "chars": 12146,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Net;\nusing System.Net.Sockets;\nusing System.Text;\nusing Sy"
  },
  {
    "path": "shadowsocks-csharp/Controller/HttpProxy.cs",
    "chars": 13284,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Net;\nusing System.Net.Sockets;\n\nnamespa"
  },
  {
    "path": "shadowsocks-csharp/Controller/HttpProxyRunner.cs",
    "chars": 6291,
    "preview": "using Shadowsocks.Model;\r\nusing Shadowsocks.Properties;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System"
  },
  {
    "path": "shadowsocks-csharp/Controller/I18N.cs",
    "chars": 1714,
    "preview": "using Shadowsocks.Properties;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing System.Text."
  },
  {
    "path": "shadowsocks-csharp/Controller/Listener.cs",
    "chars": 11684,
    "preview": "using Shadowsocks.Model;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Net;\r\nusing System.Net.Network"
  },
  {
    "path": "shadowsocks-csharp/Controller/Local.cs",
    "chars": 66471,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Net;\nusing System.Net.Sockets;\nusing Sh"
  },
  {
    "path": "shadowsocks-csharp/Controller/Logging.cs",
    "chars": 10029,
    "preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.Net.Sockets"
  },
  {
    "path": "shadowsocks-csharp/Controller/PACServer.cs",
    "chars": 11386,
    "preview": "using Shadowsocks.Model;\r\nusing Shadowsocks.Properties;\r\nusing Shadowsocks.Util;\r\nusing System;\r\nusing System.Collectio"
  },
  {
    "path": "shadowsocks-csharp/Controller/ProxyAuth.cs",
    "chars": 23255,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Net;\nusing System.Net.Sockets;\nusing Sh"
  },
  {
    "path": "shadowsocks-csharp/Controller/ProxySocket.cs",
    "chars": 45461,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Net;\nusing System.Net.Sockets;\nusing System.Text;\nusing Sh"
  },
  {
    "path": "shadowsocks-csharp/Controller/ShadowsocksController.cs",
    "chars": 18511,
    "preview": "using System.IO;\r\nusing Shadowsocks.Model;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing"
  },
  {
    "path": "shadowsocks-csharp/Controller/Socks5Forwarder.cs",
    "chars": 27618,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Net;\nusing System.Net.Sockets;\nusing System.Text;\nusing Sy"
  },
  {
    "path": "shadowsocks-csharp/Controller/SpeedTest.cs",
    "chars": 7469,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Text;\nusing Shadowsocks.Model;\n\n"
  },
  {
    "path": "shadowsocks-csharp/Controller/SystemProxy.cs",
    "chars": 28970,
    "preview": "using System.Windows.Forms;\r\nusing Microsoft.Win32;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Run"
  },
  {
    "path": "shadowsocks-csharp/Controller/UpdateChecker.cs",
    "chars": 7029,
    "preview": "using Shadowsocks.Model;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Net;\r\nusing System.Text.Regula"
  },
  {
    "path": "shadowsocks-csharp/Controller/UpdateFreeNode.cs",
    "chars": 5010,
    "preview": "using Shadowsocks.Model;\r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Net"
  },
  {
    "path": "shadowsocks-csharp/Data/cn.txt",
    "chars": 5450,
    "preview": "# translation for Simplified Chinese\n\nShadowsocks=Shadowsocks\n\n# Menu items\n\nMode=系统代理模式\nNo modify system proxy=保持当前状态不修"
  },
  {
    "path": "shadowsocks-csharp/Data/privoxy_conf.txt",
    "chars": 174,
    "preview": "listen-address __PRIVOXY_BIND_IP__:__PRIVOXY_BIND_PORT__\nshow-on-task-bar 0\nactivity-animation 0\nforward-socks5 / 127.0"
  },
  {
    "path": "shadowsocks-csharp/Data/user-rule.txt",
    "chars": 98,
    "preview": "! Put user rules line by line in this file.\r\n! See https://adblockplus.org/en/filter-cheatsheet\r\n"
  },
  {
    "path": "shadowsocks-csharp/Data/zh-tw.txt",
    "chars": 5284,
    "preview": "# translation for Traditional Chinese\n\nShadowsocks=Shadowsocks\n\n# Menu items\n\nMode=系統代理模式\nNo modify system proxy=保持當前狀態不"
  },
  {
    "path": "shadowsocks-csharp/Encryption/EncryptorBase.cs",
    "chars": 1636,
    "preview": "using System.Security.Cryptography;\r\nusing System.Text;\r\n\r\nnamespace Shadowsocks.Encryption\r\n{\r\n    public struct Encry"
  },
  {
    "path": "shadowsocks-csharp/Encryption/EncryptorFactory.cs",
    "chars": 3480,
    "preview": "\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Reflection;\r\nnamespace Shadowsocks.Encryption\r\n{\r\n    "
  },
  {
    "path": "shadowsocks-csharp/Encryption/IEncryptor.cs",
    "chars": 513,
    "preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\n\r\nnamespace Shadowsocks.Encryption\r\n{\r\n    public"
  },
  {
    "path": "shadowsocks-csharp/Encryption/IVEncryptor.cs",
    "chars": 9189,
    "preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Security.Cryptography;\r\nusing System.Text;\r\nusing Shadow"
  },
  {
    "path": "shadowsocks-csharp/Encryption/Libcrypto.cs",
    "chars": 6026,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Tex"
  },
  {
    "path": "shadowsocks-csharp/Encryption/LibcryptoEncryptor.cs",
    "chars": 6345,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\nusing System.Text;\n\nnamespace Sha"
  },
  {
    "path": "shadowsocks-csharp/Encryption/MbedTLS.cs",
    "chars": 5469,
    "preview": "using System;\nusing System.IO;\nusing System.Runtime.InteropServices;\n\nusing Shadowsocks.Controller;\nusing Shadowsocks.P"
  },
  {
    "path": "shadowsocks-csharp/Encryption/MbedTLSEncryptor.cs",
    "chars": 5931,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\n\nnamespace Shadowsocks.Encryption"
  },
  {
    "path": "shadowsocks-csharp/Encryption/RSA.cs",
    "chars": 841,
    "preview": "using System;\nusing System.Text;\nusing System.Security.Cryptography;\nusing System.IO;\n\nnamespace Shadowsocks.Encryption"
  },
  {
    "path": "shadowsocks-csharp/Encryption/Sodium.cs",
    "chars": 2201,
    "preview": "using Shadowsocks.Controller;\r\nusing Shadowsocks.Properties;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing S"
  },
  {
    "path": "shadowsocks-csharp/Encryption/SodiumEncryptor.cs",
    "chars": 4814,
    "preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\n\r\nnamespace Shadowsocks.Encryption\r\n{\r\n    public"
  },
  {
    "path": "shadowsocks-csharp/Model/Configuration.cs",
    "chars": 31227,
    "preview": "using Shadowsocks.Controller;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Drawing;\r\nusing System.IO"
  },
  {
    "path": "shadowsocks-csharp/Model/Host.cs",
    "chars": 4963,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Net;\nusing System.Text;\n\nnamespace Shadowsocks.Model\n{\n   "
  },
  {
    "path": "shadowsocks-csharp/Model/IPRangeSet.cs",
    "chars": 5947,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Net;\nusing System.Text;\n\nnamespace Shadow"
  },
  {
    "path": "shadowsocks-csharp/Model/IPSegment.cs",
    "chars": 5581,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace Shadowsocks.Mod"
  },
  {
    "path": "shadowsocks-csharp/Model/LRUCache.cs",
    "chars": 4195,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing Shadowsocks.Controller;\n\nnamespace Shadowsocks"
  },
  {
    "path": "shadowsocks-csharp/Model/MinSearchTree.cs",
    "chars": 8743,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace Shadowsocks.Model\n{\n    public struct Min"
  },
  {
    "path": "shadowsocks-csharp/Model/Server.cs",
    "chars": 18117,
    "preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing System.Diagnostics;\r\n#if !_CONSOLE\r\nusing Si"
  },
  {
    "path": "shadowsocks-csharp/Model/ServerSelectStrategy.cs",
    "chars": 15985,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace Shadowsocks.Model\n{\n    public class Serv"
  },
  {
    "path": "shadowsocks-csharp/Model/ServerSpeedLog.cs",
    "chars": 18814,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace Shadowsocks.Model\n{\n    public class Tran"
  },
  {
    "path": "shadowsocks-csharp/Obfs/Auth.cs",
    "chars": 48556,
    "preview": "using System;\nusing System.Collections.Generic;\nusing Shadowsocks.Controller;\nusing System.Security.Cryptography;\nusing"
  },
  {
    "path": "shadowsocks-csharp/Obfs/AuthAkarin.cs",
    "chars": 27585,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Security.Cryptography;\nusing System.Text;\nusing Shadowsock"
  },
  {
    "path": "shadowsocks-csharp/Obfs/AuthChain.cs",
    "chars": 32929,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Security.Cryptography;\nusing System.Text;\nusing Shadowsock"
  },
  {
    "path": "shadowsocks-csharp/Obfs/HttpSimpleObfs.cs",
    "chars": 27866,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Security.Cryptography;\n\nnamespace Shadowsocks.Obfs\n{\n    c"
  },
  {
    "path": "shadowsocks-csharp/Obfs/IObfs.cs",
    "chars": 2069,
    "preview": "using System;\n\nnamespace Shadowsocks.Obfs\n{\n    public class ObfsException : Exception\n    {\n        public ObfsExcepti"
  },
  {
    "path": "shadowsocks-csharp/Obfs/ObfsBase.cs",
    "chars": 3191,
    "preview": "\nusing System;\nusing System.Collections.Generic;\n\nnamespace Shadowsocks.Obfs\n{\n    public abstract class ObfsBase: IObf"
  },
  {
    "path": "shadowsocks-csharp/Obfs/ObfsFactory.cs",
    "chars": 3469,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Reflection;\n\nnamespace Shadowsocks.Obfs\n{\n    public stati"
  },
  {
    "path": "shadowsocks-csharp/Obfs/Plain.cs",
    "chars": 1102,
    "preview": "using System;\nusing System.Collections.Generic;\n\nnamespace Shadowsocks.Obfs\n{\n    public class Plain : ObfsBase\n    {\n "
  },
  {
    "path": "shadowsocks-csharp/Obfs/VerifySimpleObfs.cs",
    "chars": 7327,
    "preview": "using System;\nusing System.IO;\nusing System.Collections.Generic;\nusing Shadowsocks.Controller;\nusing System.Security.Cr"
  },
  {
    "path": "shadowsocks-csharp/Program.cs",
    "chars": 5959,
    "preview": "using Shadowsocks.Controller;\r\nusing Shadowsocks.Util;\r\nusing System;\r\nusing System.IO;\r\nusing System.Threading;\r\nusing"
  },
  {
    "path": "shadowsocks-csharp/Properties/AssemblyInfo.cs",
    "chars": 1045,
    "preview": "using Shadowsocks.Controller;\r\nusing System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.I"
  },
  {
    "path": "shadowsocks-csharp/Properties/Resources.Designer.cs",
    "chars": 9559,
    "preview": "//------------------------------------------------------------------------------\r\n// <auto-generated>\r\n//     This code"
  },
  {
    "path": "shadowsocks-csharp/Properties/Resources.resx",
    "chars": 9258,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    T"
  },
  {
    "path": "shadowsocks-csharp/Util/Base64.cs",
    "chars": 1637,
    "preview": "using System;\nusing System.Text;\n\nnamespace Shadowsocks.Util\n{\n    public static class Base64\n    {\n        public stat"
  },
  {
    "path": "shadowsocks-csharp/Util/CRC.cs",
    "chars": 3121,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace Shadowsocks.Util\n{\n    class CRC32\n    {\n"
  },
  {
    "path": "shadowsocks-csharp/Util/EnvCheck.cs",
    "chars": 756,
    "preview": "using System;\nusing System.Windows.Forms;\nusing Microsoft.Win32;\n\nnamespace Shadowsocks.Util\n{\n    public class EnvChec"
  },
  {
    "path": "shadowsocks-csharp/Util/ServerName.cs",
    "chars": 1493,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace Shadowsocks.Util\n{\n    public static clas"
  },
  {
    "path": "shadowsocks-csharp/Util/Util.cs",
    "chars": 19734,
    "preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Drawing;\r\nusing System.IO;\r\nu"
  },
  {
    "path": "shadowsocks-csharp/View/ConfigForm.Designer.cs",
    "chars": 49663,
    "preview": "namespace Shadowsocks.View\r\n{\r\n    partial class ConfigForm\r\n    {\r\n        /// <summary>\r\n        /// 必需的设计器变量。\r\n     "
  },
  {
    "path": "shadowsocks-csharp/View/ConfigForm.cs",
    "chars": 31880,
    "preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Drawing;\r\nusing System.Tex"
  },
  {
    "path": "shadowsocks-csharp/View/ConfigForm.resx",
    "chars": 5814,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    Th"
  },
  {
    "path": "shadowsocks-csharp/View/InputPassword.Designer.cs",
    "chars": 3806,
    "preview": "namespace Shadowsocks.View\n{\n    partial class InputPassword\n    {\n        /// <summary>\n        /// Required designer "
  },
  {
    "path": "shadowsocks-csharp/View/InputPassword.cs",
    "chars": 1110,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
  },
  {
    "path": "shadowsocks-csharp/View/InputPassword.resx",
    "chars": 5696,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The prim"
  },
  {
    "path": "shadowsocks-csharp/View/LogForm.Designer.cs",
    "chars": 9505,
    "preview": "namespace Shadowsocks.View\n{\n    partial class LogForm\n    {\n        /// <summary>\n        /// Required designer variab"
  },
  {
    "path": "shadowsocks-csharp/View/LogForm.cs",
    "chars": 5346,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
  },
  {
    "path": "shadowsocks-csharp/View/LogForm.resx",
    "chars": 6261,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The prim"
  },
  {
    "path": "shadowsocks-csharp/View/MenuViewController.cs",
    "chars": 59751,
    "preview": "using Shadowsocks.Controller;\r\nusing Shadowsocks.Model;\r\nusing Shadowsocks.Properties;\r\nusing System;\r\nusing System.Col"
  },
  {
    "path": "shadowsocks-csharp/View/PortSettingsForm.Designer.cs",
    "chars": 19806,
    "preview": "namespace Shadowsocks.View\n{\n    partial class PortSettingsForm\n    {\n        /// <summary>\n        /// Required design"
  },
  {
    "path": "shadowsocks-csharp/View/PortSettingsForm.cs",
    "chars": 11040,
    "preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Data;\r\nusing System.Drawin"
  },
  {
    "path": "shadowsocks-csharp/View/PortSettingsForm.resx",
    "chars": 5696,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The prim"
  },
  {
    "path": "shadowsocks-csharp/View/QRCodeSplashForm.cs",
    "chars": 10972,
    "preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Data;\r\nusing System.Drawin"
  },
  {
    "path": "shadowsocks-csharp/View/ResetPassword.Designer.cs",
    "chars": 6402,
    "preview": "namespace Shadowsocks.View\n{\n    partial class ResetPassword\n    {\n        /// <summary>\n        /// Required designer "
  },
  {
    "path": "shadowsocks-csharp/View/ResetPassword.cs",
    "chars": 1546,
    "preview": "using System;\nusing System.Drawing;\nusing System.Windows.Forms;\nusing Shadowsocks.Model;\nusing Shadowsocks.Properties;\n"
  },
  {
    "path": "shadowsocks-csharp/View/ResetPassword.resx",
    "chars": 5696,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The prim"
  },
  {
    "path": "shadowsocks-csharp/View/ServerLogForm.Designer.cs",
    "chars": 20110,
    "preview": "namespace Shadowsocks.View\n{\n    partial class ServerLogForm\n    {\n        /// <summary>\n        /// Required designer "
  },
  {
    "path": "shadowsocks-csharp/View/ServerLogForm.cs",
    "chars": 50934,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
  },
  {
    "path": "shadowsocks-csharp/View/ServerLogForm.resx",
    "chars": 9372,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The prim"
  },
  {
    "path": "shadowsocks-csharp/View/SettingsForm.Designer.cs",
    "chars": 42674,
    "preview": "namespace Shadowsocks.View\n{\n    partial class SettingsForm\n    {\n        /// <summary>\n        /// Required designer v"
  },
  {
    "path": "shadowsocks-csharp/View/SettingsForm.cs",
    "chars": 10623,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
  },
  {
    "path": "shadowsocks-csharp/View/SettingsForm.resx",
    "chars": 5696,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The prim"
  },
  {
    "path": "shadowsocks-csharp/View/ShowTextForm.Designer.cs",
    "chars": 3470,
    "preview": "namespace Shadowsocks.View\n{\n    partial class ShowTextForm\n    {\n        /// <summary>\n        /// Required designer v"
  },
  {
    "path": "shadowsocks-csharp/View/ShowTextForm.cs",
    "chars": 3095,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
  },
  {
    "path": "shadowsocks-csharp/View/ShowTextForm.resx",
    "chars": 5696,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The prim"
  },
  {
    "path": "shadowsocks-csharp/View/SubscribeForm.Designer.cs",
    "chars": 16359,
    "preview": "namespace Shadowsocks.View\n{\n    partial class SubscribeForm\n    {\n        /// <summary>\n        /// Required designer "
  },
  {
    "path": "shadowsocks-csharp/View/SubscribeForm.cs",
    "chars": 6950,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
  },
  {
    "path": "shadowsocks-csharp/View/SubscribeForm.resx",
    "chars": 5696,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The prim"
  },
  {
    "path": "shadowsocks-csharp/app.config",
    "chars": 152,
    "preview": "<?xml version=\"1.0\"?>\r\n<configuration>\r\n<startup>\r\n  <supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.6.1\""
  },
  {
    "path": "shadowsocks-csharp/app.manifest",
    "chars": 722,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\" xmlns:"
  },
  {
    "path": "shadowsocks-csharp/shadowsocks-csharp-console.csproj",
    "chars": 8822,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.micros"
  },
  {
    "path": "shadowsocks-csharp/shadowsocks-csharp.csproj",
    "chars": 16313,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.micro"
  },
  {
    "path": "shadowsocks-csharp/shadowsocks-csharp4.0.csproj",
    "chars": 15832,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.micros"
  },
  {
    "path": "shadowsocks-csharp/ssr-win-4.0.xml",
    "chars": 828,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<rss xmlns:content=\"http://purl.org/rss/1.0/modules/content/\" xmlns:files=\"https:"
  },
  {
    "path": "shadowsocks-csharp.sln",
    "chars": 1778,
    "preview": "\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 15\r\nVisualStudioVersion = 15.0.27703.204"
  },
  {
    "path": "test/Properties/AssemblyInfo.cs",
    "chars": 1417,
    "preview": "using System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\n\r\n// General I"
  },
  {
    "path": "test/ServerTest.cs",
    "chars": 2563,
    "preview": "using System;\nusing System.Collections.Generic;\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\nusing Shadowsocks.M"
  },
  {
    "path": "test/UnitTest.cs",
    "chars": 6367,
    "preview": "using System;\r\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\r\nusing Shadowsocks.Controller;\r\nusing Shadowsocks.En"
  },
  {
    "path": "test/test.csproj",
    "chars": 4660,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.micro"
  }
]

About this extraction

This page contains the full source code of the CGDF-Github/SSRR-Windows GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 171 files (1.7 MB), approximately 373.7k tokens, and a symbol index with 1750 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!