1
13693261870
2022-09-16 fee60c3e25fac0982f3b8cb8feea7225c4ed22f8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.terra.proxy.proxy;
 
import cn.hutool.core.collection.ConcurrentHashSet;
import com.terra.proxy.bean.ProxyInfoBean;
import com.terra.proxy.properties.TerraProperties;
import com.terra.proxy.service.Impl.ServerRegisterServiceImpl;
import org.mitre.dsmiley.httpproxy.ProxyServlet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
 
import javax.servlet.Servlet;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
 
@Configuration
public class SolrProxyServletConfiguration {
 
    @Autowired
    private TerraProperties properties;
 
    public static Set<String> tokens = new ConcurrentHashSet<>();
 
    public static Set<ProxyInfoBean> proxyInfoSet = new ConcurrentHashSet<>();
 
    @Value("${isusetoken}")
    public Boolean flag;
 
    public List<Map> ConfigInfoList = new ArrayList<>();
    @Autowired
    public ServerRegisterServiceImpl res;
 
    @Bean
    public Servlet createProxyServlet() {
 
        // 创建新的ProxyServlet
        return new ProxyServlet();
    }
 
}