一旦使用了 ss, 那么很多应用就无法连接网络。

本文提供一个方法可以简单使用ss提供的代理。

多谢 wtwsgs 提供方法:http://blog.csdn.net/wtwsgs/article/details/51333912

代码很少,可以自己复制放在vs运行

     class Program
    {
        static void Main(string[] args)
        {
            //%USERPROFILE%\AppData\Local\Packages
            string str = "%USERPROFILE%\\AppData\\Local\\Packages";
            str = Environment.ExpandEnvironmentVariables(str);
            DirectoryInfo dir = new DirectoryInfo(str);
            foreach (var temp in dir.GetDirectories())
            {
                str = "CheckNetIsolation.exe LoopbackExempt -a -n=\"" + temp.Name + "\"";
                Control(str);
            }
        }

        private static string Control(string str)
        {
            Process p = new Process();
            p.StartInfo.FileName = "cmd.exe";
            p.StartInfo.UseShellExecute = false;
            p.StartInfo.RedirectStandardInput = true;
            p.StartInfo.RedirectStandardOutput = true;
            p.StartInfo.RedirectStandardError = true;
            p.StartInfo.CreateNoWindow = true;
            p.StartInfo.StandardOutputEncoding = Encoding.UTF8;
            p.Start(); 

            p.StandardInput.WriteLine(str + "&exit");

            p.StandardInput.AutoFlush = true;

            string output = p.StandardOutput.ReadToEnd();
            output += p.StandardError.ReadToEnd();

            p.WaitForExit();
            p.Close();

            return output + "\r\n";
        }
    }

如果不想在 vs 编译,可以下载编译的:http://download.csdn.net/detail/lindexi_gd/9823838

需要使用管理员打开

https://github.com/shadowsocks/shadowsocks-windows/issues/932

http://krblog.krrrrr.xyz/md/post/105


本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。欢迎转载、使用、重新发布,但务必保留文章署名林德熙(包含链接:http://blog.csdn.net/lindexi_gd ),不得用于商业目的,基于本文修改后的作品务必以相同的许可发布。如有任何疑问,请与我联系

最新文章

  1. cron 任务
  2. Python之路Day20-Django一对一(多)以及Ajax
  3. winform空间批量控制
  4. python核心编程第六章练习6-11
  5. [转]关闭ORACLE数据库
  6. ROC和AUC介绍以及如何计算AUC ---好!!!!
  7. Unity3d:Unknown type 'System.Collections.Generic.CollectionDebuggerView'1
  8. 【转】setAnimation和startAnimation区别
  9. Selenium 2.0 WebDriver 自动化测试 使用教程 实例教程 API快速参考
  10. oracle一直不确定的distinct多字段处理情况整理
  11. Bagging与方差
  12. Spring Boot 自定义 starter
  13. Python爬取今日头条段子
  14. 014 在Spark中完成PV与UV的计算,重在源代码
  15. C# 装箱
  16. MySQL表中的数据类型
  17. LeetCode题解之 Implement strStr()
  18. ORA-01950: no privileges on tablespace xxx ORA-01950: 对表空间 'xxx'无权限
  19. SpringMVC 之 Hello World 入门
  20. RabbitMQ上手记录–part 4-节点集群(单机多节点)

热门文章

  1. Java课程设计——象棋(201521123042 姚佳希)
  2. 201521123103 《java学习笔记》 第十四周学习总结
  3. 201521123045 《JAVA程序设计》 第14周学习总结
  4. 201521123008《Java程序设计》第11周学习总结
  5. shell脚本之流程控制
  6. Mybatis映射文件处理特殊字符【转发】
  7. mysql不能插入中文数据
  8. python 实现注册程序
  9. Socket类 以及 ServerSocket类 讲解
  10. 全栈工程师带你开发 ,node开发人脸识别门禁系统