mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-22 06:40:43 +08:00
chore: release v0.1.4-beta (#22)
This commit is contained in:
@@ -2,4 +2,5 @@ package dns
|
||||
|
||||
type Config struct {
|
||||
Enable bool
|
||||
Addr string
|
||||
}
|
||||
|
||||
+1
-1
@@ -252,7 +252,7 @@ func (s *Server) Run() {
|
||||
}
|
||||
}()
|
||||
|
||||
err := server.Run(":53")
|
||||
err := server.Run(s.Addr)
|
||||
defer server.Close()
|
||||
|
||||
if err != nil {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
package rhttp
|
||||
|
||||
type Config struct {
|
||||
IpHeader string
|
||||
IpHeader string `yaml:"ip_header"`
|
||||
}
|
||||
|
||||
+2
-5
@@ -166,10 +166,7 @@ func (s *Server) Receive(c *gin.Context) {
|
||||
continue
|
||||
}
|
||||
|
||||
var (
|
||||
ip = strings.Split(c.Request.RemoteAddr, ":")[0]
|
||||
area = qqwry.Area(ip)
|
||||
)
|
||||
ip := strings.Split(c.Request.RemoteAddr, ":")[0]
|
||||
|
||||
if ip1 := c.Request.Header.Get(s.IpHeader); s.IpHeader != "" && ip1 != "" {
|
||||
ip = ip1
|
||||
@@ -177,7 +174,7 @@ func (s *Server) Receive(c *gin.Context) {
|
||||
}
|
||||
|
||||
// create new record
|
||||
r, err := NewRecord(_rule, flag, c.Request.Method, u, ip, area, string(raw))
|
||||
r, err := NewRecord(_rule, flag, c.Request.Method, u, ip, qqwry.Area(ip), string(raw))
|
||||
if err != nil {
|
||||
log.Warn("HTTP record[rule_id:%d] created failed :%s", _rule.ID, err)
|
||||
code, err := strconv.Atoi(compileTpl(c, _rule.ResponseStatusCode, vars))
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
log "unknwon.dev/clog/v2"
|
||||
)
|
||||
|
||||
const VERSION = "0.1.3-beta"
|
||||
const VERSION = "0.1.4-beta"
|
||||
|
||||
type Revsuit struct {
|
||||
config *Config
|
||||
|
||||
Reference in New Issue
Block a user