通过ubuntu的apt-get安装的squid没有启用ssl功能,需要手动编译。
编译squid步骤如下。
apt-get install openssl libssl-dev ssl-cert
apt-get source squid
| #include <syslog.h> | |
| #include <lua.h> | |
| #include <lauxlib.h> | |
| #define LSYSLOG_FCOUNT 8 | |
| static int facilitys[LSYSLOG_FCOUNT] = { | |
| LOG_LOCAL0, | |
| LOG_LOCAL1, |
| -- port from golang: https://golang.org/src/time/time.go | |
| -- | |
| local secondsPerMinute = 60 | |
| local secondsPerHour = 60 * 60 | |
| local secondsPerDay = 24 * secondsPerHour | |
| local secondsPerWeek = 7 * secondsPerDay | |
| local daysPer400Years = 365*400 + 97 | |
| local daysPer100Years = 365*100 + 24 | |
| local daysPer4Years = 365*4 + 1 |
| package main | |
| import ( | |
| "crypto/dsa" | |
| "crypto/rand" | |
| "crypto/sha1" | |
| "crypto/x509" | |
| "encoding/asn1" | |
| "encoding/pem" | |
| "errors" |
| #include <sys/time.h> | |
| #include <sys/resource.h> | |
| #include <time.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #define ONE_SECOND 1000000000L | |
| #define ONE_MS 1000000L |
| #include <stdio.h> | |
| int* a[5]; | |
| int& ref() { | |
| return *a[0]; | |
| } | |
| void print(int* p) { | |
| printf("%p\n", p); | |
| } |
| local count = 10000 | |
| local items = 10000 | |
| local g = {} | |
| collectgarbage("stop") | |
| function run_gc_test(tag, mt) | |
| for i=1,count do | |
| local t = {} | |
| if mt then | |
| setmetatable(t, mt) |