@@ -10,5 +10,8 @@ RUN go mod download && \
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk add --no-cache ca-certificates
|
||||
COPY --from=builder /proxypool /
|
||||
ENTRYPOINT ["/proxypool"]
|
||||
WORKDIR /proxypool-src
|
||||
COPY ./assets /proxypool-src/assets
|
||||
COPY ./source.yaml /proxypool-src
|
||||
COPY --from=builder /proxypool /proxypool-src/
|
||||
ENTRYPOINT ["/proxypool-src/proxypool"]
|
||||
|
||||
@@ -22,14 +22,22 @@ type TGChannelGetter struct {
|
||||
|
||||
func NewTGChannelGetter(options tool.Options) Getter {
|
||||
num, found := options["num"]
|
||||
if !found || num.(int) <= 0 {
|
||||
num = 200
|
||||
t := 200
|
||||
switch num.(type) {
|
||||
case int:
|
||||
t = num.(int)
|
||||
case float64:
|
||||
t = int(num.(float64))
|
||||
}
|
||||
|
||||
if !found || t <= 0 {
|
||||
t = 200
|
||||
}
|
||||
url, found := options["channel"]
|
||||
if found {
|
||||
return &TGChannelGetter{
|
||||
c: colly.NewCollector(),
|
||||
NumNeeded: num.(int),
|
||||
NumNeeded: t,
|
||||
Url: "https://t.me/s/" + url.(string),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,14 +22,23 @@ type WebFanqiangdang struct {
|
||||
|
||||
func NewWebFanqiangdangGetter(options tool.Options) Getter {
|
||||
num, found := options["num"]
|
||||
if !found || num.(int) <= 0 {
|
||||
num = 200
|
||||
|
||||
t := 200
|
||||
switch num.(type) {
|
||||
case int:
|
||||
t = num.(int)
|
||||
case float64:
|
||||
t = int(num.(float64))
|
||||
}
|
||||
|
||||
if !found || t <= 0 {
|
||||
t = 200
|
||||
}
|
||||
url, found := options["url"]
|
||||
if found {
|
||||
return &WebFanqiangdang{
|
||||
c: colly.NewCollector(),
|
||||
NumNeeded: num.(int),
|
||||
NumNeeded: t,
|
||||
Url: url.(string),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user