Documentation ¶
Index ¶
- Constants
- Variables
- func GetVersion() string
- func InitConf(confDir string)
- type AssestFile
- type AssestStruct
- func (statics *AssestStruct) FileHandlerFunc(name string) http.HandlerFunc
- func (statics *AssestStruct) GetAssestFile(name string) (*AssestFile, error)
- func (statics AssestStruct) GetContent(name string) string
- func (statics AssestStruct) GetFileNames(dir string) []string
- func (statics *AssestStruct) HTTPHandler(pdir string) http.Handler
- type NumsCount
- type Proxy
- type ProxyManager
- type ProxyPool
Constants ¶
View Source
const ( // AuthTypeNO 不需要认证 AuthTypeNO = 0 // AuthTypeBasic 使用basic AuthTypeBasic = 1 // AuthTypeBasicWithAny 使用basic,任意账号密码都可以 AuthTypeBasicWithAny = 2 )
Variables ¶
View Source
var Assest = &AssestStruct{ Files: map[string]*AssestFile{ _assestBase64Decode("cmVzL2NvbmYvcG9vbC5jb25m"): &AssestFile{ Name: _assestBase64Decode("cmVzL2NvbmYvcG9vbC5jb25m"), Mtime: 1442028071, Content: _assestGzipBase64decode("H4sIAAAJbogA/1IuKMqvqLTNKCkpsNLXNzQy1zMAQkMrCwMLAwUFZUMQ4OLCpcrEwMCQS0EBJl+cn5xdbApUkZeYm+pQUFyOUGlsZGCgoGwEAlwAAAAA//8BAAD//4vslMF0AAAA"), }, _assestBase64Decode("cmVzL2NvbmYvcHJveHkuY29uZg=="): &AssestFile{ Name: _assestBase64Decode("cmVzL2NvbmYvcHJveHkuY29uZg=="), Mtime: 1442028071, Content: _assestGzipBase64decode("H4sIAAAJbogA/0yRTWsTQRzG7/MpFoqg0G5iDb4MiIeePPSiPQgiYboZksVkZpmdrYZSiNCa2DYmal5qqGJMan1pEwvaRtKS7yI7s5uTX8H/bjwI/8MyzzP7PP/fOFxIAxs3k7eSCM2Fp1u6fQozbf8wVLXpX1SN4PA1knaBci8yXgfXdLwXDvrTcjUcNvVRVze/I0FXRBHkRZD1fkn1D/+Xg8aJGnzUlbPg23Ba6oSTck5Kx8hRkqHCePhgYZmwhXtUiuIjvVtWg87sf8vkKb4KtSAxvqR7Jf1zJ5y89UdfPZHX7w5Upa9bx/64F9Sf672hqn/Sxz01GiGSt9foUo5aj6FUFIYTCdczVzN2IWtavJBwJZG2BWcOFU7ecxMgJCzuFNPCzjKZXkyZDsveScvb65cEYZmNaLE4/1/a/gvdrASdTSA17TRmyBCyosi7TFKxRvL4xmIyGQOpqu0uIAuHz3TrlzqvoTnuSJszF68zzih01O0PM8P8KnFtC8eA4k9jdpImrIj98Vhv1tSormpnG4h4MrdSdCiODQheSeYpRozDZhTPOEVUto7Uq+0/57v88u/KF5gr3DRN9aYCA+38URWgBd0BLBNR8VzV78BN/2ISND6HOye6VZ4PJ+/1ywP0RHCWvR+blniG4lTq2l8AAAD//wEAAP//YF6z00ECAAA="), }, _assestBase64Decode("cmVzL2NvbmYvdXNlcnM="): &AssestFile{ Name: _assestBase64Decode("cmVzL2NvbmYvdXNlcnM="), Mtime: 1442028071, Content: _assestGzipBase64decode("H4sIAAAJbogA/8pLzE21SkzJzcxTKCgutwJihczieLAARJgLoiIpGSwPpAEAAAD//wEAAP//DHUqRjIAAAA="), }, _assestBase64Decode("cmVzL2Nzcy9mbGF0LmNzcw=="): &AssestFile{ Name: _assestBase64Decode("cmVzL2Nzcy9mbGF0LmNzcw=="), Mtime: 1442028071, Content: _assestGzipBase64decode("H4sIAAAJbogA/+x9667bOJLw/zyFvjNoIOlYiizfT9CNbzF/9sfOvkCjF6Al+liILHllOZcenHdfUuKdRYrScTdmgc1MOjZZrCrWhSySRTop2uZaNN/qGLVt8y0u66+4veHon++i6Ni0BW7jY9N1zSXOm6ppn6O/rdbrwwZH/6+8XJu2Q3X3WYJ2zdUH9/oO9Yg5yDrbH3NE23f4excXOG9a1JVN/RzVTY1pRfwNH7+UXdy1qL6VQ12aZJtb38ouJCSezw3pw4J8ODX5/TaN4qvWrLl3VVljWZmUl5e4be51gQtVRi0qyvvtOdpevwuw7ny/HGtUVj3gFRVFWb88R2sKEkUUb3zG5cu5e46WyS4jf3pJovzLS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J3TCYhrqDQGSbvj/ImopjsP8qLhNYNQvHqXtc0lfakrDfCzfZbtRWJ9y0bVmoJJS3i55H8Qafdw/EvMWrb5pu6SvG+Hcti08Pwxi7P41NuROq7Pybl4aen3bSHFXQodcGB9gThQQ24xYOEnAP2CKwqpr7ZHoZzszr2BC/fEuOcOoTDItJ4adCnMB7qWiagT04QfU1OfPPPEFRc1rX7t/4lRchg1UzuTMnkhlcy/D3H/UpbCRu3A9iP8dNbddEtbzGuI1QX0Xseq9C3EQv8tcxxPPwGc/+aNlkHfVhMb0SWlmAzeit+GqHGCb/6NLVF9mk5mStHTx4Eng2JvknVvLCRSbMWMr6+kLHt3lbvk+RT/+32qYelX/I4I4N1/dLPtK9Exf8DAAD//wEAAP//kPTV3E+MAAA="), }, _assestBase64Decode("cmVzL2Nzcy9zdHlsZS5jc3M="): &AssestFile{ Name: _assestBase64Decode("cmVzL2Nzcy9zdHlsZS5jc3M="), Mtime: 1442028071, Content: _assestGzipBase64decode("H4sIAAAJbogA/6xWX2/bNhB/jj4FV2NAC0SGHNtBKqHAuq5B9zAU6LphwDAIlEhZRGhRoKjEnpDvvjuSMqXa6dOcQJDIu+P9+fF399OHT++//P7xK3n1x9f7+O5VFi1LyakmQ0SIfUtJoUydRc9RbfbyulDsOOyp3okmJUnWUsZEs4PX52jR0EerVwlpOCi2Wu0ES3/569c93fGvmjZdpfR++ZsotepUZZbvZVvT159bWgpzfPc2eZOBunKfYHP5Fr8LWj7stOoblpLF/f09roVz8cv7k5xJbza3H35e43KppNLpUy0Mx1gWe970AyFPgpk6JXfJjxM7JCG0NyoiPqZe2rBOu+3B7s/9aA/4LUVn4s4cJY/NseUpaVTjDvSGpHApkoqalEhemZmZFRpfeWOVasCY+BfMrDZuqVCacR1rsatBfQXCnZKCEb0r6Ovkmvj/5eqNkz7EXU2ZenKyCfxZyZvt9pqEB8g7BXviE3fWCyUZLhp+MDGVYgexl7yB0mJAS+dKXgndmSG4hiH97549R2MCF2g/7/oCCwjZTD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JKOM4orkWApjDxhIKjpIh37VgjDfg0H8AAAD//wEAAP//xEZfeyoMAAA="), }, _assestBase64Decode("cmVzL3RwbC9hYm91dC5odG1s"): &AssestFile{ Name: _assestBase64Decode("cmVzL3RwbC9hYm91dC5odG1s"), Mtime: 1444565514, Content: _assestGzipBase64decode("H4sIAAAJbogA/4yQwY7TMBCG73kKK5ckEthFwKWb+MCKK0JixbWaONPabRJb9mR3q6oSPCsvgtO4VRGXzWkmnn/m/35Wt17IrHZM9RBCk+uPuYTWTlQLJzNWO/nd29cjG2CEHXp++/1jcs56YvXWjsSU7a1v2n5CqYncn1+/g1WH8OlWwLX6PBcaOvtyaWsx6yVz8xV+f3SPitia1cC0x210FveGtRA7Q3pqubKD0KabxEX5PvnLGYHfITX5pu1hPOTyTbJagLzdfpy8x8j0E30wdlz/j3g68efl8XxOALOazXJmuiYf8WWTJjaht5Rft1/SzlLoqQnKG0cyC0hPZsCYfbmdRkVRXFanjM3fMtN0Vk1D9MaVRyD82uPclcXyXFQP7H6cB6+W3CL/DM1TCMYu+JuIL5RGdeD7kP8jpaPDpiB8JbGHZ0gHrvtvPmLUyUT4cnyC3TcYsCw0QldU3BAO5ari4ByO3aM2fVcui6rs/O7DarWqHiK/uAbwFwAA//8BAAD//2p+MfeNAgAA"), }, _assestBase64Decode("cmVzL3RwbC9hZGQuaHRtbA=="): &AssestFile{ Name: _assestBase64Decode("cmVzL3RwbC9hZGQuaHRtbA=="), Mtime: 1444574068, Content: _assestGzipBase64decode("H4sIAAAJbogA/3xT3W7zKhC891Mgjnru/N82DrWtnnc49xEYnKDPBgSkTRTl3b+F2v1R2l60EcvOMDPrbZ0/T6JP/hm0GuX+f8omgUZt54uhnEu1J2VhTk8ztXupUiv3B09QBaVr0uYLtmU275Ok9RH8Krk/dLgsijuMJO/wJ2YMzd6Gfxy90EnuVYe9NhhFpg5HLHkss+YutLIeNCAlXpGx+nQmbc6gGtQhNAt/0MButPMY0cFLDWQ5AOB09HrQs5mEB1I9jhh5MCB8h+Vod4EgKhEnKAv69fUg/OkgotOqAKcYKTrDddTgcN/mKzCY5vJlxYdyGl2RQSgvLDxyucgRZdL9x2eprhCaVObokT8bALgjmyWoHybqXIeZVwj+UmMl5H3GIaIjtAVPgUlMTgAFQjSQQS6Ch6rigTcHIeApD+bCr+e3Ma+jEicawiFJayzMLxrrIFfl0aAnbTsG7/YH703gU74neV5uq6x83GbNNitJUzTFAgtdcH2DPobQiHGvzwvHSrAtviV4vy6/Xt8QOz38cQ+fhFWbrMgCaQ3j+hV1/wOq/B1Ff4BVP8LcB4IKl5ZVkw4jI4zaUevnD5KmrhuYVZzCMrI87kcedwm+r2Q42om8ja0dNIcaCiWUppx6ivBt8E7YXQh/0dDFr+Xfmz4YzW7ma5DdhrH7pt5UW/ZAG1E9jptalE1dDlw8sOa++oYgmF/h6xSjr2xLavCM0VK9XLLYvDvAsl6v5P1stIVzWFqw/OYONmS0oH5Zuvd9XZeMS2cmeiZKK/EUlvGtvUco+QsAAP//AQAA//9UXKclzAQAAA=="), }, _assestBase64Decode("cmVzL3RwbC9pbmRleC5odG1s"): &AssestFile{ Name: _assestBase64Decode("cmVzL3RwbC9pbmRleC5odG1s"), Mtime: 1444563872, Content: _assestGzipBase64decode("H4sIAAAJbogA/5RWbW+jOBD+HH6FD+WkVhuFpC97VQpIq173vqy6VZrq7j4hx7jFWoJZ24RE2fz39QuQhEBCKzVgzzzP4xl7Brtz5viWm/qREClIGV2twQIm8B2zgYgwwJATzAXI4RoICjKOAUzC0kUDpP0P10k1y2YzTKggCG+3ZkrAeYwBF+sYe3ZOQhFNxqPRn7YyMfUTAj3r2defR+nKBksYk/fEswVN7RN4gGLIuXSbB2Plh2AqCE18LqDIuOuUYwsAJeSKqNQZXysdn2O2lAFIfyZcR0S+9AvV+vXMjCx0CHJK/rA9Gt/kSFAB4wOcng8QzRIx/AcLYGsX+yQLRIIs8Wka4yN5QCORMQdq+7rwaMe2RRUunKIf/LYTm3HtwnfTne+mEx/8ACE8x8i7kfE2HoZ/ZqpMWo7FFP+cKcsZNM9Q2zoCaTuDfoMkxmErgTHXOCz5oirMt/T0fj1e6TLZTdcKMyRL3yrrs1aNQP5VFQkgQxERGImMYXBQmSqGOQ3X5t2M2W5gJkLAaM5TKKWv7J1SgGwfxQQnwiyxDgKIxhVqBwLzYG37B32uGd8qGvKaYpnLExHs43eNtll437doyCmlcZNmr+eaR+9gxdf2AYnq2Xt6Z7yrUxNRLrbbSTVOKRPF6Sk5EpozmHq2eZrQJo6zWq2G8n9yPb6666SZ5/lwDkmYDRFdlIimEOuCpv3sSY5Hd6MPE9zsEdzcfv6rRiAf5pDuaiVl2O9nLPbsIuSDCBz73kIR8ACSLgFJiLi4vAeWHnEs60dc9FE0AA+v02/fn2eBfAyAojvpNX2cvU6fZtMvTy9fH6cDIFiGL++P/d25X0Kep9//+9915v7Adt9oIlRNUObN4wyf32cF8O0uCq8vj9Pnf/9uEUrgAk9Snu8YHYe8gQQjzDlka6uvsutpFbzCSGlUiUAx5djMyPSrtMue4+jeU3QmvUfVzlguR4ykwreWkIFVIEs8SKg3VujSYm02Un9I+JdwQZLttmxitRuFvP3AsOyz+lFdIe50a0yo7rXG5JcVFjX6yhoMG4zjW33nqZ/Kb5CLhwijH02QURMECCLUDWnBZVdUyNcWwZG5/BQfmkbj3nfEKjuNGul09DYbBpN3DPpqXwd9HfbEM2eHy2T2TL56R72s3JmQomwh2/YwZ/KrcFHu0adPl9UWFQVYfMW0UtV5jnilgxYfqpB/LdZP2aLV+SjTFbhK+S8e0YP73ynJhzLVXXz1deIlQ+rcn1lnHfVVb8kRyPSnzQYnoTrGRRH0rHLmNwAAAP//AQAA//9U8Slh3QsAAA=="), }, _assestBase64Decode("cmVzL3RwbC9sYXlvdXQuaHRtbA=="): &AssestFile{ Name: _assestBase64Decode("cmVzL3RwbC9sYXlvdXQuaHRtbA=="), Mtime: 1442028071, Content: _assestGzipBase64decode("H4sIAAAJbogA/5RUMbPbIAze36+gLG9pQrv1ethL26137dClUw4b2eiKIQciebn0/fcCTt5z0vQuZUBI+vRJCNnyzedvn378/P6FGZps+yDPApTOYgJSrDcqRKCGJxpWH/jZ7NQEDd8h7Lc+EGe9dwQuw/aoyTQadtjDqipvGTokVHYVe2Wheb9+d0WjEhkfFiQ67QGvQDH0C4Qh2saPQoxIJnXr3k/CoE5iG/zTYTUpp0YIhYGQLLQXZvabHY/rHYSI3j0/SzFjHqRF94sFsDkZHSxEA5CvZgIMDRcBouhjFINVtM4Hfm9AdZ0jxKm3ndeHLDTuGOqGO7XjC3UCl7LO5iWTrVYLA21i6i69FWGR9VbF2PDOBw1hM2CIxFupztXwFp2GJylUK4XF6/AFUmnN27zdASUoScp+D2/nU0ZX8RdcimRflBdj6cd8r8eAo6HHJb1cRNR1POLA1hi/+hHzu1745mLys6cyTeXRs8puQF7rtX6sBc/y5gVLTrARbia7YEJXidDd5sk0Ti9Zaj/YUs+9aG80hvcWVJ70E+BK/Bv36i+j1enyTeb2lLnMdfwPzTybftzk86KO04SL+k/5AwAA//8BAAD//4RFJ3pqBAAA"), }, _assestBase64Decode("cmVzL3RwbC9sb2dpbi5odG1s"): &AssestFile{ Name: _assestBase64Decode("cmVzL3RwbC9sb2dpbi5odG1s"), Mtime: 1442028071, Content: _assestGzipBase64decode("H4sIAAAJbogA/6SSsW7DIBCGdz/F6fbInVvbUoduHfoGFTYXBwkDPc5J/fY9EidK2rRLLRkj+Pj58NFYtwdnW+ztA3ZV03Pd3WuqIzh4k3OLPo4ubPLARKEs2kaeYCLZRQ1KMQuCGcTF0GJ9ZBHE8EjSotvye8GPyxx5m0m062mkYLtnO7kAr2VJU69jFZyfnwprEsBdpsxuRo5zumWUciHNArIkalHoU4WDmbRfWoTkzUC76C1xiy9BiGGJM8Npdm/8rCjebDPEIBw9AtPH7JjsrVWtWl31T9Gk8CGyRVhtUz58k327IH9a3pP7bdc895OTS6AWB0pB19heAui7Sewmw8t18prb1Fd1rotG+Z7+xxnRW6EHWk91uSKQZfE6YF3WQy6PIQZ6wq6pT3gH8AUAAP//AQAA//8TaBfOvgIAAA=="), }, _assestBase64Decode("cmVzL3RwbC90ZXN0Lmh0bWw="): &AssestFile{ Name: _assestBase64Decode("cmVzL3RwbC90ZXN0Lmh0bWw="), Mtime: 1442028071, Content: _assestGzipBase64decode("H4sIAAAJbogA/4xS3Y6bPBC95yksf9qbTw1kU7VKEaC+SWRgFltrbNceL0FR3r1jfqLddi96gYTn58w5Z6YKOGtosv8QAl5erB8ZyhvCFQ9Cq8GUzKtB4j2riq0yq1rfZFWv3linRQg1l99547y9ziyBlFVBOapYwEZAafuaOxuQM9GhsqbmRSrkTFHiMZczFH4ArPml1cK8coJA0Wpgk+pR1vx8fFpiaTrKPfrj6K68qYIThi0Ma95ZbX3poefN/0SbMk30mnihTK19UynjIjKcHVVTijMjRvq93XJ6XdLjfuc73DKoPH974rvgRPfQWYPeUq+HX1HRNCYi2hfbxcCcFh1Iq3vwZA+iK4timqYcrmJ0GvLOjsS5SFSKVc8qarXxH5gudX8wPJ2TFZ9z/EAIhnLjFBNa6cL08/mYH/NTfiq/np7Pyea/DR28mHkzSTAMRofzlxiArXtXhjlr9WZ29pmyh6Yd9N2NdWAQPP+oNsR2VHQkb0JHWO/kIa5Fw+g7OK9G4efNy2wbWSxnQz/v4aTqezC7f2hf02PDpr0vAVp6ak/WNdlvAAAA//8BAAD//4YZ9JYaAwAA"), }, _assestBase64Decode("cmVzL3ZlcnNpb24="): &AssestFile{ Name: _assestBase64Decode("cmVzL3ZlcnNpb24="), Mtime: 1442028071, Content: _assestGzipBase64decode("H4sIAAAJbogA/zLQMwIAAAD//wEAAP//LmT6GAMAAAA="), }, }, }
Assest export assests
View Source
var ProxyDebug = false
ProxyDebug 是否debug
Functions ¶
Types ¶
type AssestFile ¶
AssestFile assest file struct
type AssestStruct ¶
type AssestStruct struct {
Files map[string]*AssestFile
}
AssestStruct assest files
func (*AssestStruct) FileHandlerFunc ¶
func (statics *AssestStruct) FileHandlerFunc(name string) http.HandlerFunc
FileHandlerFunc handler http files
func (*AssestStruct) GetAssestFile ¶
func (statics *AssestStruct) GetAssestFile(name string) (*AssestFile, error)
GetAssestFile get file by name
func (AssestStruct) GetContent ¶
func (statics AssestStruct) GetContent(name string) string
GetContent get content by name
func (AssestStruct) GetFileNames ¶
func (statics AssestStruct) GetFileNames(dir string) []string
GetFileNames get all file names
func (*AssestStruct) HTTPHandler ¶
func (statics *AssestStruct) HTTPHandler(pdir string) http.Handler
HTTPHandler handler http request eg: http.Handle("/res/",res.Assest.HttpHandler("/res/"))
type Proxy ¶
type Proxy struct { URL *url.URL Weight int StatusCode proxyStatus CheckUsed int64 //ms LastCheck int64 LastCheckOk int64 Used int64 Count *proxyCount // contains filtered or unexported fields }
Proxy 一个代理
type ProxyManager ¶
type ProxyManager struct {
// contains filtered or unexported fields
}
ProxyManager manager server
func NewProyManager ¶
func NewProyManager(configPath string) *ProxyManager
NewProyManager init server
func (*ProxyManager) ServeHTTP ¶
func (manager *ProxyManager) ServeHTTP(w http.ResponseWriter, req *http.Request)
ServeHTTP ServeHTTP
type ProxyPool ¶
type ProxyPool struct { SessionProxys map[int64]map[string]*Proxy ProxyManager *ProxyManager Count *proxyCount // contains filtered or unexported fields }
ProxyPool 代理池
func (*ProxyPool) GetProxyNums ¶
GetProxyNums 返回各种代理的数量 web页面会使用
Click to show internal directories.
Click to hide internal directories.