Projects STRLCPY sing-box Commits 84904c52
🤬
  • Create working directory if not exists

  • Loading...
  • 世界 committed 1 year ago
    84904c52
    1 parent fe4b429f
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■
    .goreleaser.yaml
    skipped 117 lines
    118 118   - src: LICENSE
    119 119   dst: /usr/share/licenses/sing-box/LICENSE
    120 120   scripts:
    121  - postinstall: release/config/postinstall.sh
    122 121   postremove: release/config/postremove.sh
    123 122  source:
    124 123   enabled: false
    skipped 14 lines
  • ■ ■ ■ ■ ■ ■
    cmd/sing-box/main.go
    skipped 39 lines
    40 40   log.SetStdLogger(log.NewFactory(log.Formatter{BaseTime: time.Now(), DisableColors: true}, os.Stderr, nil).Logger())
    41 41   }
    42 42   if workingDir != "" {
     43 + _, err := os.Stat(workingDir)
     44 + if err != nil {
     45 + os.MkdirAll(workingDir, 0o777)
     46 + }
    43 47   if err := os.Chdir(workingDir); err != nil {
    44 48   log.Fatal(err)
    45 49   }
    skipped 6 lines
  • ■ ■ ■ ■ ■
    release/config/config.json
    skipped 14 lines
    15 15   "listen": "::",
    16 16   "listen_port": 8080,
    17 17   "sniff": true,
     18 + "network": "tcp",
    18 19   "method": "2022-blake3-aes-128-gcm",
    19 20   "password": "8JCsPssfgS8tiRwiMlhARg=="
    20 21   }
    skipped 20 lines
  • ■ ■ ■ ■ ■ ■
    release/config/postinstall.sh
    1  -#!/bin/sh
    2  - 
    3  -mkdir -p /var/lib/sing-box
  • ■ ■ ■ ■ ■
    release/local/install.sh
    skipped 13 lines
    14 14  popd
    15 15   
    16 16  sudo cp $(go env GOPATH)/bin/sing-box /usr/local/bin/
    17  -sudo mkdir -p /var/lib/sing-box
    18 17  sudo mkdir -p /usr/local/etc/sing-box
    19 18  sudo cp $PROJECT/release/config/config.json /usr/local/etc/sing-box/config.json
    20 19  sudo cp $DIR/sing-box.service /etc/systemd/system
    skipped 2 lines
Please wait...
Page is in error, reload to recover